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
|
@ -1,3 +1,2 @@
|
|||
midori/midori-debian.h
|
||||
debian/midori.postinst
|
||||
debian/presubj
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
|
||||
DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
|
|
@ -1,3 +0,0 @@
|
|||
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/doc/midori/user/midori.html"
|
||||
#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 50
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
|
||||
DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
|
|
@ -1,3 +0,0 @@
|
|||
#define DEBIAN_DISTRO_DEFAULT_HOMEPAGE "file:///usr/share/ubuntu-artwork/home/index.html"
|
||||
#define DEBIAN_WWW_ALTERNATIVES_PRIORITY 39
|
||||
|
|
@ -1,45 +1,37 @@
|
|||
Source: midori
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Ryan Niebur <ryan@debian.org>
|
||||
Build-Depends: debhelper (>= 8.1.0~),
|
||||
lsb-release,
|
||||
libgtk2.0-dev (>= 2.10),
|
||||
libglib2.0-dev,
|
||||
libwebkitgtk-dev (>= 1.4.3),
|
||||
libxml2-dev (>= 2.6),
|
||||
libzeitgeist-dev,
|
||||
# For waf:
|
||||
python,
|
||||
# Optional dependencies:
|
||||
intltool,
|
||||
libidn11-dev,
|
||||
librsvg2-bin,
|
||||
libsqlite3-dev,
|
||||
libunique-dev (>= 1.0.6),
|
||||
python-docutils,
|
||||
libsoup2.4-dev (>= 2.25.2),
|
||||
libnotify-dev,
|
||||
valac (>= 0.10),
|
||||
# For testing under xvfb:
|
||||
xvfb,
|
||||
xauth,
|
||||
xfonts-base,
|
||||
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
|
||||
Maintainer: Sergio Durigan Junior <sergiodj@sergiodj.net>
|
||||
Build-Depends: debhelper (>= 9),
|
||||
cmake,
|
||||
valac,
|
||||
lsb-release,
|
||||
libwebkitgtk-dev (>= 1.8.1),
|
||||
libgtk2.0-dev (>= 2.24.0),
|
||||
libglib2.0-dev,
|
||||
libsoup-gnome2.4-dev (>= 2.27.90),
|
||||
libxml2-dev (>= 2.6),
|
||||
libsqlite3-dev (>= 3.6.19),
|
||||
libjavascriptcoregtk-1.0-dev,
|
||||
libnotify-dev,
|
||||
libgcr-3-dev (>= 2.32),
|
||||
librsvg2-bin,
|
||||
intltool,
|
||||
libunique-dev (>= 1.0.6),
|
||||
libzeitgeist-2.0-dev,
|
||||
# Necessary for 'make check'
|
||||
xvfb,
|
||||
xauth,
|
||||
xfonts-base,
|
||||
libxss-dev
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://www.midori-browser.org
|
||||
Vcs-Git: git://git.debian.org/collab-maint/midori.git
|
||||
Vcs-Browser: http://git.debian.org/?p=collab-maint/midori.git;a=summary
|
||||
|
||||
Package: midori
|
||||
Architecture: any
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-x11
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: gnome-icon-theme
|
||||
Provides: www-browser
|
||||
# For http://bugs.debian.org/522436 (missing symbols):
|
||||
|
|
|
@ -1,86 +1,57 @@
|
|||
#!/usr/bin/make -f
|
||||
# output every command that modifies files on the build system.
|
||||
#DH_VERBOSE = 1
|
||||
|
||||
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
|
||||
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
|
||||
LDFLAGS+=-Wl,--as-needed -Wl,-O1
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
include /usr/share/dpkg/default.mk
|
||||
|
||||
# waf, thank you _so_ much
|
||||
export LINKFLAGS=$(LDFLAGS)
|
||||
export CCFLAGS=$(CFLAGS)
|
||||
|
||||
export DEB_BUILD_HARDENING=1
|
||||
|
||||
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
|
||||
# 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 $@
|
||||
|
||||
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"`
|
||||
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:
|
||||
$(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:
|
||||
$(WAF) build --nocache -v
|
||||
dh_auto_build -- VERBOSE=1
|
||||
|
||||
#override_dh_auto_test:
|
||||
# xvfb-run $(WAF) --nocache check
|
||||
# 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:
|
||||
$(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
|
||||
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
|
||||
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
|
||||
$(CMD)
|
||||
|
||||
override_dh_strip:
|
||||
$(CMD) --dbg-package=midori-dbg
|
||||
dh_installdeb
|
||||
|
||||
override_dh_installchangelogs:
|
||||
rm -f debian/midori/usr/share/doc/midori/ChangeLog
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_installchangelogs
|
||||
|
|
|
@ -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 New Issue