Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 #
4 # GNU copyright 1997 to 1999 by Joey Hess. (debian/rules in debhelper).
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9
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)
12 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14
15
16 CFLAGS = -Wall -g
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19 CFLAGS += -O0
20 else
21 CFLAGS += -O2
22 endif
23 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24 INSTALL_PROGRAM += -s
25 endif
26
27 # shared library versions, option 1
28 version=1.0.1
29 major=1
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 libchise/config.status: libchise/configure
37 dh_testdir
38 # Make a backup of files modified by the build process so that the
39 # package can be built twice in a row
40 for file in config.sub config.guess libtool config.h.in configure aclocal.m4; do cp libchise/$$file debian/$$file.bkp; done
41 cd libchise && aclocal
42 dh_autoreconf
43 cd libchise && CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
44
45
46 build-arch: build
47 build-indep: build
48 build: build-stamp
49 build-stamp: libchise/config.status
50 dh_testdir
51 cd libchise && $(MAKE)
52 touch build-stamp
53
54 clean:
55 dh_testdir
56 dh_testroot
57 rm -f build-stamp
58 cd libchise && [ ! -f Makefile ] || $(MAKE) distclean
59 dh_autoreconf_clean
60 dh_clean
61 -for file in config.sub config.guess libtool config.h.in configure aclocal.m4; do mv debian/$$file.bkp libchise/$$file ; done
62
63 install: build
64 dh_testdir
65 dh_testroot
66 dh_installdirs
67 mkdir -p $(CURDIR)/debian/tmp/usr/include
68 mkdir -p $(CURDIR)/debian/tmp/usr/lib
69 mkdir -p $(CURDIR)/debian/tmp/usr/share
70 cd libchise && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
71
72 install-chise-db:
73 dh_testdir
74 dh_testroot
75 dh_installdirs
76 mkdir -p $(CURDIR)/debian/tmp/usr/lib
77 mkdir -p $(CURDIR)/debian/tmp/usr/share
78 tar cCf chise-db - lib share/chise \
79 | tar xCSf $(CURDIR)/debian/tmp/usr -
80
81 binary-common:
82 dh_testdir
83 dh_testroot
84 dh_installchangelogs libchise/ChangeLog
85 dh_installdocs
86 dh_installexamples
87 dh_install
88 # dh_installmenu
89 # dh_installdebconf
90 # dh_installlogrotate
91 # dh_installemacsen
92 # dh_installpam
93 # dh_installmime
94 # dh_installinit
95 # dh_installcron
96 # dh_installinfo
97 dh_installman
98 dh_link
99 dh_strip -Xchise-db
100 dh_compress
101 dh_fixperms
102 # dh_perl
103 # dh_python
104 dh_makeshlibs
105 dh_installdeb
106 dh_shlibdeps
107 dh_gencontrol
108 dh_md5sums
109 dh_builddeb
110
111 # Build architecture-independent files here.
112 binary-indep: install-chise-db
113 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
114
115 # Build architecture-dependent files here.
116 binary-arch: build install
117 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
118
119 binary: binary-indep binary-arch
120 .PHONY: build build-arch build-indep clean binary-indep binary-arch binary install