From 3ef208a026336d54ab371c4e7221ba44ce14ff8b Mon Sep 17 00:00:00 2001 From: ian Date: Tue, 25 Sep 2001 22:45:28 +0000 Subject: [PATCH] FHS patches from Bas Zoetekouw (#91112, #91376, #91387) --- Makefile | 19 ++++++++++++------- debian/changelog | 13 +++++++++++++ debian/control | 3 ++- debian/copyright | 2 +- debian/postinst | 8 ++++++++ debian/prerm | 7 +++++++ debian/rules | 46 ++++++++++++++++++++++++++++++++++++---------- 7 files changed, 79 insertions(+), 19 deletions(-) create mode 100644 debian/postinst create mode 100644 debian/prerm diff --git a/Makefile b/Makefile index 8c6e90c..1d9a011 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,10 @@ man8_dir=$(man_dir)/man8 etc_dir=/etc/authbind +INSTALL_FILE=install -o root -g root -m 644 +INSTALL_PROGRAM=install -o root -g root -m 755 -s +INSTALL_DIR=install -o root -g root -m 755 -d + OPTIMISE= -O2 LDFLAGS= -g CFLAGS= -g $(OPTIMISE) \ @@ -52,18 +56,19 @@ MANPAGES_8= authbind-helper.8 all: $(TARGETS) install: $(TARGETS) - install -o root -g root -m 755 -d $(lib_dir) $(man1_dir) $(man8_dir) - install -o root -g root -m 755 -s authbind $(bin_dir)/. - install -o root -g root -m 644 $(LIBTARGET) $(lib_dir)/. + $(INSTALL_DIR) $(lib_dir) $(man1_dir) $(man8_dir) + $(INSTALL_PROGRAM) authbind $(bin_dir)/. + $(INSTALL_FILE) $(LIBTARGET) $(lib_dir)/. strip --strip-unneeded $(lib_dir)/$(LIBTARGET) ln -sf $(LIBTARGET) $(lib_dir)/$(LIBCANON) - install -o root -g root -m 4755 -s helper $(lib_dir)/. - install -o root -g root -m 755 -d $(etc_dir) \ + $(INSTALL_PROGRAM) helper $(lib_dir)/. + chmod u+s $(lib_dir)/helper + $(INSTALL_DIR) $(etc_dir) \ $(etc_dir)/byport $(etc_dir)/byaddr $(etc_dir)/byuid install_man: $(MANPAGES_1) $(MANPAGES_8) - install -o root -g root -m 644 $(MANPAGES_1) $(man1_dir)/. - install -o root -g root -m 644 $(MANPAGES_8) $(man8_dir)/. + $(INSTALL_FILE) $(MANPAGES_1) $(man1_dir)/. + $(INSTALL_FILE) $(MANPAGES_8) $(man8_dir)/. libauthbind.o: libauthbind.c authbind.h $(CC) -D_REENTRANT $(CFLAGS) $(CPPFLAGS) -c -o $@ -fPIC $< diff --git a/debian/changelog b/debian/changelog index 4778be7..a1f92cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,19 @@ authbind (1.1.6) unstable; urgency=low -- +authbind (1.1.5.3) unstable; urgency=low + + * Moved man pages to /usr/share/man and docs to + /usr/share/doc/authbind. Added a prerm and a postinst script to set + the /usr/doc/authbind link. (closes: #91112, #91376, #91387) + * Fixed the path to the common licenses in debian/copyright + * Added a section and priority field to the changelog + * Added support for the `nostrip' and `debug' options in + DEB_BUILD_OPTIONS. + * Boosted Standards-Version to 3.5.2 + + -- Bas Zoetekouw Sun, 13 May 2001 18:00:52 +0200 + authbind (1.1.5.2) frozen unstable; urgency=low * Non-maintainer upload. diff --git a/debian/control b/debian/control index e8be866..027f85c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: authbind Section: utils Priority: optional Maintainer: Ian Jackson -Standards-Version: 2.1.1.0 +Standards-Version: 3.5.2 +Build-Depends: libc6-dev Package: authbind Architecture: any diff --git a/debian/copyright b/debian/copyright index 544519d..c660869 100644 --- a/debian/copyright +++ b/debian/copyright @@ -19,7 +19,7 @@ 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 with -your Debian GNU/Linux system, in /usr/doc/copyright/GPL, or with the +your Debian GNU/Linux system, in /usr/share/common-licenses, or with the Debian GNU/Linux userv source package as the file COPYING; if not, email me at one of the addresses above or write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..40eb20e --- /dev/null +++ b/debian/postinst @@ -0,0 +1,8 @@ +#!/bin/sh +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/authbind -a -d /usr/share/doc/authbind ]; + then + ln -sf ../share/doc/authbind /usr/doc/authbind + fi +fi + diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..31beffd --- /dev/null +++ b/debian/prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/authbind ]; +then + rm -f /usr/doc/authbind +fi + diff --git a/debian/rules b/debian/rules index 02065a7..6afca93 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,32 @@ minor=0 arch = $(shell dpkg --print-architecture) +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))) +INSTALL_PROGRAM += -s +endif + +export CFLAGS +export LDFLAGS +export INSTALL +export INSTALL_FILE +export INSTALL_PROGRAM +export INSTALL_SCRIPT +export INSTALL_DIR + + build: $(MAKE) prefix=/usr @@ -43,25 +69,25 @@ binary-indep: checkroot build # made here. lab=libauthbind.so.$(major).$(minor) -udp=debian/tmp/usr/doc/$(package) +udp=debian/tmp/usr/share/doc/$(package) 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),man} + debian/tmp/usr/{bin,lib/$(package),share/man} $(MAKE) prefix=debian/tmp/usr etc_dir=debian/tmp/etc/authbind \ - man_dir=debian/tmp/usr/man install install_man - install -g root -o root -m 644 debian/changelog $(udp)/changelog.Debian - gzip -9 debian/tmp/usr/man/man*/* $(udp)/* - install -g root -o root -m 644 debian/copyright $(udp)/. - install -g root -o root -m 755 debian/postrm debian/tmp/DEBIAN + man_dir=debian/tmp/usr/share/man install install_man + $(INSTALL_FILE) debian/changelog $(udp)/changelog + gzip -9 debian/tmp/usr/share/man/man*/* $(udp)/* + $(INSTALL_FILE) debian/copyright $(udp)/. + $(INSTALL_SCRIPT) debian/{postrm,prerm,postinst} debian/tmp/DEBIAN ifneq ($(arch),alpha) - install -g root -o root -m 644 debian/shlibs debian/tmp/DEBIAN + $(INSTALL_FILE) debian/shlibs debian/tmp/DEBIAN else - install -g root -o root -m 644 debian/shlibs.alpha debian/tmp/DEBIAN/shlibs + $(INSTALL_FILE) debian/shlibs.alpha debian/tmp/DEBIAN/shlibs endif dpkg-shlibdeps ./authbind - dpkg-gencontrol + dpkg-gencontrol -isp chown -R root.root debian/tmp chmod -R g-ws debian/tmp dpkg --build debian/tmp .. -- 2.30.2