Rev 6 | Rev 9 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 6 | Rev 8 | ||
|---|---|---|---|
| 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 |
- | |
| 28 | version=2.0.5 |
- | |
| 29 | major=2 |
- | |
| 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.* | \ |
- | |
| 32 | # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
- | |
| 33 | #major=`ls src/.libs/lib*.so.* | \ |
- | |
| 34 | # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
- | |
| 35 | - | ||
| 36 | config.status: ${DPATCH_STAMPFN} configure
|
27 | config.status: ${DPATCH_STAMPFN} configure
|
| 37 | dh_testdir |
28 | dh_testdir |
| 38 | # Add here commands to configure the package. |
29 | # Add here commands to configure the package. |
| 39 | CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ |
30 | CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ |
| 40 | --build=$(DEB_BUILD_GNU_TYPE) \ |
31 | --build=$(DEB_BUILD_GNU_TYPE) \ |
| 41 | --prefix=/usr \ |
32 | --prefix=/usr \ |
| 42 | --mandir=\$${prefix}/share/man \
|
33 | --mandir=\$${prefix}/share/man \
|
| 43 | --infodir=\$${prefix}/share/info \
|
34 | --infodir=\$${prefix}/share/info \
|
| 44 | --enable-shared \ |
35 | --enable-shared \ |
| 45 | --disable-dependency-tracking |
36 | --disable-dependency-tracking |
| 46 | 37 | ||
| 47 | 38 | ||
| 48 | build: build-stamp |
39 | build: build-stamp |
| 49 | build-stamp: config.status |
40 | build-stamp: config.status |
| 50 | dh_testdir |
41 | dh_testdir |
| 51 | 42 | ||
| 52 | # Add here commands to compile the package. |
43 | # Add here commands to compile the package. |
| 53 | $(MAKE) |
44 | $(MAKE) |
| 54 | 45 | ||
| 55 | touch build-stamp |
46 | touch build-stamp |
| 56 | 47 | ||
| 57 | clean: clean-patched unpatch |
48 | clean: clean-patched unpatch |
| 58 | dh_clean |
49 | dh_clean |
| 59 | 50 | ||
| 60 | clean-patched: |
51 | clean-patched: |
| 61 | dh_testdir |
52 | dh_testdir |
| 62 | dh_testroot |
53 | dh_testroot |
| 63 | rm -f build-stamp |
54 | rm -f build-stamp |
| 64 | 55 | ||
| 65 | # Add here commands to clean up after the build process. |
56 | # Add here commands to clean up after the build process. |
| 66 | -$(MAKE) distclean |
57 | -$(MAKE) distclean |
| 67 | 58 | ||
| 68 | install: build |
59 | install: build |
| 69 | dh_testdir |
60 | dh_testdir |
| 70 | dh_testroot |
61 | dh_testroot |
| 71 | dh_clean -k |
62 | dh_clean -k |
| 72 | dh_installdirs |
63 | dh_installdirs |
| 73 | 64 | ||
| 74 | # Add here commands to install the package into debian/tmp |
65 | # Add here commands to install the package into debian/tmp |
| 75 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
66 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
| 76 | mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle |
67 | mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle |
| 77 | 68 | ||
| 78 | # Build architecture-independent files here. |
69 | # Build architecture-independent files here. |
| 79 | binary-indep: build install |
70 | binary-indep: build install |
| 80 | # We have nothing to do by default. |
71 | # We have nothing to do by default. |
| 81 | 72 | ||
| 82 | # Build architecture-dependent files here. |
73 | # Build architecture-dependent files here. |
| 83 | binary-arch: build install |
74 | binary-arch: build install |
| 84 | dh_testdir |
75 | dh_testdir |
| 85 | dh_testroot |
76 | dh_testroot |
| 86 | dh_movefiles |
77 | dh_movefiles |
| 87 | dh_installchangelogs ChangeLog |
78 | dh_installchangelogs ChangeLog |
| 88 | dh_installdocs |
79 | dh_installdocs |
| 89 | dh_installexamples |
80 | dh_installexamples |
| 90 | dh_installinfo |
81 | dh_installinfo |
| 91 | dh_installman |
82 | dh_installman |
| 92 | dh_link |
83 | dh_link |
| 93 | dh_strip |
84 | dh_strip |
| 94 | dh_compress |
85 | dh_compress |
| 95 | dh_fixperms |
86 | dh_fixperms |
| 96 | dh_makeshlibs |
87 | dh_makeshlibs |
| 97 | dh_installdeb |
88 | dh_installdeb |
| 98 | dh_shlibdeps |
89 | dh_shlibdeps -V 'libnettle2 (>= 1.15)' |
| 99 | dh_gencontrol |
90 | dh_gencontrol |
| 100 | dh_md5sums |
91 | dh_md5sums |
| 101 | dh_builddeb |
92 | dh_builddeb |
| 102 | 93 | ||
| 103 | binary: binary-indep binary-arch |
94 | binary: binary-indep binary-arch |
| 104 | .PHONY: build clean clean-patched binary-indep binary-arch binary install |
95 | .PHONY: build clean clean-patched binary-indep binary-arch binary install |