[SCM] KDE API documentation packaging branch, master, updated. 41ff7a83aecca0128af900951a1ff301a0cfd735

Pino Toscano pino-guest at alioth.debian.org
Fri Feb 25 16:30:34 UTC 2011


The following commit has been merged in the master branch:
commit 19e83bd2e7ce93c1afd9c288dc67e029865149a5
Author: Pino Toscano <pino at kde.org>
Date:   Fri Feb 25 17:28:52 2011 +0100

    add a system to generate the copyright files
    
    a new `update_copyrights' rule in `rules' will create the <package>.copyright files for all the binaries,
    taking the `copyright' file (ie the one for this packaging) as a start, followed by the header template
    (`template.header' in debian/copyright.d) and then the original source copyright.
    
    (attempted to) explain it in README.source
---
 debian/README.source               |   20 ++++++++++++++++++++
 debian/copyright                   |    6 ++++++
 debian/copyright.d/template.header |    6 ++++++
 debian/rules                       |   14 +++++++++++++-
 4 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..d974eea
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,20 @@
+Updating the copyrights
+=======================
+
+The `copyright' file of each resulting binary deb contains the copyright of the
+source from which its documentation is generated.
+
+To automatize a bit this procedure, it is needed to just put the unchanged
+`copyright' file of the source (eg kde4libs, kdepimlibs, ...) in the
+`debian/copyright.d' directory, named after the source it was copied from.
+After that, calling
+  $ debian/rules update_copyrights
+will update the *.copyright files properly. Each of the resulting
+<package>.copyright files will contain, in order:
+- the `copyright' of this packaging (kdeapi)
+- a small header (`debian/copyright.d/template.header')
+- the actual copyrigt of the source
+
+Make sure to do the `update_copyrights' call after each update of the files in
+`debian/copyright.d'!
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b7ca67e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,6 @@
+The Debian packaging for the `kdeapi' source is
+  Copyright 2010-2011, Pino Toscano <pino at kde.org>
+licensed under the GPL v2+, see
+- /usr/share/common-licenses/GPL-2
+- /usr/share/common-licenses/GPL-3
+
diff --git a/debian/copyright.d/template.header b/debian/copyright.d/template.header
new file mode 100644
index 0000000..c39424a
--- /dev/null
+++ b/debian/copyright.d/template.header
@@ -0,0 +1,6 @@
+
+
+Follows the copyright files for the `${SOURCE}' source:
+
+===============================================================================
+
diff --git a/debian/rules b/debian/rules
index 2a8e584..19a5504 100755
--- a/debian/rules
+++ b/debian/rules
@@ -73,7 +73,19 @@ override_dh_auto_clean:
 override_dh_compress:
 	dh_compress -X.qch -X.tag
 
+update_copyrights:
+	for cf in `ls debian/copyright.d/* | grep -v template | xargs -n1 basename`; do \
+	  fixedcf=`echo $${cf} | sed -e 's,kde4libs,kdelibs,'` ; \
+	  for m in `dh_listpackages | grep $${fixedcf}`; do \
+	    cat debian/copyright > debian/$${m}.copyright ; \
+	    cat debian/copyright.d/template.header \
+	      | sed -e "s,\$${SOURCE},$${cf},g" \
+	      >> debian/$${m}.copyright ; \
+	    cat debian/copyright.d/$${cf} >> debian/$${m}.copyright ; \
+	  done \
+	done
+
 %:
 	dh $@ --parallel
 
-.PHONY: override_dh_auto_configure override_dh_auto_test
+.PHONY: override_dh_auto_configure override_dh_auto_test update_copyrights

-- 
KDE API documentation packaging



More information about the pkg-kde-commits mailing list