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
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#UPSTREAM_VER=140201
#UPSTREAM_URL=http://pogostick.net/~pnh/ntpasswd
#UPSTREAM_FILE=chntpw-source-$(UPSTREAM_VER).zip
#PACKNAME=chntpw
#DEBIAN_VER=1.0
#UNPACK_DIR=$(PACKNAME)-$(DEBIAN_VER).orig
#EXTRACT_DIR=/tmp
#update-docs:
# for file in faq.html bootdisk.html syskey.txt regedit.txt ; do \
# wget -q -O $$file $(UPSTREAM_URL)/$$file; \
# done
# get-orig-source target was removed in policy 4.1.4
# if there will be new version with files to exclude repack it using new method
# https://wiki.debian.org/Repacking
#get-orig-source:
# wget -O $(UPSTREAM_FILE) $(UPSTREAM_URL)/$(UPSTREAM_FILE)
# -rm -rf chntpw-$(UPSTREAM_VER) $(UNPACK_DIR)
# unzip $(UPSTREAM_FILE)
# mv chntpw-$(UPSTREAM_VER) $(UNPACK_DIR)
# # Some binary files are statically linked with OpenSSL, therefore not distributable
# # Upstream has been notified, no response yet
# rm -f $(UNPACK_DIR)/*.static
# tar zcf $(PACKNAME)_$(DEBIAN_VER).orig.tar.gz $(UNPACK_DIR)
# rm -rf $(UNPACK_DIR) $(UPSTREAM_FILE)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS = -DUSELIBGCRYPT -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
%:
dh $@
override_dh_auto_build:
dh_auto_build -- CFLAGS="$(CFLAGS)"
override_dh_installdocs:
dh_installdocs
# Do not install the documentation until available
[ ! -f faq.uu ] || for i in *.uu; do uudecode $$i; done
[ ! -f faq.html ] || dh_installdocs faq.html bootdisk.html *.gif
override_dh_installman:
dh_installman debian/chntpw.8 debian/samusrgrp.8 debian/reged.8 debian/sampasswd.8 debian/samunlock.8
override_dh_installchangelogs:
dh_installchangelogs HISTORY.txt
|