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
|
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-\+]+)+(\+dfsg)*.*,\1,p')
include /usr/share/cli-common/cli.make
%:
dh $@
get-orig-source:
uscan --force-download --destdir=. --download-version=$(DEB_UPSTREAM_VERSION)
rm -rf keepass2-$(DEB_UPSTREAM_VERSION)/
unzip KeePass-$(DEB_UPSTREAM_VERSION)-Source.zip -d keepass2-$(DEB_UPSTREAM_VERSION)
find keepass2-$(DEB_UPSTREAM_VERSION)/ -name B16x16_Imp_*png | grep -v KeePassX | xargs rm -f
find keepass2-$(DEB_UPSTREAM_VERSION)/ -name "*dll" -delete
tar cfz keepass2_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz keepass2-$(DEB_UPSTREAM_VERSION)/
rm -rf keepass2-$(DEB_UPSTREAM_VERSION)/
override_dh_auto_clean:
rm -rf KeePass/obj
rm -rf Build/KeePass/
rm -f debian/keepass2.png
# remove files created by archmage
rm -f Docs/arch_contents.html Docs/arch_frameset.html \
Docs/arch_header.html Docs/index.html Docs/arch_css.css
rm -rf Docs/icons
dh_auto_clean
override_dh_auto_build:
#mdtool build -c:Release -p:KeePass
xbuild /target:KeePass /property:Configuration=Release
# build an index from the raw chm source
python -c 'import archmod.CHM; archmod.CHM.CHMDir("Docs").process_templates("Docs/Chm")'
override_dh_install:
convert $(CURDIR)/KeePass/Resources/Images/KeePass.ico keepass2.png
mkdir -p $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/16x16/apps
mv keepass2-8.png $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/16x16/apps/keepass2.png
mkdir -p $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/32x32/apps
mv keepass2-7.png $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/32x32/apps/keepass2.png
mkdir -p $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/48x48/apps
mv keepass2-6.png $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/48x48/apps/keepass2.png
mkdir -p $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/256x256/apps
mv keepass2-5.png $(CURDIR)/debian/keepass2/usr/share/icons/hicolor/256x256/apps/keepass2.png
rm -f keepass2*.png
dh_install
mv $(CURDIR)/debian/keepass2/usr/bin/keepass2.sh $(CURDIR)/debian/keepass2/usr/bin/keepass2
override_dh_installchangelogs:
dh_installchangelogs Docs/History.txt
override_dh_installdocs:
# skip signing key readme
dh_installdocs -pkeepass2 -XReadMe_PFX.txt
dh_installdocs -pkeepass2-doc -XReadMe_PFX.txt --link-doc=keepass2
override_dh_clideps:
dh_clideps --exclude-moduleref=KeePassLibC32.dll --exclude-moduleref=KeePassLibC64.dll\
--exclude-moduleref=ShlWApi.dll --exclude-moduleref=Kernel32.dll \
--exclude-moduleref=User32.dll --exclude-moduleref=ComCtl32.dll \
--exclude-moduleref=ComCtl32.dll --exclude-moduleref=UxTheme.dll \
--exclude-moduleref=Shell32.dll --exclude-moduleref=DwmApi.dll \
--exclude-moduleref=Imm32.dll --exclude-moduleref=WinMM.dll
|