1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
#! /usr/bin/make -f
#
# debian/rules for authbind
#
# authbind is Copyright (C) 1998 Ian Jackson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id$
SHELL=/bin/bash
package=authbind
major=1
minor=0
arch = $(shell dpkg --print-architecture)
TOOL_PREFIX = $(shell set -x; a=`dpkg-architecture -q DEB_HOST_GNU_TYPE`; echo $$a$${a+-})
ifeq ($(origin CC),default)
CC=$(TOOL_PREFIX)gcc
endif
export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
CFLAGS = -O2 -Wall
LDFLAGS =
CFLAGS += -g
LDFLAGS += -g
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP=$(TOOL_PREFIX)strip
INSTALL_PROGRAM += -s --strip-program=$(STRIP)
else
STRIP=:
endif
export CFLAGS
export LDFLAGS
export INSTALL
export INSTALL_FILE
export INSTALL_PROGRAM
export INSTALL_SCRIPT
export INSTALL_DIR
export STRIP
lab=libauthbind.so.$(major).$(minor)
udp=debian/tmp/usr/share/doc/$(package)
build-arch:
$(MAKE) prefix=/usr CC='$(CC)' LD='$(TOOL_PREFIX)ld'
binary-arch: checkroot build
rm -rf debian/tmp
install -d -g root -m 755 -o root debian/tmp/DEBIAN $(udp) \
debian/tmp/usr/{bin,lib/$(package),share/man}
$(MAKE) prefix=debian/tmp/usr etc_dir=debian/tmp/etc/authbind \
man_dir=debian/tmp/usr/share/man install install_man
$(INSTALL_FILE) debian/changelog $(udp)/changelog
gzip -9n debian/tmp/usr/share/man/man*/* $(udp)/*
$(INSTALL_FILE) debian/copyright $(udp)/.
$(INSTALL_SCRIPT) debian/{postrm,prerm,postinst} debian/tmp/DEBIAN
dpkg-shlibdeps ./authbind
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
find debian/tmp -newermt "@$$SOURCE_DATE_EPOCH" -print0 | \
xargs -0r touch --no-dereference --date="@$$SOURCE_DATE_EPOCH"
dpkg --build debian/tmp ..
binary-indep build-indep:
# There are no architecture-independent files to be uploaded
# generated by this package.
clean:
$(MAKE) distclean
rm -rf debian/{files,substvars,tmp} build
rm -f debian/*~ debian/#*# debian/core debian/*.bak
checkroot:
$(checkdir)
test root = "`whoami`"
binary: binary-indep binary-arch
build: build-indep build-arch
|