midori/debian/rules
Sergio Durigan Junior 7fa139b241 Revamp build system (use cmake instead of waf)
- Update debian/rules, removing old stuff (from waf) and adding new,
  simpler rules for the cmake-based build.

- Update debian/control, listing the new package maintainer and
  reviewed dependencies.

- Delete debian/waf-unpack file.

- Rename debian/config/{Debian,Ubuntu}.h files to
  debian/config/{Debian,Ubuntu}.conf.

With this change, it is now unnecessary to create a DFSG-modified
version of the package, because Waf is not used as the build system
anymore (for more details, see Bug 645191).

It is possible to build the package now, but it still has some lintian
warnings that will be fixed in the following changes.

Closes: #663185
Closes: #758103
Closes: #787878
2015-09-15 12:00:58 -04:00

58 lines
1.8 KiB
Makefile
Executable file

#!/usr/bin/make -f
# output every command that modifies files on the build system.
#DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# Necessary for the configuration file (xdg).
DISTRO = $(shell lsb_release -is)
CONFIG_FILE = debian/config/$(DISTRO).conf
ifneq (0, $(shell test -f $(CONFIG_FILE); echo "$$?"))
DISTRO = Debian
endif
%:
dh $@ --buildsystem=cmake --builddirectory=_build/
# Midori uses a "poor man's configure" which only accepts a minimal,
# pre-defined set of flags. Therefore, we invoke cmake directly here.
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
..
# cmake does not emit useful information when compiling the source
# files. We use VERBOSE here for that.
override_dh_auto_build:
dh_auto_build -- VERBOSE=1
# We have to override 'make check' because it needs to run under
# xvfb-run. And some tests still fail.
override_dh_auto_test:
(cd _build && xvfb-run make check) || true
override_dh_auto_install:
dh_auto_install
rm -f debian/tmp/usr/share/doc/midori/COPYING debian/tmp/usr/share/doc/midori/TRANSLATE
install -m 0644 debian/$(DISTRO)-config debian/tmp/etc/xdg/midori/config
# Generate the debuginfo package.
override_dh_strip:
dh_strip --dbg-package=midori-dbg
# Updating the alternatives priority
PRIORITY = $(shell sed -ne 's/^DEBIAN_WWW_ALTERNATIVES_PRIORITY \([0-9]\+\)/\1/p' $(CONFIG_FILE))
debian/midori.postinst: debian/midori.postinst.base
sed 's/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g' debian/midori.postinst.base > debian/midori.postinst
override_dh_installdeb: debian/midori.postinst
dh_installdeb
override_dh_installchangelogs:
rm -f debian/midori/usr/share/doc/midori/ChangeLog
dh_installchangelogs