]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/debian/rules
d8e17be6de5eb41ffbcce81ab732676e413423e1
[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 is the debhelper compatability version to use.
13 export DH_COMPAT=3
14
15 # This has to be exported to make some magic below work.
16 export DH_OPTIONS
17 SONAME=3
18 CONFIGURE_ROOT=--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --datadir=/etc  --with-ares=/usr
19
20
21 configure: configure-stamp
22 configure-stamp:
23         dh_testdir
24         # Add here commands to configure the package.
25         -mkdir krb
26         cd krb&&../configure --with-krb4=/usr $(CONFIGURE_ROOT)
27         -mkdir no-krb
28         cd no-krb&&../configure $(CONFIGURE_ROOT)
29         touch configure-stamp
30
31 build: configure-stamp build-stamp
32 build-stamp:
33         dh_testdir
34
35         # Add here commands to compile the package.
36         set -e; \
37         for dir in krb no-krb ; do  \
38                 cd $$dir; \
39         rm -f lib/*.o || true; \
40                 $(MAKE) -C lib                  \
41                  FPIC=                                  \
42                  LIBEXT=a; \
43                 rm -f lib/*.o; \
44                 $(MAKE) LIBEXT=so \
45                         FPIC=-fpic SONAME=$(SONAME); \
46                 cd ..; \
47                 done
48
49         touch build-stamp
50
51 clean:
52         dh_testdir
53         dh_testroot
54         -rm -f build-stamp configure-stamp
55
56         # Add here commands to clean up after the build process.
57         -rm -rf krb no-krb debian/tmp-krb
58         -rm debian/zephyr-server-krb.files
59         -rm debian/zephyr-server-krb.templates
60         -rm debian/zephyr-server-krb.config
61         -rm debian/zephyr-server-krb.postinst
62         -rm debian/libzephyr3-krb.files
63
64         dh_clean
65
66 install: DH_OPTIONS=
67 install: build
68         dh_testdir
69         dh_testroot
70         dh_clean -k
71         -rm -rf debian/tmp-krb
72         dh_installdirs
73
74         # Add here commands to install the package into debian/tmp.
75         cd no-krb&&$(MAKE) install DESTDIR=`pwd`/../debian/tmp
76         cd krb&&$(MAKE)  DESTDIR=`pwd`/../debian/tmp-krb install
77         mv debian/tmp/usr/lib/libzephyr.so debian/tmp/usr/lib/libzephyr.so.$(SONAME)
78         ln -s libzephyr.so.$(SONAME) debian/tmp/usr/lib/libzephyr.so
79                 mv debian/tmp-krb/usr/lib/libzephyr.so debian/tmp-krb/usr/lib/libzephyr.so.$(SONAME)
80         ln -s libzephyr.so.$(SONAME) debian/tmp-krb/usr/lib/libzephyr.so
81         mkdir -p debian/tmp/etc/zephyr/acl
82         set -x; for i in debian/acl/*; do install -c -m 644 -o root $$i debian/tmp/etc/zephyr/acl; done; set +x
83         install -c -m 644 debian/zephyr.vars debian/tmp/etc/zephyr
84         install -c -m 644 debian/default.subscriptions debian/tmp/etc/zephyr
85         cp -pr debian/tmp/etc/zephyr/acl debian/tmp-krb/etc/zephyr
86
87 # Build architecture-independent files here.
88 # Pass -i to all debhelper commands in this target to reduce clutter.
89 binary-indep: build install
90
91 # Build architecture-dependent files here.
92 # Pass -a to all debhelper commands in this target to reduce clutter.
93 binary-arch: build install
94         dh_testdir
95         dh_testroot
96         set -e; \
97         for file  in  files templates config postinst; do \
98                 cp debian/zephyr-server.$$file debian/zephyr-server-krb.$$file; \
99                 done
100         cp debian/libzephyr3.files debian/libzephyr3-krb.files
101         dh_movefiles  -plibzephyr3 -pzephyr-clients -pzephyr-server -plibzephyr-dev
102         dh_movefiles --sourcedir=debian/tmp-krb -plibzephyr3-krb -pzephyr-server-krb
103         dh_installdebconf 
104         dh_installdocs
105 #       dh_installexamples
106 #       dh_installmenu
107 #       dh_installemacsen
108 #       dh_installpam
109         dh_installinit -pzephyr-clients --init-script=zhm
110         dh_installinit -pzephyr-server-krb --init-script=zephyrd
111         dh_installinit -pzephyr-server --init-script=zephyrd
112 #       dh_installcron
113 #       dh_installmanpages
114 #       dh_installinfo
115 #       dh_undocumented
116         dh_installchangelogs 
117         dh_strip
118 #       dh_link
119         dh_compress
120         dh_fixperms
121         # You may want to make some executables suid here.
122         dh_makeshlibs
123         dh_shlibdeps
124         dh_installdeb
125 #       dh_perl
126         dh_gencontrol
127         dh_md5sums
128         dh_builddeb
129
130 binary: binary-indep binary-arch
131
132 .PHONY: build clean binary-indep binary-arch binary install configure
133
134