]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - debian/rules
88f2c55771a9dda2df4ca9563e2a2fc7376e66ba
[1ts-debian.git] / 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/zephyr/*.o || true; \
40                 $(MAKE) -C lib                  \
41                  FPIC=                                  \
42                  LIBEXT=a; \
43                 rm -f lib/zephyr/*.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.*
59         -rm debian/libzephyr3-krb.files
60
61         dh_clean
62
63 install: DH_OPTIONS=
64 install: build
65         dh_testdir
66         dh_testroot
67         dh_clean -k
68         -rm -rf debian/tmp-krb
69         dh_installdirs
70
71         # Add here commands to install the package into debian/tmp.
72         cd no-krb&&$(MAKE) install DESTDIR=`pwd`/../debian/tmp
73         cd krb&&$(MAKE)  DESTDIR=`pwd`/../debian/tmp-krb install
74         mv debian/tmp/usr/lib/libzephyr.so debian/tmp/usr/lib/libzephyr.so.$(SONAME)
75         ln -s libzephyr.so.$(SONAME) debian/tmp/usr/lib/libzephyr.so
76                 mv debian/tmp-krb/usr/lib/libzephyr.so debian/tmp-krb/usr/lib/libzephyr.so.$(SONAME)
77         ln -s libzephyr.so.$(SONAME) debian/tmp-krb/usr/lib/libzephyr.so
78         mkdir -p debian/tmp/etc/zephyr/acl
79         set -x; for i in debian/acl/*; do install -c -m 644 -o root $$i debian/tmp/etc/zephyr/acl; done; set +x
80         install -c -m 644 debian/zephyr.vars debian/tmp/etc/zephyr
81         cp -pr debian/tmp/etc/zephyr/acl debian/tmp-krb/etc/zephyr
82
83 # Build architecture-independent files here.
84 # Pass -i to all debhelper commands in this target to reduce clutter.
85 binary-indep: build install
86
87 # Build architecture-dependent files here.
88 # Pass -a to all debhelper commands in this target to reduce clutter.
89 binary-arch: build install
90         dh_testdir
91         dh_testroot
92         set -e; \
93         for file  in  files init templates config postinst; do \
94                 cp debian/zephyr-server.$$file debian/zephyr-server-krb.$$file; \
95                 done
96         cp debian/libzephyr3.files debian/libzephyr3-krb.files
97         dh_movefiles  -plibzephyr3 -pzephyr-clients -pzephyr-server -pzephyr-de
98         dh_movefiles --sourcedir=debian/tmp-krb -plibzephyr3-krb -pzephyr-server-krb
99         dh_installdebconf 
100         dh_installdocs
101 #       dh_installexamples
102 #       dh_installmenu
103 #       dh_installemacsen
104 #       dh_installpam
105         dh_installinit -pzephyr-clients --init-script=zhm
106         dh_installinit -pzephyr-server-krb --init-script=zephyrd
107         dh_installinit -pzephyr-server --init-script=zephyrd
108 #       dh_installcron
109 #       dh_installmanpages
110 #       dh_installinfo
111 #       dh_undocumented
112         dh_installchangelogs 
113         dh_strip
114 #       dh_link
115         dh_compress
116         dh_fixperms
117         # You may want to make some executables suid here.
118         dh_makeshlibs
119         dh_shlibdeps
120         dh_installdeb
121 #       dh_perl
122         dh_gencontrol
123         dh_md5sums
124         dh_builddeb
125
126 binary: binary-indep binary-arch
127
128 .PHONY: build clean binary-indep binary-arch binary install configure
129
130