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
|
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
#export DH_VERBOSE=1
BUILDARCH = $(shell dpkg --print-architecture)
packn = atari-fdisk
packu = atari-fdisk-udeb
packc = atari-fdisk-cross
tmpn = debian/tmp
tmpu = debian/$(packu)
tmpc = debian/$(packc)
docn = $(tmpn)/usr/share/doc/$(packn)
docc = $(tmpc)/usr/share/doc/$(packc)
mann = $(tmpn)/usr/share/man
manc = $(tmpc)/usr/share/man
build:
$(checkdir)
# override cross-compiling stuff in upstream Makefile
make COMPILE_ARCH=m68k
touch build
clean:
$(checkdir)
-rm -f build
-make reallyclean
-rm -f `find . -name "*~"`
-rm -rf $(tmpn) $(tmpc) debian/files* core debian/substvars \
debian/atari-fdisk-cross.substvars
binary-indep: build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -d $(tmpn)/sbin
install -s -m 755 atari-fdisk $(tmpn)/sbin
install -d $(tmpu)/sbin
install -s -m 755 atari-fdisk $(tmpu)/sbin
install -d $(tmpc)/usr/sbin
install -s -m 755 atari-fdisk $(tmpc)/usr/sbin
dh_installdocs -p$(packn) -p$(packc) README
# install README also in cross package (not done by dh_installdocs)
install -m 644 README $(docc)
# debhelper doesn't see debian/atari-fdisk.8, so install it manually
#dh_installmanpages
install -d $(mann)/man8
install -m 644 debian/atari-fdisk.8 $(mann)/man8
install -d $(manc)/man8
install -m 644 debian/atari-fdisk.8 $(manc)/man8
dh_installchangelogs -p$(packn) -p$(packc) NEWS
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
# build native package only for m68k, cross package only for others
set -e; if [ "$(BUILDARCH)" = "m68k" ]; then \
rm -rf $(tmpu)/usr; \
dh_gencontrol -p$(packn); \
dh_gencontrol -p$(packu) -- -isp -fdebian/files~; \
else \
dh_gencontrol -p$(packc); \
fi
dh_md5sums -p$(packn) -p$(packc)
set -e; if [ "$(BUILDARCH)" = "m68k" ]; then \
dh_builddeb -p$(packn); \
version=`dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2`; \
dpkg-distaddfile $(packu)_$${version}_$(BUILDARCH).udeb debian-installer standard; \
dh_builddeb -p$(packu) --filename $(packu)_$${version}_$(BUILDARCH).udeb; \
else \
dh_builddeb -p$(packc); \
fi
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|