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
|
#!/usr/bin/make -f
build: build-stamp
build-stamp:
if [ ! -d debian ]; then exit 1; fi
./configure --prefix=/usr --mandir=/usr/share/man --i18n=1
$(MAKE)
touch build-stamp
clean:
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
rm -rf build-stamp debian/rotix debian/substvars debian/files
touch Makefile.settings
-$(MAKE) distclean
install: build
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
mkdir -p debian/rotix/DEBIAN
$(MAKE) install DESTDIR=`pwd`/debian/rotix
binary-indep: build install
binary-arch: build install
if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
# Copy/compress docs
strip -R .comment -R .note debian/rotix/usr/bin/rotix
mkdir -p debian/rotix/usr/share/doc/rotix/
cp debian/copyright CREDITS README debian/rotix/usr/share/doc/rotix/
cp debian/changelog debian/rotix/usr/share/doc/rotix/changelog.Debian
cp CHANGES debian/rotix/usr/share/doc/rotix/changelog
cd debian/rotix/usr/share; \
gzip -9 doc/rotix/changelog.Debian doc/rotix/changelog man/man1/rotix.1
# Build the package
chmod +x debian/postinst debian/prerm
cp debian/postinst debian/prerm debian/rotix/DEBIAN/
cd debian/rotix; \
find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
dpkg-shlibdeps -Tdebian/substvars -dDepends debian/rotix/usr/bin/rotix
dpkg-gencontrol -ldebian/changelog -isp -protix -Tdebian/substvars -Pdebian/rotix
dpkg --build debian/rotix ..
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|