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
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file - for netcdf-doc
# Copyright 1997-2002 by Brian Mays
# Patterned after the hello package by Ian Jackson.
package=netcdf-doc
build:
$(checkdir)
ln -s guidec-1.html guidec/index.html
ln -s guidef-1.html guidef/index.html
makeinfo cxxdoc.tex
texi2dvi cxxdoc.tex
dvips -D 300 -o cxxdoc.ps cxxdoc.dvi
texi2html cxxdoc.tex
touch build
clean:
$(checkdir)
$(RM) build
rm -f guidec/index.html guidef/index.html
$(RM) *.aux *.cp *.dvi *.fn *.fns *.info *.ky *.log *.pg cxxdoc.ps \
*.toc *.tp *.vr *.html
$(RM) -r *~ debian/tmp debian/*~ debian/files*
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build
$(chechdir)
$(RM) -r debian/tmp
install -d debian/tmp debian/tmp/DEBIAN
install -d debian/tmp/usr/share/doc/$(package)
# Install Debian package control information files
install debian/postinst debian/prerm debian/tmp/DEBIAN/.
chmod +x debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/prerm
# Install directories
install -d debian/tmp/usr/share/doc/$(package)/guidec \
debian/tmp/usr/share/doc/$(package)/guidef \
debian/tmp/usr/share/info
install -d debian/tmp/usr/share/doc-base
# Install files
install -m644 guidec.ps guidef.ps \
debian/tmp/usr/share/doc/$(package)/.
install -m644 cxxdoc.ps debian/tmp/usr/share/doc/$(package)/.
install -m644 cxxdoc.info debian/tmp/usr/share/info/.
install -d debian/tmp/usr/share/doc-base
install -m644 debian/netcdf-doc-c debian/netcdf-doc-f \
debian/netcdf-doc-cxx debian/tmp/usr/share/doc-base/.
# Install changelog & copyright
install -m644 debian/changelog \
debian/tmp/usr/share/doc/$(package)/changelog.Debian
gzip -9v `find debian/tmp/usr/share/doc/$(package) -type f -print`
gzip -9v debian/tmp/usr/share/info/*
cp -d guidec/* debian/tmp/usr/share/doc/$(package)/guidec/.
cp -d guidef/* debian/tmp/usr/share/doc/$(package)/guidef/.
install -m644 debian/copyright debian/tmp/usr/share/doc/$(package)/.
# Genereate deb file
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
dpkg-deb --build debian/tmp ..
define checkdir
test -f guidec.ps -a -f debian/rules
endef
# Below here is fairly generic really
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
|