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
|
#!/usr/bin/make -f
STRIP =strip
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP =: nostrip
endif
DIR=$(shell pwd)/debian/tinydyndns
patch: deb-checkdir patch-stamp
patch-stamp:
for i in `ls -1 debian/diff/*.diff || :`; do \
patch -p1 <$$i || exit 1; \
done
touch patch-stamp
build: deb-checkdir build-stamp
build-stamp: patch-stamp
test -r conf-home'{orig}' || cp -f conf-home conf-home'{orig}'
echo /usr >conf-home
test -r conf-cc'{orig}' || cp conf-cc conf-cc'{orig}'
echo 'gcc -O2 -g -include /usr/include/errno.h' >conf-cc
$(MAKE)
touch build-stamp
clean: deb-checkdir deb-checkuid
test ! -e patch-stamp || \
for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
$(MAKE) clean
rm -f patch-stamp build-stamp
rm -rf '$(DIR)'
rm -f debian/files debian/substvars changelog
test ! -r conf-home'{orig}' || mv -f conf-home'{orig}' conf-home
test ! -r conf-cc'{orig}' || mv conf-cc'{orig}' conf-cc
install: deb-checkdir deb-checkuid build-stamp
rm -rf '$(DIR)'
# programs
install -d -m0755 '$(DIR)'/usr/bin
for i in tinydyndns-data tinydyndns-update; do \
install -m0755 $$i '$(DIR)'/usr/bin/$$i && \
$(STRIP) -R .comment -R .note '$(DIR)'/usr/bin/$$i || exit 1; \
done
install -m0755 tinydyndns-conf '$(DIR)'/usr/bin/tinydyndns-conf
# man pages
install -d -m0755 '$(DIR)'/usr/share/man/man8
for i in *.8; do \
install -m0644 $$i '$(DIR)'/usr/share/man/man8/ && \
gzip -9 '$(DIR)'/usr/share/man/man8/$${i##*/} || exit 1; \
done
# changelog
rm -f changelog && ln -s package/CHANGES changelog
binary-indep:
binary-arch: install tinydyndns.deb
dpkg-shlibdeps '$(DIR)'/usr/bin/*
dpkg-gencontrol -isp -ptinydyndns -P'$(DIR)'
dpkg -b '$(DIR)' ..
binary: binary-indep binary-arch
.PHONY: patch build clean install binary-indep binary-arch binary
include debian/implicit
|