mkvtoolnix/packaging/debian/rules.erb

76 lines
2.3 KiB
Plaintext
Raw Normal View History

2003-04-21 15:40:58 +00:00
#!/usr/bin/make -f
.PHONY: override_dh_clean override_dh_auto_configure override_dh_auto_build override_dh_install override_dh_strip override_dh_installchangelogs override_dh_builddeb
LDFLAGS += -Wl,-z,defs -Wl,--as-needed
2003-04-21 15:40:58 +00:00
2014-12-12 20:02:10 +00:00
# uncomment line to turn verbose mode on
#export V=1
%:
dh $@ --parallel
2003-04-21 15:40:58 +00:00
override_dh_clean:
2022-04-11 19:39:49 +00:00
[ ! -f build-config ] || ./drake clean:dist
2018-01-07 11:41:49 +00:00
dh_clean config.status config.log \
rake.d/dependecy.d/*.rb src/input/*.d config.h build-config
2017-04-21 14:35:43 +00:00
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
rm -rf lib/gtest
endif
override_dh_auto_configure:
2017-04-21 14:35:43 +00:00
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
mkdir -p lib/gtest
cp -R /usr/include/gtest lib/gtest/
mv lib/gtest/gtest lib/gtest/include
cp -R /usr/src/gtest/src lib/gtest/
endif
2023-04-06 22:02:20 +00:00
<% if (distro == 'debian') and (version >= Gem::Version.new('11')) and (version < Gem::Version.new('12')) %>
# gcc 10 in Debian 11 Bullseye contains a bug that causes an
# "internal compiler error" segfault. Workaround: compile with
# clang.
# Additionally the version of the fmt library in Debian 11 on at least
# armhf has a bug with a simple format such as fmt::format("{}",
# fmt::join(range, separator)). Therefore build with the internal
# copy.
dh_auto_configure -- CC=/usr/bin/clang CXX=/usr/bin/clang++ \
--docdir='$${datarootdir}/doc/mkvtoolnix-gui' \
--enable-debug --enable-optimization
perl -pi -e 's/FMT_INTERNAL *=.*/FMT_INTERNAL = yes/' build-config
<% else %>
dh_auto_configure -- --docdir='$${datarootdir}/doc/mkvtoolnix-gui' \
--enable-debug --enable-optimization
<% end %>
override_dh_auto_build:
2017-04-21 14:35:43 +00:00
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
2022-04-11 19:39:49 +00:00
LC_ALL=C ./drake tests:run_unit
2017-04-21 14:35:43 +00:00
endif
2022-04-11 19:39:49 +00:00
./drake
override_dh_install:
2022-04-11 19:39:49 +00:00
./drake install DESTDIR=$(CURDIR)/debian/tmp
install -m 755 -t $(CURDIR)/debian/tmp/usr/bin $(patsubst %,src/tools/%,bluray_dump ebml_validator hevcc_dump xyzvc_dump)
dh_install -Xorg.bunkus.mkvtoolnix-gui.xml
dh_missing --fail-missing -Xorg.bunkus.mkvtoolnix-gui.xml
override_dh_strip:
dh_strip -pmkvtoolnix --dbg-package=mkvtoolnix-dbg
dh_strip -pmkvtoolnix-gui --dbg-package=mkvtoolnix-gui-dbg
override_dh_installchangelogs:
dh_installchangelogs NEWS.md
override_dh_builddeb:
case $(shell uname -m) in \
i*86) dh_builddeb -- -Zxz ;; \
*) dh_builddeb -- -Zxz -z9 ;; \
esac