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
|
#!/usr/bin/make -f
package=felt
DESTDIR=`pwd`/debian/tmp
SHELL=/bin/bash
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq ($(ARCH),hppa)
FLAGS=-O3 -g
else
FLAGS=-O2 -g
endif
build: stamp-build
stamp-build:
$(checkdir)
CFLAGS="${FLAGS}" ./configure --prefix=/usr --x-defaults=/etc/X11/app-defaults
-rm -f `find . \( -name 'parser.c' -o -name 'lexer.c' \) -print`
make
touch stamp-build
clean:
$(checkdir)
-rm -f stamp-build
-make clobber
-rm -f `find . \( -name '*~' -o -name '*.bak' \) -print`
-rm -rf debian/tmp* debian/files* core debian/substvars*
binary-indep: checkroot build
$(checkdir)
-rm -rf debian/tmp-doc
install -d -m755 debian/tmp-doc/usr/share/doc/$(package)-doc debian/tmp-doc/DEBIAN
gzip -c9 felt.ps > debian/tmp-doc/usr/share/doc/$(package)-doc/felt.ps.gz
gzip -c9 debian/changelog > debian/tmp-doc/usr/share/doc/$(package)-doc/changelog.Debian.gz
cp debian/copyright debian/tmp-doc/usr/share/doc/$(package)-doc
dpkg-gencontrol -isp -p$(package)-doc -Pdebian/tmp-doc
chmod 755 debian/md5_sums
debian/md5_sums tmp-doc
dpkg --build debian/tmp-doc ..
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d -m755 debian/tmp/usr/share/doc/$(package) debian/tmp/DEBIAN
install -m 755 debian/postinst debian/tmp/DEBIAN/postinst
install -m 755 debian/postrm debian/tmp/DEBIAN/postrm
install -m 644 debian/conffiles debian/tmp/DEBIAN/conffiles
cp FAQ REA* TODO debian/tmp/usr/share/doc/$(package)
cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog
cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
gzip -9f debian/tmp/usr/share/doc/$(package)/*
cp debian/copyright debian/tmp/usr/share/doc/$(package)
install -d -m755 debian/tmp/etc/X11/app-defaults
install -d -m755 debian/tmp/usr/share/doc/$(package)/examples/{Burlap,Corduroy}
./configure --prefix=$(DESTDIR)/usr --x-defaults=$(DESTDIR)/etc/X11/app-defaults
make install
strip --strip-all --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/*
mv -v debian/tmp/etc/X11/app-defaults/Velvet.ad debian/tmp/etc/X11/app-defaults/Velvet
mv -v debian/tmp/usr/man debian/tmp/usr/share/
install -m 644 debian/loom.1 debian/tmp/usr/share/man/man1
gzip -9f debian/tmp/usr/share/man/{man1,man3,man4}/*
cp src/Burlap/Examples/* debian/tmp/usr/share/doc/$(package)/examples/Burlap/
cp src/Corduroy/Examples/* debian/tmp/usr/share/doc/$(package)/examples/Corduroy/
cp examples/* debian/tmp/usr/share/doc/$(package)/examples/
rm -f debian/tmp/usr/share/doc/felt/examples/Corduroy/test.flt
install -d -m755 debian/tmp/usr/lib/menu
cp debian/menu debian/tmp/usr/lib/menu/felt
dpkg-shlibdeps debian/tmp/usr/bin/*
dpkg-gencontrol -isp -p$(package) -Pdebian/tmp
chown -R root.root debian/tmp*
chmod -R go=rX debian/tmp*
chmod 755 debian/md5_sums
debian/md5_sums 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
|