Rev 2 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 11 | ||
---|---|---|---|
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 | 8 | ||
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 | config.status: configure |
36 | config.status: configure |
37 | dh_testdir |
37 | dh_testdir |
38 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
38 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
39 | cp -f /usr/share/misc/config.sub config.sub |
39 | cp -f /usr/share/misc/config.sub config.sub |
40 | endif |
40 | endif |
41 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
41 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
42 | cp -f /usr/share/misc/config.guess config.guess |
42 | cp -f /usr/share/misc/config.guess config.guess |
43 | endif |
43 | endif |
44 | # Add here commands to configure the package. |
44 | # Add here commands to configure the package. |
45 | CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ |
45 | CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ |
46 | --build=$(DEB_BUILD_GNU_TYPE) \ |
46 | --build=$(DEB_BUILD_GNU_TYPE) \ |
47 | --prefix=/usr \ |
47 | --prefix=/usr \ |
48 | --mandir=\$${prefix}/share/man \ |
48 | --mandir=\$${prefix}/share/man \ |
49 | --infodir=\$${prefix}/share/info \ |
49 | --infodir=\$${prefix}/share/info \ |
50 | --enable-shared \ |
50 | --enable-shared \ |
51 | --disable-dependency-tracking |
51 | --disable-dependency-tracking |
52 | 52 | ||
53 | 53 | ||
54 | build: build-stamp |
54 | build: build-stamp |
55 | build-stamp: config.status |
55 | build-stamp: config.status |
56 | dh_testdir |
56 | dh_testdir |
57 | 57 | ||
58 | # Add here commands to compile the package. |
58 | # Add here commands to compile the package. |
59 | $(MAKE) |
59 | $(MAKE) |
60 | 60 | ||
61 | touch build-stamp |
61 | touch build-stamp |
62 | 62 | ||
63 | clean: |
63 | clean: |
64 | dh_testdir |
64 | dh_testdir |
65 | dh_testroot |
65 | dh_testroot |
66 | rm -f build-stamp |
66 | rm -f build-stamp |
67 | 67 | ||
68 | # Add here commands to clean up after the build process. |
68 | # Add here commands to clean up after the build process. |
69 | -$(MAKE) distclean |
69 | -$(MAKE) distclean |
70 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
70 | ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
71 | rm -f config.sub |
71 | rm -f config.sub |
72 | endif |
72 | endif |
73 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
73 | ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
74 | rm -f config.guess |
74 | rm -f config.guess |
75 | endif |
75 | endif |
76 | -rm machine.m4 |
76 | -rm machine.m4 |
77 | -rm -r .lib |
77 | -rm -r .lib |
78 | 78 | ||
79 | dh_clean |
79 | dh_clean |
80 | 80 | ||
81 | install: build |
81 | install: build |
82 | dh_testdir |
82 | dh_testdir |
83 | dh_testroot |
83 | dh_testroot |
84 | dh_clean -k |
84 | dh_clean -k |
85 | dh_installdirs |
85 | dh_installdirs |
86 | 86 | ||
87 | # Add here commands to install the package into debian/tmp |
87 | # Add here commands to install the package into debian/tmp |
88 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
88 | $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
89 | mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle |
89 | mv $(CURDIR)/debian/tmp/usr/bin/sexp-conv $(CURDIR)/debian/tmp/usr/bin/sexp-conv.nettle |
90 | 90 | ||
91 | # Build architecture-independent files here. |
91 | # Build architecture-independent files here. |
92 | binary-indep: build install |
92 | binary-indep: build install |
93 | # We have nothing to do by default. |
93 | # We have nothing to do by default. |
94 | 94 | ||
95 | # Build architecture-dependent files here. |
95 | # Build architecture-dependent files here. |
96 | binary-arch: build install |
96 | binary-arch: build install |
97 | dh_testdir |
97 | dh_testdir |
98 | dh_testroot |
98 | dh_testroot |
99 | dh_movefiles |
99 | dh_movefiles |
100 | dh_installchangelogs ChangeLog |
100 | dh_installchangelogs ChangeLog |
101 | dh_installdocs |
101 | dh_installdocs |
102 | dh_installexamples |
102 | dh_installexamples |
103 | dh_installinfo |
103 | dh_installinfo |
104 | dh_installman |
104 | dh_installman |
105 | dh_link |
105 | dh_link |
106 | dh_strip |
106 | dh_strip |
107 | dh_compress |
107 | dh_compress |
108 | dh_fixperms |
108 | dh_fixperms |
109 | dh_makeshlibs |
109 | dh_makeshlibs |
110 | dh_installdeb |
110 | dh_installdeb |
111 | dh_shlibdeps |
111 | dh_shlibdeps |
112 | dh_gencontrol |
112 | dh_gencontrol |
113 | dh_md5sums |
113 | dh_md5sums |
114 | dh_builddeb |
114 | dh_builddeb |
115 | 115 | ||
116 | binary: binary-indep binary-arch |
116 | binary: binary-indep binary-arch |
117 | .PHONY: build clean binary-indep binary-arch binary install |
117 | .PHONY: build clean binary-indep binary-arch binary install |