X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=debian%2Frules;h=6afca930584fe310f604539bc8657bac259f0d15;hb=0765c90cf3de5e569f6961b02dcd6cec582a1784;hp=a951d23f607b3ee51b4edc3c9c2ba91ab919008e;hpb=d152dbf5e88223fa740808da9fbfbf5bb301ecfa;p=authbind.git diff --git a/debian/rules b/debian/rules index a951d23..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 @@ -37,31 +63,31 @@ clean: rm -f debian/*~ debian/#*# debian/core debian/*.bak binary-indep: checkroot build - $(checkdir) + $(checkdir) # There are no architecture-independent files to be uploaded # generated by this package. If there were any they would be # 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/copyright $(udp)/. - 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 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 ..