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
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export QT_SELECT = 5
_DEBIAN_VERSION=$(shell dpkg-parsechangelog | grep '^Version: .*' | grep -o ' .*' | grep -o '[0-9].*')
_VERSION=$(shell echo $(_DEBIAN_VERSION) | cut -d- -f 1)
_PKGNAME=$(shell dpkg-parsechangelog | head -n 1 | cut -d ' ' -f 2)
JAVA_HOME=/usr/lib/jvm/default-java
CLASSPATH=.
# main packaging script based on dh7 syntax
%:
dh $@ --with javahelper
# update translation files before build
override_dh_auto_build:
lrelease NixNote2.pro
dh_auto_build
# build java jar file from source, discard upstream jar file
override_jh_build:
jh_build -N --main=cx.fbn.encrypt.Crypto --javacopts="-source 1.6 -target 1.6"
# handle changelog.txt manually since dh_installchangelogs won't do
# that automatically
override_dh_installchangelogs:
dh_installchangelogs changelog.txt
override_dh_clean:
dh_clean install translations/*.qm
# pdf document really don't need compression
override_dh_compress:
dh_compress -X.pdf
# upstream qmake instruction is really poor,
# handle install manually using *.install file
override_dh_auto_install:
# never install ts translation file
override_dh_install:
dh_install -X*.ts
# replace __VERSION__ placeholder with source version name
override_dh_installdocs:
dh_installdocs
find debian/$(_PKGNAME)/ -type f -exec sed -i 's/__VERSION__/$(_VERSION)/g' {} + || true
|