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
|
#!/usr/bin/make -f
# Use quilt to manage patches.
include /usr/share/quilt/quilt.make
UPSTREAM = jzip21-10oct2000.zip
VERSION = $(shell dpkg-parsechangelog | \
sed -ne 's/^Version: *\([0-9]\+:\)*//p')
UPSTREAM_VERSION = $(shell echo $(VERSION) | \
sed 's/-[^-]\+$$//')
SRCDIR = jzip
CC=gcc
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
$(QUILT_STAMPFN): unpack-stamp
unpack: unpack-stamp
unpack-stamp:
dh_testdir
[ -d $(SRCDIR) ] || mkdir $(SRCDIR)
cd $(SRCDIR) && unzip ../$(UPSTREAM)
touch $@
clean: unpatch
dh_testdir
dh_testroot
$(RM) -r $(SRCDIR)
dh_clean build-stamp install-stamp unpack-stamp
build: build-stamp
build-stamp: $(QUILT_STAMPFN)
dh_testdir
$(MAKE) -C $(SRCDIR) -f unixio.mak \
CC=$(CC) OPTIMIZE="$(CFLAGS)"
touch $@
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_installdirs
install -m 755 $(SRCDIR)/jzip debian/jzip/usr/games
install -m 755 $(SRCDIR)/jzexe debian/jzip/usr/games
install -m 755 $(SRCDIR)/ckifzs debian/jzip/usr/games
touch $@
binary: binary-arch
binary-indep:
binary-arch: install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs jzip/doc/History.txt
dh_installman
dh_compress
dh_strip
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
ORIGDIR = jzip-$(UPSTREAM_VERSION).orig
ORIGURL = http://ifarchive.heanet.ie/if-archive/infocom/interpreters/zip/$(UPSTREAM)
# for manual invocation only.
get-orig-source:
mkdir $(ORIGDIR) && \
wget -O $(ORIGDIR)/$(UPSTREAM) $(ORIGURL) && \
touch -r $(ORIGDIR)/$(UPSTREAM) $(ORIGDIR) && \
GZIP=-9 tar zcf `echo $(ORIGDIR)|sed s/-/_/`.tar.gz $(ORIGDIR) && \
$(RM) -r $(ORIGDIR)
.PHONY: get-orig-source unpack clean build install binary binary-indep binary-arch
|