chiark / gitweb /
restore ignores which were deleted by mistake by NMUer's tools
[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 SHELL=/bin/bash
25
26 package=authbind
27 major=1
28 minor=0
29
30 arch = $(shell dpkg --print-architecture)
31
32 export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
33
34 INSTALL = install
35 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
36 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
37 INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
38 INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
39
40 CFLAGS = -O2 -Wall
41 LDFLAGS = 
42
43
44 CFLAGS += -g
45 LDFLAGS += -g 
46
47 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
48 INSTALL_PROGRAM += -s
49 STRIP=strip
50 else
51 STRIP=:
52 endif
53
54 export CFLAGS
55 export LDFLAGS
56 export INSTALL
57 export INSTALL_FILE
58 export INSTALL_PROGRAM
59 export INSTALL_SCRIPT
60 export INSTALL_DIR
61 export STRIP
62
63
64 build: 
65         $(MAKE) prefix=/usr
66
67 clean:  
68         $(MAKE) distclean
69         rm -rf debian/{files,substvars,tmp} build
70         rm -f debian/*~ debian/#*# debian/core debian/*.bak
71
72 binary-indep:   checkroot build
73         $(checkdir)
74 # There are no architecture-independent files to be uploaded
75 # generated by this package.  If there were any they would be
76 # made here.
77
78 lab=libauthbind.so.$(major).$(minor)
79 udp=debian/tmp/usr/share/doc/$(package)
80
81 binary-arch:    checkroot build
82         rm -rf debian/tmp
83         install -d -g root -m 755 -o root debian/tmp/DEBIAN $(udp) \
84                 debian/tmp/usr/{bin,lib/$(package),share/man}
85         $(MAKE) prefix=debian/tmp/usr etc_dir=debian/tmp/etc/authbind \
86                 man_dir=debian/tmp/usr/share/man  install install_man
87         $(INSTALL_FILE) debian/changelog $(udp)/changelog
88         gzip -9n debian/tmp/usr/share/man/man*/* $(udp)/*
89         $(INSTALL_FILE) debian/copyright $(udp)/.
90         $(INSTALL_SCRIPT) debian/{postrm,prerm,postinst} debian/tmp/DEBIAN
91         dpkg-shlibdeps ./authbind
92         dpkg-gencontrol -isp
93         chown -R root.root debian/tmp
94         chmod -R g-ws debian/tmp
95         find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
96                 xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
97         dpkg --build debian/tmp ..
98
99 binary:  binary-indep binary-arch
100
101 checkroot:
102         $(checkdir)
103         test root = "`whoami`"