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
This commit is contained in:
parent
a84927af41
commit
7fa139b241
8 changed files with 63 additions and 150 deletions
1
debian/clean
vendored
1
debian/clean
vendored
|
@ -1,3 +1,2 @@
|
||||||
midori/midori-debian.h
|
midori/midori-debian.h
|
||||||
debian/midori.postinst
|
debian/midori.postinst
|
||||||
debian/presubj
|
|
||||||
|
|
2
debian/config/Debian.conf
vendored
Normal file
2
debian/config/Debian.conf
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
|
||||||
|
DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
|
3
debian/config/Debian.h
vendored
3
debian/config/Debian.h
vendored
|
@ -1,3 +0,0 @@
|
||||||
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
|
|
||||||
#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
|
|
||||||
|
|
2
debian/config/Ubuntu.conf
vendored
Normal file
2
debian/config/Ubuntu.conf
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
|
||||||
|
DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
|
3
debian/config/Ubuntu.h
vendored
3
debian/config/Ubuntu.h
vendored
|
@ -1,3 +0,0 @@
|
||||||
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
|
|
||||||
#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
|
|
||||||
|
|
58
debian/control
vendored
58
debian/control
vendored
|
@ -1,45 +1,37 @@
|
||||||
Source: midori
|
Source: midori
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Ryan Niebur <ryan@debian.org>
|
Maintainer: Sergio Durigan Junior <sergiodj@sergiodj.net>
|
||||||
Build-Depends: debhelper (>= 8.1.0~),
|
Build-Depends: debhelper (>= 9),
|
||||||
lsb-release,
|
cmake,
|
||||||
libgtk2.0-dev (>= 2.10),
|
valac,
|
||||||
libglib2.0-dev,
|
lsb-release,
|
||||||
libwebkitgtk-dev (>= 1.4.3),
|
libwebkitgtk-dev (>= 1.8.1),
|
||||||
libxml2-dev (>= 2.6),
|
libgtk2.0-dev (>= 2.24.0),
|
||||||
libzeitgeist-dev,
|
libglib2.0-dev,
|
||||||
# For waf:
|
libsoup-gnome2.4-dev (>= 2.27.90),
|
||||||
python,
|
libxml2-dev (>= 2.6),
|
||||||
# Optional dependencies:
|
libsqlite3-dev (>= 3.6.19),
|
||||||
intltool,
|
libjavascriptcoregtk-1.0-dev,
|
||||||
libidn11-dev,
|
libnotify-dev,
|
||||||
librsvg2-bin,
|
libgcr-3-dev (>= 2.32),
|
||||||
libsqlite3-dev,
|
librsvg2-bin,
|
||||||
libunique-dev (>= 1.0.6),
|
intltool,
|
||||||
python-docutils,
|
libunique-dev (>= 1.0.6),
|
||||||
libsoup2.4-dev (>= 2.25.2),
|
libzeitgeist-2.0-dev,
|
||||||
libnotify-dev,
|
# Necessary for 'make check'
|
||||||
valac (>= 0.10),
|
xvfb,
|
||||||
# For testing under xvfb:
|
xauth,
|
||||||
xvfb,
|
xfonts-base,
|
||||||
xauth,
|
libxss-dev
|
||||||
xfonts-base,
|
Standards-Version: 3.9.6
|
||||||
hardening-wrapper,
|
|
||||||
libxss-dev
|
|
||||||
# Disabled optional dependencies:
|
|
||||||
Build-Conflicts: gtk-doc-tools,
|
|
||||||
libgtksourceview2.0-dev (>= 2.0),
|
|
||||||
libhildon-1-dev
|
|
||||||
Standards-Version: 3.9.3
|
|
||||||
Homepage: http://www.midori-browser.org
|
Homepage: http://www.midori-browser.org
|
||||||
Vcs-Git: git://git.debian.org/collab-maint/midori.git
|
Vcs-Git: git://git.debian.org/collab-maint/midori.git
|
||||||
Vcs-Browser: http://git.debian.org/?p=collab-maint/midori.git;a=summary
|
Vcs-Browser: http://git.debian.org/?p=collab-maint/midori.git;a=summary
|
||||||
|
|
||||||
Package: midori
|
Package: midori
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Pre-Depends: ${misc:Pre-Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-x11
|
|
||||||
Recommends: gnome-icon-theme
|
Recommends: gnome-icon-theme
|
||||||
Provides: www-browser
|
Provides: www-browser
|
||||||
# For http://bugs.debian.org/522436 (missing symbols):
|
# For http://bugs.debian.org/522436 (missing symbols):
|
||||||
|
|
97
debian/rules
vendored
97
debian/rules
vendored
|
@ -1,86 +1,57 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
# output every command that modifies files on the build system.
|
||||||
|
#DH_VERBOSE = 1
|
||||||
|
|
||||||
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
|
DPKG_EXPORT_BUILDFLAGS = 1
|
||||||
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
|
include /usr/share/dpkg/default.mk
|
||||||
LDFLAGS+=-Wl,--as-needed -Wl,-O1
|
|
||||||
|
|
||||||
# waf, thank you _so_ much
|
# Necessary for the configuration file (xdg).
|
||||||
export LINKFLAGS=$(LDFLAGS)
|
DISTRO = $(shell lsb_release -is)
|
||||||
export CCFLAGS=$(CFLAGS)
|
CONFIG_FILE = debian/config/$(DISTRO).conf
|
||||||
|
ifneq (0, $(shell test -f $(CONFIG_FILE); echo "$$?"))
|
||||||
export DEB_BUILD_HARDENING=1
|
DISTRO = Debian
|
||||||
|
|
||||||
CMD=$(shell echo $@ | sed 's/override_//')
|
|
||||||
|
|
||||||
DISTRO=$(shell lsb_release -is)
|
|
||||||
CONFIG_FILE=debian/config/$(DISTRO).h
|
|
||||||
ifneq (0, $(shell test -e $(CONFIG_FILE); echo "$$?"))
|
|
||||||
DISTRO=Debian
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@ --buildsystem=cmake --builddirectory=_build/
|
||||||
|
|
||||||
upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)(\+dfsg)?.*$$/\1/p')
|
|
||||||
dfsg_version = $(upstream_version)+dfsg
|
|
||||||
upstream_pkg = "midori"
|
|
||||||
pkg = $(shell dpkg-parsechangelog | sed -ne 's/^Source: //p')
|
|
||||||
|
|
||||||
get-orig-source:
|
|
||||||
uscan --rename --download-current-version --destdir=.
|
|
||||||
tar -xjf $(pkg)_$(upstream_version).orig.tar.bz2
|
|
||||||
rm -f $(pkg)_$(upstream_version).orig.tar.bz2
|
|
||||||
mv $(upstream_pkg)-$(upstream_version) $(pkg)_$(dfsg_version).orig
|
|
||||||
$(CURDIR)/debian/waf-unpack $(pkg)_$(dfsg_version).orig
|
|
||||||
rm $(pkg)_$(dfsg_version).orig/waf
|
|
||||||
tar -cjf $(CURDIR)/../$(pkg)_$(dfsg_version).orig.tar.bz2 $(pkg)_$(dfsg_version).orig
|
|
||||||
rm -r $(pkg)_$(dfsg_version).orig
|
|
||||||
|
|
||||||
WAF=WAFDIR=waf-modules ./waf-unpacked
|
|
||||||
|
|
||||||
#$(WAF): waf
|
|
||||||
# # rebuild the waf script
|
|
||||||
# sed < waf -e '1,/^#==>$$/ d' -e '/^#<==$$/ d' | tr -d '\n' | sed -e 's/.//' -e 's/#[*]/\n/g' -e 's/#%/\r/g' > waf.orig.tar.bz2
|
|
||||||
# (sed -n < waf -e '1,/^#==>$$/ p'; echo REPLACED BY ENCODED TAR.BZ2; sed -n < waf -e '/^#<==$$/ p') > waf.hdr
|
|
||||||
# (sed -n < waf.hdr -e '1,/^#==>$$/ p'; printf '#'; perl -pe < waf.orig.tar.bz2 's/\n/#*/g; s/\r/#%/g;'; echo; sed -n < waf.hdr -e '/^#<==$$/ p') > waf.regen
|
|
||||||
# chmod 755 waf.regen
|
|
||||||
# # ensure both scripts are the same
|
|
||||||
# cmp waf waf.regen && (rm waf.hdr waf.orig.tar.bz2)
|
|
||||||
|
|
||||||
override_dh_auto_clean:
|
|
||||||
! which quilt >/dev/null || ! test -d .pc || quilt pop -a
|
|
||||||
rm -fr .pc
|
|
||||||
$(WAF) --nocache distclean
|
|
||||||
rm -rf _build_ _build
|
|
||||||
rm -rf .waf*
|
|
||||||
rm -rf .lock-wscript
|
|
||||||
rm -rf `find waf-modules -name "*.pyc"`
|
|
||||||
|
|
||||||
|
# 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:
|
override_dh_auto_configure:
|
||||||
$(WAF) --nocache configure --debug-level=none --prefix /usr
|
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:
|
override_dh_auto_build:
|
||||||
$(WAF) build --nocache -v
|
dh_auto_build -- VERBOSE=1
|
||||||
|
|
||||||
#override_dh_auto_test:
|
# We have to override 'make check' because it needs to run under
|
||||||
# xvfb-run $(WAF) --nocache check
|
# xvfb-run. And some tests still fail.
|
||||||
|
override_dh_auto_test:
|
||||||
|
(cd _build && xvfb-run make check) || true
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
$(WAF) --nocache install --destdir debian/tmp
|
dh_auto_install
|
||||||
rm -f debian/tmp/usr/share/doc/midori/COPYING debian/tmp/usr/share/doc/midori/TRANSLATE
|
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
|
install -m 0644 debian/$(DISTRO)-config debian/tmp/etc/xdg/midori/config
|
||||||
|
|
||||||
PRIORITY=$(shell sed -r -e '/DEBIAN_WWW_ALTERNATIVES_PRIORITY/ !d' -e 's/.* ([^ ]*)$$/\1/' $(CONFIG_FILE))
|
# 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
|
debian/midori.postinst: debian/midori.postinst.base
|
||||||
sed "s/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g" debian/midori.postinst.base > debian/midori.postinst
|
sed 's/DEBIAN_WWW_ALTERNATIVES_PRIORITY/$(PRIORITY)/g' debian/midori.postinst.base > debian/midori.postinst
|
||||||
|
|
||||||
override_dh_installdeb: debian/midori.postinst
|
override_dh_installdeb: debian/midori.postinst
|
||||||
$(CMD)
|
dh_installdeb
|
||||||
|
|
||||||
override_dh_strip:
|
|
||||||
$(CMD) --dbg-package=midori-dbg
|
|
||||||
|
|
||||||
override_dh_installchangelogs:
|
override_dh_installchangelogs:
|
||||||
rm -f debian/midori/usr/share/doc/midori/ChangeLog
|
rm -f debian/midori/usr/share/doc/midori/ChangeLog
|
||||||
dh_installchangelogs ChangeLog
|
dh_installchangelogs
|
||||||
|
|
47
debian/waf-unpack
vendored
47
debian/waf-unpack
vendored
|
@ -1,47 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
# This program extracts waf-binary
|
|
||||||
#
|
|
||||||
# Please refer the following link for more details:
|
|
||||||
# http://wiki.debian.org/UnpackWaf
|
|
||||||
#
|
|
||||||
|
|
||||||
from os import path, rename, remove, chmod
|
|
||||||
import sys
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
basedir = path.join(path.dirname(path.abspath(__file__)), "..")
|
|
||||||
targetdir = sys.argv[1]
|
|
||||||
|
|
||||||
skip = False
|
|
||||||
|
|
||||||
waf = open(path.join(targetdir, "waf"), "r")
|
|
||||||
unp = open(path.join(basedir, "debian/wafunp.py"), "w")
|
|
||||||
|
|
||||||
shutil.copyfile(path.join(basedir, "debian/waf-unpack"),
|
|
||||||
path.join(basedir, "debian/waf-unpack.bup"))
|
|
||||||
thisfile = open(path.join(basedir, "debian/waf-unpack"), "a")
|
|
||||||
for l in waf:
|
|
||||||
if l == "#==>\n":
|
|
||||||
skip = True
|
|
||||||
thisfile.write(l)
|
|
||||||
elif l == "#<==\n":
|
|
||||||
skip = False
|
|
||||||
thisfile.write(l)
|
|
||||||
elif not skip:
|
|
||||||
unp.write(l)
|
|
||||||
else:
|
|
||||||
thisfile.write(l)
|
|
||||||
|
|
||||||
waf.close()
|
|
||||||
unp.close()
|
|
||||||
thisfile.close()
|
|
||||||
|
|
||||||
import wafunp
|
|
||||||
rename(path.join(basedir, "debian/.%s-%s-%s" % (wafunp.WAF, wafunp.VERSION, wafunp.REVISION)), path.join(targetdir, "waf-modules"))
|
|
||||||
rename(path.join(basedir, "debian/waf-unpack.bup"), path.join(basedir, "debian/waf-unpack"))
|
|
||||||
chmod(path.join(basedir, "debian/waf-unpack"), 0744)
|
|
||||||
remove(path.join(targetdir, "waf-modules/t.bz2"))
|
|
||||||
remove(path.join(basedir, "debian/wafunp.pyc"))
|
|
||||||
rename(path.join(basedir, "debian/wafunp.py"), path.join(targetdir, "waf-unpacked"))
|
|
||||||
chmod(path.join(targetdir, "waf-unpacked"), 0744)
|
|
Loading…
Reference in a new issue