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
|
#!/usr/bin/make -f
build: build-stamp
build-stamp:
if [ ! -d ./debian ]; then echo "Wrong place!"; exit 1; fi
touch build-stamp
clean:
if [ ! -d ./debian ]; then echo "Wrong place!"; exit 1; fi
if [ "$$EUID" != "0" ]; then echo "Must be root!"; exit 1; fi
rm -rf ./debian/tmp
rm -f ./debian/files
rm -f build-stamp
install: build
if [ ! -d ./debian ]; then echo "Wrong place!"; exit 1; fi
if [ "$$EUID" != "0" ]; then echo "Must be root!"; exit 1; fi
rm -rf ./debian/files
mkdir -p ./debian/tmp/DEBIAN
mkdir -p ./debian/tmp/usr/share/doc/sgmltools-2
cp ./debian/copyright ./debian/tmp/usr/share/doc/sgmltools-2/
gzip -9 -c README >./debian/tmp/usr/share/doc/sgmltools-2/README.gz
gzip -9 -c ./debian/changelog \
> ./debian/tmp/usr/share/doc/sgmltools-2/changelog.Debian.gz
cp ./debian/control ./debian/tmp/DEBIAN
cp ./debian/postinst ./debian/tmp/DEBIAN
cp ./debian/prerm ./debian/tmp/DEBIAN
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
chown -R root.root ./debian/tmp/
find ./debian/tmp -type f |xargs chmod 644
chmod 755 ./debian/tmp/DEBIAN/postinst
chmod 755 ./debian/tmp/DEBIAN/prerm
find ./debian/tmp -type d |xargs chmod 755
dpkg-gencontrol -isp
dpkg-deb -b ./debian/tmp ../
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|