]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/debian/rules
actually set the address family on incoming addresses
[1ts-debian.git] / zephyr / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper. 
3 # GNU copyright 1997 by Joey Hess.
4 #
5 # This version is for a hypothetical package that builds an
6 # architecture-dependant package, as well as an architecture-independent
7 # package.
8
9 # Uncomment this to turn on verbose mode. 
10 #export DH_VERBOSE=1
11
12 # This has to be exported to make some magic below work.
13 export DH_OPTIONS
14 CONFIGURE_ROOT=--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --datadir=/etc  --with-ares=/usr --with-hesiod=/usr
15
16 CFLAGS=-O -g
17
18 # see /usr/share/doc/autotools-dev/README.Debian.gz
19 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
20 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
21
22 # FOR AUTOCONF 2.52 AND NEWER ONLY
23 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
24   confflags += --build $(DEB_HOST_GNU_TYPE)
25 else
26   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
27 endif
28
29
30 # The autotools target adds forced build-time dependencies on
31 # autotools-dev (for /usr/share/misc/config.*) and devscripts (for dch)
32 # It's also a .PHONY make target.
33 autotools:
34         chmod u+x config.sub
35         chmod u+x config.guess
36         OLDDATESUB=`./config.sub -t | tr -d -` ;\
37         OLDDATEGUESS=`./config.guess -t | tr -d -` ;\
38         NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d -` ;\
39         NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d -` ;\
40         if [ $$OLDDATESUB -lt $$NEWDATESUB -o \
41              $$OLDDATEGUESS -lt $$NEWDATEGUESS ]; then \
42            dch -a -p "GNU config automated update: config.sub\
43              ($$OLDDATESUB to $$NEWDATESUB), config.guess\
44              ($$OLDDATEGUESS to $$NEWDATEGUESS)" ;\
45            cp -f /usr/share/misc/config.sub config.sub ;\
46            cp -f /usr/share/misc/config.guess config.guess ;\
47            echo WARNING: GNU config scripts updated from master copies 1>&2 ;\
48         fi
49
50 configure: configure-stamp autotools
51 configure-stamp:
52         dh_testdir
53         # Add here commands to configure the package.
54         -mkdir krb5
55         cd krb5 && CFLAGS="" ../configure --with-krb5=/usr --with-openssl=/usr $(CONFIGURE_ROOT)
56         -mkdir krb45
57         cd krb45 && CFLAGS="" ../configure --with-krb4=/usr --with-krb5=/usr $(CONFIGURE_ROOT)
58         -mkdir krb4
59         cd krb4 && CFLAGS="" ../configure --with-krb4=/usr $(CONFIGURE_ROOT)
60         -mkdir no-krb
61         cd no-krb && CFLAGS="" ../configure $(CONFIGURE_ROOT)
62         touch configure-stamp
63
64 build: configure-stamp build-stamp
65 build-stamp:
66         dh_testdir
67
68         # Add here commands to compile the package.
69         set -e; \
70         for dir in krb5 krb45 krb4 ; do  \
71                 $(MAKE) -C $$dir/lib; $(MAKE) -C $$dir/server; \
72         done
73         $(MAKE) -C no-krb
74
75         touch build-stamp
76
77 clean:
78         dh_testdir
79         dh_testroot
80         -rm -f build-stamp configure-stamp
81
82         # Add here commands to clean up after the build process.
83         -rm -rf krb krb4 krb5 krb45 no-krb debian/tmp-krb*
84         -rm debian/zephyr-server-krb.files
85         -rm debian/zephyr-server-krb.templates
86         -rm debian/zephyr-server-krb.config
87         -rm debian/zephyr-server-krb.postinst
88         -rm debian/zephyr-server-krb5.*
89         -rm debian/zephyr-server-krb45.*
90         -rm debian/libzephyr4-krb.files debian/libzephyr4-krb5.files debian/libzephyr4-krb45.files
91
92         dh_clean
93
94 install: DH_OPTIONS=
95 install: build
96         dh_testdir
97         dh_testroot
98         dh_clean -k
99         -rm -rf debian/tmp-krb*
100         dh_installdirs
101
102         # Add here commands to install the package into debian/tmp.
103         $(MAKE) -C no-krb DESTDIR=$(CURDIR)/debian/tmp install
104         for dir in krb5 krb45 krb4 ; do \
105                 $(MAKE) -C $$dir SUBDIRS="lib server" DESTDIR=$(CURDIR)/debian/tmp-$$dir install; \
106         done
107         mkdir -p debian/tmp/etc/zephyr/acl
108         set -x; for i in debian/acl/*; do install -c -m 644 -o root $$i debian/tmp/etc/zephyr/acl; done; set +x
109         install -c -m 644 debian/zephyr.vars debian/tmp/etc/zephyr
110         install -c -m 644 debian/default.subscriptions debian/tmp/etc/zephyr
111         cp -rp debian/tmp/etc/zephyr/acl debian/tmp-krb4/etc/zephyr
112         cp -rp debian/tmp/etc/zephyr/acl debian/tmp-krb5/etc/zephyr
113         cp -rp debian/tmp/etc/zephyr/acl debian/tmp-krb45/etc/zephyr
114
115 # Build architecture-independent files here.
116 # Pass -i to all debhelper commands in this target to reduce clutter.
117 binary-indep: build install
118
119 # Build architecture-dependent files here.
120 # Pass -a to all debhelper commands in this target to reduce clutter.
121 binary-arch: build install
122         dh_testdir
123         dh_testroot
124         set -e; \
125         for file in files templates config postinst docs; do \
126                 cp debian/zephyr-server.$$file debian/zephyr-server-krb.$$file; \
127                 cp debian/zephyr-server.$$file debian/zephyr-server-krb5.$$file; \
128                 cp debian/zephyr-server.$$file debian/zephyr-server-krb45.$$file; \
129                 done
130         for file in README.Debian docs init postrm; do \
131                 cp debian/zephyr-server-krb.$$file debian/zephyr-server-krb5.$$file; \
132                 cp debian/zephyr-server-krb.$$file debian/zephyr-server-krb45.$$file; \
133         done
134         cp debian/libzephyr4.files debian/libzephyr4-krb.files
135         cp debian/libzephyr4.files debian/libzephyr4-krb5.files
136         cp debian/libzephyr4.files debian/libzephyr4-krb45.files
137         dh_movefiles  -plibzephyr4 -pzephyr-clients -pzephyr-server -plibzephyr-dev
138         dh_movefiles --sourcedir=debian/tmp-krb4 -plibzephyr4-krb -pzephyr-server-krb
139         dh_movefiles --sourcedir=debian/tmp-krb5 -plibzephyr4-krb5 -pzephyr-server-krb5
140         dh_movefiles --sourcedir=debian/tmp-krb45 -plibzephyr4-krb45 -pzephyr-server-krb45
141         dh_installdebconf 
142         dh_installdocs
143         dh_installinit -pzephyr-clients --init-script=zhm --no-start
144         dh_installinit -pzephyr-server --init-script=zephyrd
145         dh_installinit -pzephyr-server-krb --init-script=zephyrd
146         dh_installinit -pzephyr-server-krb5 --init-script=zephyrd
147         dh_installinit -pzephyr-server-krb45 --init-script=zephyrd
148         dh_installchangelogs 
149         dh_strip
150         dh_compress
151         dh_fixperms
152         # You may want to make some executables suid here.
153         dh_makeshlibs
154         # sigh
155         cp debian/libzephyr4/DEBIAN/shlibs debian/libzephyr4-krb/DEBIAN/shlibs
156         cp debian/libzephyr4/DEBIAN/shlibs debian/libzephyr4-krb5/DEBIAN/shlibs
157         cp debian/libzephyr4/DEBIAN/shlibs debian/libzephyr4-krb45/DEBIAN/shlibs
158         dh_shlibdeps
159         dh_installdeb
160         dh_gencontrol
161         dh_md5sums
162         dh_builddeb
163
164 binary: binary-indep binary-arch
165
166 .PHONY: autotools build clean binary-indep binary-arch binary install configure
167
168