From f47a9488f9a26b8e751a25368def76bca7f33c0b Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Sun, 28 Jun 2015 00:06:00 -0700 Subject: [PATCH] Update debian packaging for 0.5.10 (waf -> cmake) Update debian/{rules,control,copyright} for removal of references to waf. --- debian/changelog | 15 ++++++++++++- debian/control | 3 +-- debian/copyright | 6 +----- debian/rules | 54 ++++++++++------------------------------------- debian/waf-unpack | 47 ----------------------------------------- 5 files changed, 27 insertions(+), 98 deletions(-) delete mode 100755 debian/waf-unpack diff --git a/debian/changelog b/debian/changelog index f03ec4c3..e83cede3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -midori (0.5.2+dfsg-1) UNRELEASED; urgency=low +midori (0.5.10-1) UNRELEASED; urgency=low [ Yves-Alexis Perez ] * New upstream release. @@ -24,6 +24,19 @@ midori (0.5.2+dfsg-1) UNRELEASED; urgency=low * Improve dh_auto_clean target in d/rules to handle some leftover files from quilt and waf + [ Andres Salomon ] + * New upstream release. + * Switch away from the (problematic) waf build system to CMake: + - drop debian/waf-unpack. + * debian/control: + - add cmake as a dependency. + - drop python dependency (needed for waf). + * debian/rules: + - drop various DFSG upstream source repackaging bits. + - replace references to waf with cmake equivalents. + * debian/copyright: + - drop waf. + -- Ryan Niebur Wed, 23 Oct 2013 21:04:40 -0700 midori (0.4.3+dfsg-0.2) unstable; urgency=medium diff --git a/debian/control b/debian/control index 6b529418..bc3e518b 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,13 @@ Section: web Priority: optional Maintainer: Ryan Niebur Build-Depends: debhelper (>= 8.1.0~), + cmake, 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, diff --git a/debian/copyright b/debian/copyright index 199adaf3..0a8723c1 100644 --- a/debian/copyright +++ b/debian/copyright @@ -180,14 +180,10 @@ Copyright: Copyright (C) 2009 Enrico Tröger License: expat -Files: waf -Copyright: © 2005, Thomas Nagy -License: BSD-C3 - License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/debian/rules b/debian/rules index bc57e275..99de080d 100755 --- a/debian/rules +++ b/debian/rules @@ -4,9 +4,11 @@ LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) CFLAGS=$(shell dpkg-buildflags --get CFLAGS) LDFLAGS+=-Wl,--as-needed -Wl,-O1 -# waf, thank you _so_ much -export LINKFLAGS=$(LDFLAGS) -export CCFLAGS=$(CFLAGS) +CMAKE_FLAGS = \ + -DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \ + -DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \ + -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \ + -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$(LDFLAGS)" export DEB_BUILD_HARDENING=1 @@ -19,54 +21,20 @@ ifneq (0, $(shell test -e $(CONFIG_FILE); echo "$$?")) 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) + dh $@ --buildsystem=cmake 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"` - -override_dh_auto_configure: - $(WAF) --nocache configure --debug-level=none --prefix /usr - -override_dh_auto_build: - $(WAF) build --nocache -v + dh_auto_clean -O--buildsystem=cmake -#override_dh_auto_test: -# xvfb-run $(WAF) --nocache check +override_dh_auto_test: + # disable tests for now +# xvfb-run dh_auto_test -O--buildsystem=cmake override_dh_auto_install: - $(WAF) --nocache install --destdir debian/tmp + dh_auto_install -O--buildsystem=cmake 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 diff --git a/debian/waf-unpack b/debian/waf-unpack deleted file mode 100755 index 7d5fe3cb..00000000 --- a/debian/waf-unpack +++ /dev/null @@ -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) -- 2.39.5