2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 by Joey Hess.
5 # This version is for a hypothetical package that builds an
6 # architecture-dependant package, as well as an architecture-independent
9 # Uncomment this to turn on verbose mode.
12 # This is the debhelper compatability version to use.
15 # This has to be exported to make some magic below work.
18 CONFIGURE_ROOT=--prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --datadir=/etc --with-ares=/usr
21 configure: configure-stamp
24 # Add here commands to configure the package.
26 cd krb&&../configure --with-krb4=/usr $(CONFIGURE_ROOT)
28 cd no-krb&&../configure $(CONFIGURE_ROOT)
31 build: configure-stamp build-stamp
35 # Add here commands to compile the package.
37 for dir in krb no-krb ; do \
39 rm -f lib/*.o || true; \
45 FPIC=-fpic SONAME=$(SONAME); \
54 -rm -f build-stamp configure-stamp
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
71 -rm -rf debian/tmp-krb
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
87 # Build architecture-independent files here.
88 # Pass -i to all debhelper commands in this target to reduce clutter.
89 binary-indep: build install
91 # Build architecture-dependent files here.
92 # Pass -a to all debhelper commands in this target to reduce clutter.
93 binary-arch: build install
97 for file in files templates config postinst docs; do \
98 cp debian/zephyr-server.$$file debian/zephyr-server-krb.$$file; \
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
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
121 # You may want to make some executables suid here.
130 binary: binary-indep binary-arch
132 .PHONY: build clean binary-indep binary-arch binary install configure