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
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=linpopup
topdir=$(shell pwd)
build:
$(checkdir)
# save these to minimize the diff; doesn't make any difference
rm -f debian/LinPopUp.1.in debian/LinPopUp.1 debian/INSTALL debian/MANUAL
cp extra/LinPopUp.1.in debian/.
[ -f LinPopUp.1 ] && cp LinPopUp.1 debian/. || true
cp INSTALL debian/.
cp MANUAL debian/.
cd extra; ln -s LinPopUp.1.in linpopup.1.in
cd extra; ln -s LinPopUp.pod linpopup.pod
# first initialize the documentation to reflect the debian location of stuff
cd src; make CFLAGS="-O2 -g -Wall" DESTDIR=/usr PROGNAME=linpopup DOC_DIR=/usr/share/doc/linpopup linpopup docs
touch build
# restore these to minimize the diff
rm -f extra/LinPopUp.1.in LinPopUp.1 INSTALL MANUAL
mv debian/LinPopUp.1.in extra/.
[ -f debian/LinPopUp.1 ] && mv debian/LinPopUp.1 . || true
mv debian/INSTALL .
mv debian/MANUAL .
clean:
$(checkdir)
-rm -f build
-cd src; make clean PROGNAME=linpopup
-rm -f src/LinPopUp
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core debian/substvars
-rm -f extra/linpopup.1.in extra/linpopup.pod linpopup.1
debconf-updatepo
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp
cd debian/tmp && install -d `cat ../dirs`
cd src; make install \
PROGNAME=linpopup \
PROGNAME_LNK=LinPopUp \
DESTDIR=$(topdir)/debian/tmp/usr \
DOC_DIR=$(topdir)/debian/tmp/usr/share/doc/linpopup \
INSTALL_MANPATH=$(topdir)/debian/tmp/usr/share/man \
DATA_DIR=$(topdir)/debian/tmp/var/lib/linpopup
rm -f debian/tmp/usr/share/doc/linpopup/COPYING
mv debian/tmp/usr/share/doc/linpopup/ChangeLog debian/tmp/usr/share/doc/linpopup/changelog
install -m 644 debian/linpopup.xpm debian/tmp/usr/share/pixmaps
install -m 644 debian/linpopup-small.xpm debian/tmp/usr/share/pixmaps
install -m 644 debian/smb.conf debian/tmp/usr/share/doc/linpopup/examples/smb.conf
# Must have debmake installed for this to work.
debstd -s
# install -m 644 -o root -g root debian/linpopup.templates debian/tmp/DEBIAN/templates
po2debconf debian/linpopup.templates > debian/tmp/DEBIAN/templates
install -m 755 -o root -g root debian/linpopup.config debian/tmp/DEBIAN/config
cd debian/tmp; \
find . -type f ! -regex "./DEBIAN/.*" -print0 | \
xargs -0 md5sum | sed -e '/\.\//s///' > DEBIAN/md5sums;\
chmod 644 DEBIAN/md5sums
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f debian/rules
endef
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
# vim:set noet:
|