| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
#export DH_VERBOSE=1 |
| 5 |
|
| 6 |
#UPSTREAM_VER=140201 |
| 7 |
#UPSTREAM_URL=http://pogostick.net/~pnh/ntpasswd |
| 8 |
#UPSTREAM_FILE=chntpw-source-$(UPSTREAM_VER).zip |
| 9 |
#PACKNAME=chntpw |
| 10 |
#DEBIAN_VER=1.0 |
| 11 |
#UNPACK_DIR=$(PACKNAME)-$(DEBIAN_VER).orig |
| 12 |
#EXTRACT_DIR=/tmp |
| 13 |
|
| 14 |
#update-docs: |
| 15 |
# for file in faq.html bootdisk.html syskey.txt regedit.txt ; do \ |
| 16 |
# wget -q -O $$file $(UPSTREAM_URL)/$$file; \ |
| 17 |
# done |
| 18 |
|
| 19 |
# get-orig-source target was removed in policy 4.1.4 |
| 20 |
# if there will be new version with files to exclude repack it using new method |
| 21 |
# https://wiki.debian.org/Repacking |
| 22 |
|
| 23 |
#get-orig-source: |
| 24 |
# wget -O $(UPSTREAM_FILE) $(UPSTREAM_URL)/$(UPSTREAM_FILE) |
| 25 |
# -rm -rf chntpw-$(UPSTREAM_VER) $(UNPACK_DIR) |
| 26 |
# unzip $(UPSTREAM_FILE) |
| 27 |
# mv chntpw-$(UPSTREAM_VER) $(UNPACK_DIR) |
| 28 |
# # Some binary files are statically linked with OpenSSL, therefore not distributable |
| 29 |
# # Upstream has been notified, no response yet |
| 30 |
# rm -f $(UNPACK_DIR)/*.static |
| 31 |
# tar zcf $(PACKNAME)_$(DEBIAN_VER).orig.tar.gz $(UNPACK_DIR) |
| 32 |
# rm -rf $(UNPACK_DIR) $(UPSTREAM_FILE) |
| 33 |
|
| 34 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 35 |
include /usr/share/dpkg/buildflags.mk |
| 36 |
|
| 37 |
CFLAGS = -DUSELIBGCRYPT -Wall |
| 38 |
|
| 39 |
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
| 40 |
CFLAGS += -g |
| 41 |
endif |
| 42 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 43 |
CFLAGS += -O0 |
| 44 |
else |
| 45 |
CFLAGS += -O2 |
| 46 |
endif |
| 47 |
|
| 48 |
%: |
| 49 |
dh $@ |
| 50 |
|
| 51 |
override_dh_auto_build: |
| 52 |
dh_auto_build -- CFLAGS="$(CFLAGS)" |
| 53 |
|
| 54 |
override_dh_installdocs: |
| 55 |
dh_installdocs |
| 56 |
# Do not install the documentation until available |
| 57 |
[ ! -f faq.uu ] || for i in *.uu; do uudecode $$i; done |
| 58 |
[ ! -f faq.html ] || dh_installdocs faq.html bootdisk.html *.gif |
| 59 |
|
| 60 |
override_dh_installman: |
| 61 |
dh_installman debian/chntpw.8 debian/samusrgrp.8 debian/reged.8 debian/sampasswd.8 debian/samunlock.8 |
| 62 |
|
| 63 |
override_dh_installchangelogs: |
| 64 |
dh_installchangelogs HISTORY.txt |
| 65 |
|