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 67 68 69 70 71 72 73 74
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
export QT_SELECT=qt5
DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
UPSTREAM_VERSION=$(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog \
| sed -rne 's,^Version: ([^-+]+).*,\1,p')
%:
dh ${@} --parallel
get-orig-source:
uscan --noconf --download --force-download --rename --destdir=. \
--package texstudio --watchfile $(DEBIAN_DIR)/watch \
--upstream-version=$(UPSTREAM_VERSION)
mkdir tmp-source
tar xzf texstudio_$(UPSTREAM_VERSION).orig.tar.gz -C tmp-source
rm -f texstudio_$(UPSTREAM_VERSION).orig.tar.gz
tar cJf texstudio_$(UPSTREAM_VERSION)+debian.orig.tar.xz -C tmp-source \
--exclude="texstudio$(UPSTREAM_VERSION)/debian" \
--exclude="texstudio$(UPSTREAM_VERSION)/hunspell" \
--exclude="texstudio$(UPSTREAM_VERSION)/pdfviewer/include_win32" \
--exclude="texstudio$(UPSTREAM_VERSION)/pdfviewer/include_win32_qt5" \
--exclude="texstudio$(UPSTREAM_VERSION)/qt_*.qm" \
--exclude="texstudio$(UPSTREAM_VERSION)/qt_*.ts" \
--exclude="texstudio$(UPSTREAM_VERSION)/quazip" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/dictionaries/*.aff" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/dictionaries/*.dic" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/dictionaries/th_*_v2.dat" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/dictionaries/README_*.txt" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/dictionaries/README_*.TXT" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/TexTablet" \
--exclude="texstudio$(UPSTREAM_VERSION)/utilities/poppler-data" \
.
rm -rf tmp-source
override_dh_auto_configure:
dh_auto_configure -- NO_TESTS=1 NO_CRASH_HANDLER=1 USE_SYSTEM_HUNSPELL=1 USE_SYSTEM_QUAZIP=1
override_dh_auto_install:
dh_auto_install
# change AUTHORS file to CREDITS
tail -n +2 debian/tmp/usr/share/texstudio/AUTHORS > \
debian/tmp/usr/share/texstudio/CREDITS
# moving and renaming icons
for SIZE in 16x16 22x22 32x32 48x48 64x64 128x128 ; do \
mkdir -p debian/tmp/usr/share/icons/hicolor/$$SIZE/apps ; \
mv -f debian/tmp/usr/share/texstudio/texstudio$$SIZE.png \
debian/tmp/usr/share/icons/hicolor/$$SIZE/apps/texstudio.png ; \
done
# removing useless files
rm -f debian/tmp/usr/share/texstudio/CHANGELOG.txt
rm -f debian/tmp/usr/share/texstudio/COPYING
rm -f debian/tmp/usr/share/texstudio/AUTHORS
override_dh_builddeb:
dh_builddeb -- -Zxz
override_dh_compress:
dh_compress -X.html -X.css -X.png
override_dh_install:
dh_install --fail-missing
override_dh_installchangelogs:
dh_installchangelogs utilities/manual/CHANGELOG.txt
override_dh_strip:
dh_strip --dbg-package=texstudio-dbg
|