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
|
#!/usr/bin/make -f
package = update
build:
$(checkdir)
$(MAKE) CFLAGS="-DRESTRICT_TO_ROOT=0"
touch build
clean:
$(checkdir)
rm -f build
$(MAKE) -i clean
rm -rf *~ debian/{tmp,*~,files*,substvars}
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp/{DEBIAN,sbin,usr/share/{doc/$(package),man/man8}}
$(MAKE) BINDIR=debian/tmp/sbin MANDIR=debian/tmp/usr/share/man/man8 install
install -m644 debian/copyright debian/tmp/usr/share/doc/$(package)/
install -m644 debian/changelog \
debian/tmp/usr/share/doc/$(package)/changelog.Debian
gzip -9 debian/tmp/usr/share/{man/man8/*,doc/$(package)/changelog.Debian}
install -m755 debian/{postinst,prerm} debian/tmp/DEBIAN/
dpkg-shlibdeps update
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R +r,+X,g-ws,a-ws,u+w debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f $(package).c -a -f debian/rules
endef
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|