2 # -*- mode: makefile; -*-
4 # Modified by Ian Jackson for authbind.
5 # Then last updated: Sat Dec 17 10:52:20 EST 1994 by imurdock.
7 # To make the binary distribution package, the ``Debianized'' source package
8 # and the context diff to the original package, type `./debian.rules dist'.
9 # Make sure that `debian.rules' is executable before the final distribution
12 # Invoke each target with `./debian.rules <target>'. All targets should be
13 # invoked with the package root as the current directory.
15 # The `binary' target must be run as root, as it needs to install files with
16 # specific ownerships. The `diff' target assumes that you have the original
17 # source package available, unpacked, in ../$(p)-$(v).orig, or that you have
18 # the previous revision of the ``Debianized'' source package and context diff
19 # in the parent directory.
27 arch = $(shell dpkg --print-architecture)
33 rm -rf debian/{files,substvars,tmp} build
36 binary-indep: checkroot build
38 # There are no architecture-independent files to be uploaded
39 # generated by this package. If there were any they would be
42 lab=libauthbind.so.$(major).$(minor)
44 binary-arch: checkroot build
46 install -d -g root -m 755 -o root debian/tmp/DEBIAN \
47 debian/tmp/usr/{bin,lib/$(package),doc/$(package)} \
48 debian/tmp/etc/authbind/{byport,byname,byuid}
49 install -s -g root -o root -m 755 authbind debian/tmp/usr/bin/.
50 install -s -g root -o root -m 4755 helper debian/tmp/usr/lib/authbind/.
51 install -s -g root -o root -m 755 $(lab) debian/tmp/usr/lib/authbind/.
52 ln -s $(lab) debian/tmp/usr/lib/authbind/libauthbind.so.$(major)
53 strip --strip-unneeded debian/tmp/usr/lib/authbind/$(lab)
54 install -g root -o root -m 644 debian/copyright debian/tmp/usr/doc/$(package)/
55 install -g root -o root -m 644 debian/changelog \
56 debian/tmp/usr/doc/$(package)/changelog.Debian
57 gzip -9 debian/tmp/usr/doc/$(package)/*
59 install -g root -o root -m 644 debian/shlibs debian/tmp/DEBIAN
61 install -g root -o root -m 644 debian/shlibs.alpha debian/tmp/DEBIAN/shlibs
63 dpkg-shlibdeps ./authbind
65 chown -R root.root debian/tmp
66 chmod -R g-ws debian/tmp
67 #/bin/bash #-c "ls debian/tmp"
68 #bash -c "dpkg --build debian/tmp .."
69 dpkg --build debian/tmp ..
71 binary: binary-indep binary-arch
75 test root = "`whoami`"