chiark / gitweb /
b6fc00bed694f05a14839865463f34ed4f20d871
[authbind.git] / debian / rules
1 #! /usr/bin/make -f
2 #   -*- mode: makefile; -*-
3 #
4 # Modified by Ian Jackson for authbind.
5 # Then last updated: Sat Dec 17 10:52:20 EST 1994 by imurdock.
6 #
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
10 # is made.
11 #
12 # Invoke each target with `./debian.rules <target>'.  All targets should be
13 # invoked with the package root as the current directory.
14 #
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.
20
21 CC = gcc
22
23 package=authbind
24 major=0
25 minor=1
26
27 arch = $(shell dpkg --print-architecture)
28
29 build: 
30         $(MAKE)
31
32 clean:  
33         rm -rf debian/{files,substvars,tmp} build 
34         $(MAKE) distclean
35
36 binary-indep:   checkroot build
37         $(checkdir)
38 # There are no architecture-independent files to be uploaded
39 # generated by this package.  If there were any they would be
40 # made here.
41
42 lab=libauthbind.so.$(major).$(minor)
43
44 binary-arch:    checkroot build
45         rm -rf debian/tmp
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)/*
58 ifneq ($(arch),alpha)
59         install -g root -o root -m 644 debian/shlibs debian/tmp/DEBIAN
60 else
61         install -g root -o root -m 644 debian/shlibs.alpha debian/tmp/DEBIAN/shlibs
62 endif
63         dpkg-shlibdeps ./authbind
64         dpkg-gencontrol
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 ..
70
71 binary:  binary-indep binary-arch
72
73 checkroot:
74         $(checkdir)
75         test root = "`whoami`"