You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/ubuntu/_base/applications/multimedia/k3b/debian/rules

63 lines
1.7 KiB

#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
include debian/cdbs/debian-tde.mk
DEB_TIME64_API = $(shell echo | cc $(dpkg-buildflags --get CPPFLAGS) -dM -E -x c++ - | grep -q "_TIME_BITS 64" && echo true || false)
ifeq ($(DEB_TIME64_API),true)
DEB_TIME64_SUFFIX = t64
else
DEB_TIME64_SUFFIX =
endif
DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-DCMAKE_INSTALL_PREFIX="/opt/trinity" \
-DCONFIG_INSTALL_DIR="/etc/trinity" \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE="ON" \
-DCMAKE_SKIP_RPATH="OFF" \
-DWITH_ALL_OPTIONS="ON"
post-patches::
dh_testdir
ifeq ($(DEB_TIME64_API),true)
# update library package name for TIME64 ABI
ls -d debian/* | \
grep -E "/libk3b3-trinity\." | \
grep -v "\.t64$$" | \
while read a; do \
[ -d $$a ] || [ -f $$a.t64 ] || \
(cp -a $$a debian/libk3b3$(DEB_TIME64_SUFFIX)-$${a##*-} && mv $$a $$a.t64); \
done
[ -f debian/control.t64 ] || \
sed -i.t64 \
-e "s/^Package: \\(libk3b3\\)-trinity$$/Package: \\1$(DEB_TIME64_SUFFIX)-trinity/" \
-e "s/^\\(Replaces\\|Breaks\\):\\(.*\\)\\(libk3b3-trinity\\)\\( [^,]*\|$$\)/\\1:\\2\\3/" \
-e "s/\\(libk3b3\\)-trinity (=/\\1$(DEB_TIME64_SUFFIX)-trinity (=/" \
debian/control
endif
clean::
dh_testdir
dh_clean
ifeq ($(DEB_TIME64_API),true)
# revert library package name for TIME64 ABI
ls -d debian/* | \
grep -E "\.t64$$" | \
while read a; do \
mv $$a $${a%.t64}; \
done
ls -d debian/* | \
grep -E "/libk3b3$(DEB_TIME64_SUFFIX)-" | \
xargs -r rm
[ ! -f debian/control.t64 ] || \
mv debian/control.t64 debian/control
endif