Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 4 | Rev 8 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 6
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
# -*- makefile -*-
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
3
# Sample debian/rules that uses debhelper.
4
# GNU copyright 1997 to 1999 by Joey Hess.
4
# GNU copyright 1997 to 1999 by Joey Hess.
5
5
6
# Uncomment this to turn on verbose mode.
6
# Uncomment this to turn on verbose mode.
7
#export DH_VERBOSE=1
7
#export DH_VERBOSE=1
8
include /usr/share/dpatch/dpatch.make
8
include /usr/share/dpatch/dpatch.make
9
9
10
# These are used for cross-compiling and for saving the configure script
10
# These are used for cross-compiling and for saving the configure script
11
# from having to guess our platform (since we know it already)
11
# from having to guess our platform (since we know it already)
12
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14
14
15
15
16
CFLAGS = -Wall -g
16
CFLAGS = -Wall -g
17
17
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19
	CFLAGS += -O0
19
	CFLAGS += -O0
20
else
20
else
21
	CFLAGS += -O2
21
	CFLAGS += -O2
22
endif
22
endif
23
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
23
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24
	INSTALL_PROGRAM += -s
24
	INSTALL_PROGRAM += -s
25
endif
25
endif
26
26
27
# shared library versions, option 1
27
# shared library versions, option 1
28
version=2.0.5
28
version=2.0.5
29
major=2
29
major=2
30
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
30
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
31
#version=`ls src/.libs/lib*.so.* | \
31
#version=`ls src/.libs/lib*.so.* | \
32
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
32
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
33
#major=`ls src/.libs/lib*.so.* | \
33
#major=`ls src/.libs/lib*.so.* | \
34
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
34
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
35
35
36
configure: config.status
-
 
37
config.status: ${DPATCH_STAMPFN}
36
config.status: ${DPATCH_STAMPFN} configure
38
	dh_testdir
37
	dh_testdir
39
	# Add here commands to configure the package.
38
	# Add here commands to configure the package.
40
	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
39
	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
41
	                               --build=$(DEB_BUILD_GNU_TYPE) \
40
	                               --build=$(DEB_BUILD_GNU_TYPE) \
42
			                           --prefix=/usr \
41
			                           --prefix=/usr \
43
	                               --mandir=\$${prefix}/share/man \
42
	                               --mandir=\$${prefix}/share/man \
44
	                               --infodir=\$${prefix}/share/info \
43
	                               --infodir=\$${prefix}/share/info \
45
	                               --enable-shared \
44
	                               --enable-shared \
46
	                               --disable-dependency-tracking
45
	                               --disable-dependency-tracking
47
46
48
47
49
build: build-stamp
48
build: build-stamp
50
build-stamp:  config.status
49
build-stamp:  config.status
51
	dh_testdir
50
	dh_testdir
52
51
53
	# Add here commands to compile the package.
52
	# Add here commands to compile the package.
54
	$(MAKE)
53
	$(MAKE)
55
54
56
	touch build-stamp
55
	touch build-stamp
57
56
58
clean: clean-patched unpatch
57
clean: clean-patched unpatch
59
	dh_clean
58
	dh_clean
60
59
61
clean-patched:
60
clean-patched:
62
	dh_testdir
61
	dh_testdir
63
	dh_testroot
62
	dh_testroot
64
	rm -f build-stamp 
63
	rm -f build-stamp 
65
64
66
	# Add here commands to clean up after the build process.
65
	# Add here commands to clean up after the build process.
67
	-$(MAKE) distclean
66
	-$(MAKE) distclean
68
67
69
install: build
68
install: build
70
	dh_testdir
69
	dh_testdir
71
	dh_testroot
70
	dh_testroot
72
	dh_clean -k 
71
	dh_clean -k 
73
	dh_installdirs
72
	dh_installdirs
74
73
75
	# Add here commands to install the package into debian/tmp
74
	# Add here commands to install the package into debian/tmp
76
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
75
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
77
	mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle
76
	mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle
78
77
79
# Build architecture-independent files here.
78
# Build architecture-independent files here.
80
binary-indep: build install
79
binary-indep: build install
81
# We have nothing to do by default.
80
# We have nothing to do by default.
82
81
83
# Build architecture-dependent files here.
82
# Build architecture-dependent files here.
84
binary-arch: build install
83
binary-arch: build install
85
	dh_testdir
84
	dh_testdir
86
	dh_testroot
85
	dh_testroot
87
	dh_movefiles
86
	dh_movefiles
88
	dh_installchangelogs ChangeLog
87
	dh_installchangelogs ChangeLog
89
	dh_installdocs
88
	dh_installdocs
90
	dh_installexamples
89
	dh_installexamples
91
	dh_installinfo
90
	dh_installinfo
92
	dh_installman
91
	dh_installman
93
	dh_link
92
	dh_link
94
	dh_strip
93
	dh_strip
95
	dh_compress
94
	dh_compress
96
	dh_fixperms
95
	dh_fixperms
97
	dh_makeshlibs
96
	dh_makeshlibs
98
	dh_installdeb
97
	dh_installdeb
99
	dh_shlibdeps
98
	dh_shlibdeps
100
	dh_gencontrol
99
	dh_gencontrol
101
	dh_md5sums
100
	dh_md5sums
102
	dh_builddeb
101
	dh_builddeb
103
102
104
binary: binary-indep binary-arch
103
binary: binary-indep binary-arch
105
.PHONY: configure build clean clean-patched binary-indep binary-arch binary install
104
.PHONY: build clean clean-patched binary-indep binary-arch binary install