chiark / gitweb /
NMU 1.1.5.1: various Debian fixes.
[authbind.git] / debian / rules
1 #! /usr/bin/make -f
2 #
3 # debian/rules for authbind
4
5 # authbind is Copyright (C) 1998 Ian Jackson
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software Foundation,
19 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
20 #
21 # $Id$
22
23 CC= gcc
24
25 package=authbind
26 major=1
27 minor=0
28
29 arch = $(shell dpkg --print-architecture)
30
31 build: 
32         $(MAKE) prefix=/usr
33
34 clean:  
35         $(MAKE) distclean
36         rm -rf debian/{files,substvars,tmp} build
37         rm -f debian/*~ debian/#*# debian/core debian/*.bak
38
39 binary-indep:   checkroot build
40         $(checkdir)
41 # There are no architecture-independent files to be uploaded
42 # generated by this package.  If there were any they would be
43 # made here.
44
45 lab=libauthbind.so.$(major).$(minor)
46 udp=debian/tmp/usr/doc/$(package)
47
48 binary-arch:    checkroot build
49         rm -rf debian/tmp
50         install -d -g root -m 755 -o root debian/tmp/DEBIAN $(udp) \
51                 debian/tmp/usr/{bin,lib/$(package),man}
52         $(MAKE) prefix=debian/tmp/usr etc_dir=debian/tmp/etc/authbind \
53                 man_dir=debian/tmp/usr/man  install install_man
54         install -g root -o root -m 644 debian/changelog $(udp)/changelog.Debian
55         gzip -9 debian/tmp/usr/man/man*/* $(udp)/*
56         install -g root -o root -m 644 debian/copyright $(udp)/.
57         install -g root -o root -m 755 debian/postrm debian/tmp/DEBIAN
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         dpkg --build debian/tmp ..
68
69 binary:  binary-indep binary-arch
70
71 checkroot:
72         $(checkdir)
73         test root = "`whoami`"