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 75 76 77 78 79 80 81 82
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
QM_FILES := $(patsubst %.ts, %.qm, $(wildcard src/shell/data/translations/*.ts))
%:
dh $@
override_dh_auto_clean:
# remove pre-generated binaries; the following is intentional:
# trick lintian and always use Makefile.common to clean generated files.
-true && $(MAKE) -f Makefile.common confclean
$(RM) -v configure.tests/*/Makefile $(QM_FILES)
dh_auto_clean
override_dh_auto_configure:
# arch-dependent patching
cat debian/patches/series.$(DEB_HOST_ARCH_OS) >> debian/patches/series \
&& $(RM) debian/patches/series.$(DEB_HOST_ARCH_OS) \
&& dh_quilt_patch || true
# override qonf/defaults.rb
ruby configure.rb \
--prefix=/usr \
--bindir=/usr/lib/tupi/bin \
--libdir=/usr/lib/tupi \
--sharedir=/usr/share/tupi \
--includedir=/usr/include/tupi
# force qmake-generated Makefiles to respect dpkg-provided flags and don't strip
perl -0pi -e 's[(CXXFLAGS\s*=)][$$1 $$ENV{CFLAGS} $$ENV{CPPFLAGS}]; \
s[(LFLAGS\s*=)][$$1 -Wl,--as-needed $$ENV{LDFLAGS}]; \
s[(CFLAGS\s*=)][$$1 $$ENV{CFLAGS} $$ENV{CPPFLAGS}]; \
s[(STRIP\s*=)\s*\w+][$$1 true];' \
$$(find . -name Makefile)
## libav9 and older: ugly override for upstream libav detection:
## FTBFS: "WARNING: Failure to find: tffmpegmoviegenerator.cpp"
## https://github.com/xtingray/tupi/issues/2
## remove "pkg-config" fron Build-Depends when this will not be needed.
dpkg --compare-versions $$(pkg-config --modversion libavcodec) lt 54.35.0 \
&& cp -v src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.old.cpp \
src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp \
|| cp -v src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.debian.cpp \
src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
$(QM_FILES):
# rebuild translations
lupdate tupi.pro -locations none -silent -ts $(@:.qm=.ts)
lrelease $(@:.qm=.ts)
override_dh_auto_build: $(QM_FILES)
convert -monitor launcher/icons/tupi_32x32.png debian/tupi_32x32.xpm
cd src/components/help/man && gzip -9 -c tupi.man > tupi.1.gz
dh_auto_build
override_dh_install:
dh_install
# De-duplication (http://wiki.debian.org/dedup.debian.net):
rdfind -outputname /dev/null -makesymlinks true debian/tupi-data
symlinks -rsc debian/tupi-data
PDIR := $(CURDIR)/debian/tupi
override_dh_shlibdeps:
LD_LIBRARY_PATH="$(PDIR)/usr/lib/tupi:$(PDIR)/usr/lib/tupi/plugins:$(LD_LIBRARY_PATH)" dh_shlibdeps
override_dh_makeshlibs:
dh_makeshlibs --noscripts
override_dh_strip:
dh_strip -v --dbg-package=tupi-dbg
override_dh_builddeb:
dh_builddeb -- -Zxz
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.]+)}')
.PHONY: get-orig-source
get-orig-source:
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
|