As KDE is broken down into more and more smaller packages there are
increasingly many of them that the only difference we have with Debian is the
Vcs-foo and the maintainer.
It would be nice if we could get to the point where it was easy to have
packages with no real diff sync from Debian.
The Vcs-foo we need for automation to work, so I have a proposal.
Please see the attached lskat package diff (it's a diff from Debian's but other
than the changelog entries, it's the same as Kubuntu's) as a prototype for how
we might autogenerate correct Vcs-foo for both Debian and Kubuntu out of one
source package.
By design, it should give Debian Vcs-foo for any non-Ubuntu derivative and
Ubuntu Vcs-foo for Kubuntu. I think it's reasonably extensible if there are
other Debian derivatives that care about this (it'd be a change in debian-qt-
kde.mk to do this for more derivatives, no additional per-package change).
If an approach like this makes sense, the rules changes would be integrated
into debian-qt-kde.mk from pkg-kde-tools so that the only per package change
needed would be to add control.in
If this seems reasonable, I'll raise it on the Debian qt-kde team list.
Scott K
diff -Nru lskat-4.13.1/debian/changelog lskat-4.13.2/debian/changelog
--- lskat-4.13.1/debian/changelog 2014-05-23 04:45:30.000000000 -0400
+++ lskat-4.13.2/debian/changelog 2014-07-08 10:34:24.000000000 -0400
@@ -1,3 +1,11 @@
+lskat (4:4.13.2-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * Add control.in and new rules to generate correct Vcs-* on Debian and
+ Ubuntu
+
+ -- Scott Kitterman <[email protected]> Mon, 07 Jul 2014 22:58:37 -0400
+
lskat (4:4.13.1-1) unstable; urgency=medium
* New upstream release.
diff -Nru lskat-4.13.1/debian/control lskat-4.13.2/debian/control
--- lskat-4.13.1/debian/control 2014-05-23 04:45:30.000000000 -0400
+++ lskat-4.13.2/debian/control 2014-07-08 10:28:02.000000000 -0400
@@ -20,6 +20,8 @@
Homepage: http://games.kde.org/
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-kde/kde-sc/lskat.git
Vcs-Git: git://anonscm.debian.org/pkg-kde/kde-sc/lskat.git
+X-Ubuntu-Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/lskat
+X-Ubuntu-Vcs-Bzr: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/lskat
Package: lskat
Architecture: any
diff -Nru lskat-4.13.1/debian/control.in lskat-4.13.2/debian/control.in
--- lskat-4.13.1/debian/control.in 1969-12-31 19:00:00.000000000 -0500
+++ lskat-4.13.2/debian/control.in 2014-07-08 10:04:46.000000000 -0400
@@ -0,0 +1,33 @@
+Source: lskat
+Section: games
+Priority: optional
+Maintainer: Debian Qt/KDE Maintainers <[email protected]>
+Uploaders: Daniel Schepler <[email protected]>,
+ Sune Vuorela <[email protected]>,
+ Fathi Boudra <[email protected]>,
+ Modestas Vainius <[email protected]>,
+ George Kiagiadakis <[email protected]>,
+ Eshat Cakar <[email protected]>,
+ Lisandro Damián Nicanor Pérez Meyer <[email protected]>,
+ Maximiliano Curia <[email protected]>
+Build-Depends: cmake,
+ debhelper (>= 9),
+ kde-sc-dev-latest (>= 4:4.11),
+ kdelibs5-dev (>= 4:4.11),
+ libkdegames-dev (>= 4:4.11),
+ pkg-kde-tools (>= 0.14)
+Standards-Version: 3.9.5
+Homepage: http://games.kde.org/
+@BROWSER@
+@VCS@
+@OTHERBROWSER@
+@OTHERVCS@
+
+Package: lskat
+Architecture: any
+Depends: kdegames-card-data (>= 4:4.10), ${misc:Depends}, ${shlibs:Depends}
+Recommends: khelpcenter4
+Description: Lieutnant Skat card game
+ Lieutnant Skat is a simplified variant of the Skat card game for two players.
+ .
+ This package is part of the KDE games module.
diff -Nru lskat-4.13.1/debian/rules lskat-4.13.2/debian/rules
--- lskat-4.13.1/debian/rules 2014-05-23 04:45:30.000000000 -0400
+++ lskat-4.13.2/debian/rules 2014-07-08 10:32:53.000000000 -0400
@@ -2,6 +2,22 @@
include /usr/share/pkg-kde-tools/qt-kde-team/2/debian-qt-kde.mk
+changelog_values := $(shell dpkg-parsechangelog \
+ | awk '/^(Version|Source):/ {print $$2}')
+PKGSOURCE := $(word 1, $(changelog_values))
+PKGVERSION := $(word 2, $(changelog_values))
+
+DEBIAN_WEB_HOST := \:\/\/anonscm\.debian\.org\/gitweb\/\?p\=pkg-kde\/kde\-sc\/
+DEBIAN_VCS_HOST := \:\/\/anonscm\.debian\.org\/pkg-kde\/kde-sc\/
+DEBIAN_VCS := Git
+DEBIAN_VCS_PROTOCOL := git
+UBUNTU_WEB_HOST := \:\/\/bazaar\.launchpad\.net\/\~kubuntu\-packagers\/kubuntu\-packaging\/
+UBUNTU_VCS_HOST := \:\/\/code\.launchpad\.net\/\~kubuntu\-packagers\/kubuntu\-packaging\/
+UBUNTU_VCS := Bzr
+UBUNTU_VCS_PROTOCOL = https
+
+distribution := $(shell dpkg-vendor --query Vendor)
+
.PHONY: override_dh_auto_test
override_dh_auto_configure:
@@ -10,6 +26,31 @@
override_dh_auto_install:
$(overridden_command) --destdir=debian/tmp
+override_dh_auto_clean:
+ifeq ($(distribution),Ubuntu)
+ sed -e "s/^@BROWSER@/Vcs-Browser: http$(UBUNTU_WEB_HOST)$(PKGSOURCE)/" \
+ -e "s/^@VCS@/Vcs-$(UBUNTU_VCS): $(UBUNTU_VCS_PROTOCOL)$(UBUNTU_VCS_HOST)$(PKGSOURCE)/" \
+ -e "s/^@OTHERBROWSER@/X-Debian-Vcs-Browser: http$(DEBIAN_WEB_HOST)$(PKGSOURCE).git/" \
+ -e "s/^@OTHERVCS@/X-Debian-Vcs-$(DEBIAN_VCS): $(DEBIAN_VCS_PROTOCOL)$(DEBIAN_VCS_HOST)$(PKGSOURCE).git/" \
+ debian/control.in \
+ >debian/control.tmp
+ m='Kubuntu Developers <[email protected]>'; \
+ sed -i "/^Maintainer:/s/\(.*\)/Maintainer: $$m\nXSBC-Original-\1/" \
+ debian/control.tmp
+else
+ sed -e "s/^@BROWSER@/Vcs-Browser: http$(DEBIAN_WEB_HOST)$(PKGSOURCE).git/" \
+ -e "s/^@VCS@/Vcs-$(DEBIAN_VCS): $(DEBIAN_VCS_PROTOCOL)$(DEBIAN_VCS_HOST)$(PKGSOURCE).git/" \
+ -e "s/^@OTHERBROWSER@/X-Ubuntu-Vcs-Browser: http$(UBUNTU_WEB_HOST)$(PKGSOURCE)/" \
+ -e "s/^@OTHERVCS@/X-Ubuntu-Vcs-$(UBUNTU_VCS): $(UBUNTU_VCS_PROTOCOL)$(UBUNTU_VCS_HOST)$(PKGSOURCE)/" \
+ debian/control.in \
+ >debian/control.tmp
+endif
+ [ -e debian/control ] \
+ && cmp -s debian/control debian/control.tmp \
+ && rm -f debian/control.tmp && exit 0; \
+ mv debian/control.tmp debian/control
+ $(overridden_command)
+
generate-icons:
while read src dest; do \
convert debian/tmp/$$src debian/icons/$$dest; \
--
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel