[Python-modules-commits] r25927 - in packages/python-babel/trunk/debian (copyright rules)
wrar-guest at users.alioth.debian.org
wrar-guest at users.alioth.debian.org
Mon Sep 23 19:53:18 UTC 2013
Date: Monday, September 23, 2013 @ 19:53:17
Author: wrar-guest
Revision: 25927
Ship CLDR data in the source package and rebuild localedata from it
Modified:
packages/python-babel/trunk/debian/copyright
packages/python-babel/trunk/debian/rules
Modified: packages/python-babel/trunk/debian/copyright
===================================================================
--- packages/python-babel/trunk/debian/copyright 2013-09-23 19:49:30 UTC (rev 25926)
+++ packages/python-babel/trunk/debian/copyright 2013-09-23 19:53:17 UTC (rev 25927)
@@ -8,7 +8,7 @@
2013, the Babel Team
License: BSD-3-clause
-Files: babel/localedata/*
+Files: babel/localedata/* cldr/*
Copyright: 1991-2013 Unicode, Inc.
License: Unicode
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,6 +39,8 @@
be used in advertising or otherwise to promote the sale, use or other dealings
in these Data Files or Software without prior written authorization of the
copyright holder.
+Comment:
+ cldr/* is unpacked http://unicode.org/Public/cldr/23.1/core.zip
Files: debian/*
Copyright: 2008, Christoph Haas <haas at debian.org>
Modified: packages/python-babel/trunk/debian/rules
===================================================================
--- packages/python-babel/trunk/debian/rules 2013-09-23 19:49:30 UTC (rev 25926)
+++ packages/python-babel/trunk/debian/rules 2013-09-23 19:53:17 UTC (rev 25927)
@@ -9,6 +9,11 @@
dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_build:
+ mkdir localedata.bak
+ mv babel/localedata babel/global.dat localedata.bak
+ mkdir babel/localedata
+ scripts/import_cldr.py cldr/common
+
dh_auto_build
make -C docs html
@@ -17,6 +22,12 @@
make -C docs clean
rm tests/messages/data/project/i18n/en_US/LC_MESSAGES/messages.po
rm tests/messages/data/project/i18n/temp.pot
+
+ if [ -d localedata.bak ]; then \
+ rm -rf babel/localedata babel/global.dat; \
+ mv localedata.bak/* babel/; \
+ rm -rf localedata.bak; \
+ fi
override_dh_auto_install:
dh_auto_install
@@ -29,3 +40,15 @@
override_dh_compress:
dh_compress -X *.html
+
+DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+get-orig-source:
+ uscan --noconf --force-download --rename --download-current-version --destdir=$(CURDIR) $(DEB_DEBIAN_DIR)/..
+
+ TMPDIR=`mktemp -d`; \
+ CLDR=python-babel_$(DEB_UPSTREAM_VERSION).orig-cldr; \
+ wget -P $$TMPDIR http://unicode.org/Public/cldr/23.1/core.zip && \
+ unzip $$TMPDIR/core.zip -d $$TMPDIR/$$CLDR && \
+ tar -C $$TMPDIR --owner=root --group=root --mode=a+rX -c $$CLDR | xz -6 > $$CLDR.tar.xz && \
+ rm -rf $$TMPDIR
More information about the Python-modules-commits
mailing list