3 # debian/rules for authbind
5 # authbind is Copyright (C) 1998 Ian Jackson
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)
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.
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.
23 -include /usr/share/dpkg/architecture.mk
24 ifneq ($(DEB_HOST_GNU_TYPE),)
25 TOOL_PREFIX=$(DEB_HOST_GNU_TYPE)-
27 ifeq ($(origin CC),default)
36 arch = $(shell dpkg --print-architecture)
38 export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
41 INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
42 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
43 INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
44 INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
53 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
54 STRIP=$(TOOL_PREFIX)strip
55 INSTALL_PROGRAM += -s --strip-program=$(STRIP)
64 export INSTALL_PROGRAM
71 $(MAKE) prefix=/usr CC='$(CC)' LD='$(TOOL_PREFIX)ld'
75 rm -rf debian/{files,substvars,tmp} build
76 rm -f debian/*~ debian/#*# debian/core debian/*.bak
78 binary-indep: checkroot build
80 # There are no architecture-independent files to be uploaded
81 # generated by this package. If there were any they would be
84 lab=libauthbind.so.$(major).$(minor)
85 udp=debian/tmp/usr/share/doc/$(package)
87 binary-arch: checkroot build
89 install -d -g root -m 755 -o root debian/tmp/DEBIAN $(udp) \
90 debian/tmp/usr/{bin,lib/$(package),share/man}
91 $(MAKE) prefix=debian/tmp/usr etc_dir=debian/tmp/etc/authbind \
92 man_dir=debian/tmp/usr/share/man install install_man
93 $(INSTALL_FILE) debian/changelog $(udp)/changelog
94 gzip -9n debian/tmp/usr/share/man/man*/* $(udp)/*
95 $(INSTALL_FILE) debian/copyright $(udp)/.
96 $(INSTALL_SCRIPT) debian/{postrm,prerm,postinst} debian/tmp/DEBIAN
97 dpkg-shlibdeps ./authbind
99 chown -R root.root debian/tmp
100 chmod -R g-ws debian/tmp
101 find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
102 xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
103 dpkg --build debian/tmp ..
105 binary: binary-indep binary-arch
109 test root = "`whoami`"