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
|
BINDIR=$(DESTDIR)/usr/games
DATADIR=$(DESTDIR)/usr/share/games/doom-package
MANDIR=$(DESTDIR)/usr/share/man
DOOM2VER=$(word 2, $(shell grep '^Version' doom2-wad/DEBIAN/control))
DOOM2DEB=doom2-wad_$(DOOM2VER)_all.deb
$(DOOM2DEB): doom2-wad/DEBIAN/md5sums fixperms
fakeroot dpkg-deb -b doom2-wad $@
doom2-wad/DEBIAN/md5sums:
cd doom2-wad && find usr/ -type f -print0 |\
xargs -0 md5sum >DEBIAN/md5sums
# necessary as dpkg-source will honour the shell's umask
fixperms:
find doom2-wad -type f -print0 | xargs -0 chmod 644
find doom2-wad -type d -print0 | xargs -0 chmod 755
chmod 755 doom2-wad/DEBIAN/postinst
chmod 755 doom2-wad/DEBIAN/prerm
install:
install -p -m 0755 make-wad-package $(BINDIR)/
install -p -m 0644 make-wad-package.6 $(MANDIR)/man6/
install -p -m 0644 doom2-wad_$(DOOM2VER)_all.deb $(DATADIR)/
clean:
rm -f $(DOOM2DEB) doom2-wad/DEBIAN/md5sums
.PHONY: clean doom2-wad/DEBIAN/md5sums fixperms
|