[Python-modules-commits] r26317 - in packages/python-qt4/trunk/debian (4 files)

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Wed Oct 30 10:43:38 UTC 2013


    Date: Wednesday, October 30, 2013 @ 10:43:35
  Author: mitya57-guest
Revision: 26317

* Regenerate resource files during build.
* Repack orig tarball to remove non-free Sphinx-generated HTML
  documentation and non-free JS files (closes: #723039).
* Add debian/get-orig-source.sh script.

Added:
  packages/python-qt4/trunk/debian/get-orig-source.sh
Modified:
  packages/python-qt4/trunk/debian/changelog
  packages/python-qt4/trunk/debian/python-qt4-doc.links
  packages/python-qt4/trunk/debian/rules

Modified: packages/python-qt4/trunk/debian/changelog
===================================================================
--- packages/python-qt4/trunk/debian/changelog	2013-10-30 09:53:45 UTC (rev 26316)
+++ packages/python-qt4/trunk/debian/changelog	2013-10-30 10:43:35 UTC (rev 26317)
@@ -1,6 +1,10 @@
-python-qt4 (4.10.3-3) UNRELEASED; urgency=low
+python-qt4 (4.10.3+dfsg-1) UNRELEASED; urgency=low
 
   * Update pyrcc4 man page to list -py2 and -py3 options.
+  * Regenerate resource files during build.
+  * Repack orig tarball to remove non-free Sphinx-generated HTML
+    documentation and non-free JS files (closes: #723039).
+  * Add debian/get-orig-source.sh script.
 
  -- Dmitry Shachnev <mitya57 at gmail.com>  Wed, 30 Oct 2013 13:28:25 +0400
 

Added: packages/python-qt4/trunk/debian/get-orig-source.sh
===================================================================
--- packages/python-qt4/trunk/debian/get-orig-source.sh	                        (rev 0)
+++ packages/python-qt4/trunk/debian/get-orig-source.sh	2013-10-30 10:43:35 UTC (rev 26317)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -ex
+
+export TAR_OPTIONS='--owner root --group root --mode a+rX'
+export GZIP_OPTIONS='-9n'
+pwd=$(pwd)
+dfsg_version="$1"
+if [ -z "$dfsg_version" ]
+then
+	printf 'Usage: %s <version>\n' "$0"
+	exit 1
+fi
+upstream_version="${dfsg_version%+dfsg*}"
+cd "$(dirname "$0")/../"
+tmpdir=$(mktemp -t -d get-orig-source.XXXXXX)
+uscan --noconf --force-download --rename --download-version="$upstream_version" --destdir="$tmpdir"
+cd "$tmpdir"
+tar -xzf python-qt4_*.orig.tar.gz
+rm python-qt4_*.orig.tar.gz
+
+mv PyQt-x11-gpl-* "python-qt4-${dfsg_version}.orig"
+
+# jquery.min.js
+rm -rf "python-qt4-${dfsg_version}.orig/doc/html/"
+rm -f "python-qt4-${dfsg_version}.orig/examples/webkit/fancybrowser/jquery.min.js"
+rm -f "python-qt4-${dfsg_version}.orig/examples/webkit/fancybrowser/jquery_rc2.py"
+rm -f "python-qt4-${dfsg_version}.orig/examples/webkit/fancybrowser/jquery_rc3.py"
+
+tar -czf "$pwd/python-qt4_${dfsg_version}.orig.tar.gz" "python-qt4-${dfsg_version}.orig"
+rm -rf "$tmpdir"


Property changes on: packages/python-qt4/trunk/debian/get-orig-source.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: packages/python-qt4/trunk/debian/python-qt4-doc.links
===================================================================
--- packages/python-qt4/trunk/debian/python-qt4-doc.links	2013-10-30 09:53:45 UTC (rev 26316)
+++ packages/python-qt4/trunk/debian/python-qt4-doc.links	2013-10-30 10:43:35 UTC (rev 26317)
@@ -1,2 +1 @@
 /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-qt4-doc/examples/webkit/fancybrowser/jquery.min.js
-/usr/share/javascript/jquery/jquery.js /usr/share/doc/python-qt4-doc/html/_static/jquery.js

Modified: packages/python-qt4/trunk/debian/rules
===================================================================
--- packages/python-qt4/trunk/debian/rules	2013-10-30 09:53:45 UTC (rev 26316)
+++ packages/python-qt4/trunk/debian/rules	2013-10-30 10:43:35 UTC (rev 26317)
@@ -15,6 +15,10 @@
 py_dbusmoddir = $(shell python$(1) -c 'import dbus.mainloop; print dbus.mainloop.__path__[0]')
 py3_dbusmoddir = $(shell python3 -c 'import dbus.mainloop; print(dbus.mainloop.__path__[0])')
 
+debian_version = $(word 2,$(shell dpkg-parsechangelog | grep ^Version:))
+upstream_dfsg_version = $(firstword $(subst -, ,$(debian_version)))
+upstream_version = $(subst ~,,$(firstword $(subst +, ,$(debian_version))))
+
 export QMAKESPEC=linux-g++
 
 CFLAGS=
@@ -107,7 +111,13 @@
 	dh_installdirs -i
 	dh_install -i
 	dh_installexamples -i
-	$(CURDIR)/build-$(DEFAULT_PYTHON)/pyrcc/pyrcc4 -o $(CURDIR)/debian/python-qt4-doc/usr/share/doc/python-qt4-doc/examples/demos/qtdemo/qtdemo_rc.py $(CURDIR)/examples/demos/qtdemo/qtdemo.qrc 
+	cd $(CURDIR)/debian/python-qt4-doc/usr/share/doc/python-qt4-doc/examples/; \
+		cp /usr/share/javascript/jquery/jquery.min.js webkit/fancybrowser/; \
+		find . -name '*.qrc' | sed 's/\.qrc//g' | xargs -I {} \
+			$(CURDIR)/build-$(DEFAULT_PYTHON)/pyrcc/pyrcc4 -py2 {}.qrc -o {}_rc2.py; \
+		find . -name '*.qrc' | sed 's/\.qrc//g' | xargs -I {} \
+			$(CURDIR)/build-$(DEFAULT_PYTHON)/pyrcc/pyrcc4 -py3 {}.qrc -o {}_rc3.py
+	dh_link -i
 
 install-arch: build-arch
 	dh_testdir
@@ -235,7 +245,6 @@
 	$(CURDIR)/debian/python-qt4-doc/usr/share/doc/python-qt4-doc/html
 	dh_sphinxdoc
 endif
-	dh_link
 	dh_sip
 	dh_sip3
 ifeq (,$(findstring -i, $(DH_OPTIONS)))
@@ -295,4 +304,7 @@
 
 binary: binary-arch binary-indep
 
-.PHONY: build-indep build-arch build clean binary-indep binary-arch binary configure
+get-orig-source:
+	sh $(CURDIR)/debian/get-orig-source.sh $(upstream_dfsg_version)
+
+.PHONY: build-indep build-arch build clean binary-indep binary-arch binary configure get-orig-source




More information about the Python-modules-commits mailing list