summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@sebi-laptop>2007-01-26 15:09:40 +0100
committerSebastian Heinlein <sebi@sebi-laptop>2007-01-26 15:09:40 +0100
commit238e469ebc586cc50095a855b64619632c22fbf2 (patch)
treed8310c3281faaf99835a0bcef567b4dbd9051765
parent11dd4cbee2d63932f851a6f9171908951ff08000 (diff)
downloadpython-apt-238e469ebc586cc50095a855b64619632c22fbf2.tar.gz
* also install aptsources
* switch to cdbs * add a pot file * setup the POTFILES.in
-rw-r--r--debian/control2
-rw-r--r--debian/python-apt.docs1
-rwxr-xr-xdebian/rules78
-rw-r--r--po/POTFILES.in3
-rw-r--r--po/python-apt.pot269
-rw-r--r--setup.cfg8
-rwxr-xr-xsetup.py27
7 files changed, 311 insertions, 77 deletions
diff --git a/debian/control b/debian/control
index c54fbec1..78b9f2a1 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: APT Development Team <deity@lists.debian.org>
Uploaders: Matt Zimmerman <mdz@debian.org>, Michael Vogt <mvo@debian.org>
Standards-Version: 3.6.2.0
XS-Python-Version: all
-Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.45), apt-utils, python-all-dev, python-central
+Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.6.45), apt-utils, python-all-dev, python-central, python-distutils-extra, cdbs
Package: python-apt
Architecture: any
diff --git a/debian/python-apt.docs b/debian/python-apt.docs
index f7756d28..208050c5 100644
--- a/debian/python-apt.docs
+++ b/debian/python-apt.docs
@@ -1,2 +1,3 @@
README
apt/README.apt
+data/templates/README.templates
diff --git a/debian/rules b/debian/rules
index 7299f554..016167d6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,76 +1,10 @@
#!/usr/bin/make -f
-# Made with the aid of dh_make, by Craig Small
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Some lines taken from debmake, by Cristoph Lameter.
+
+DEB_AUTO_CLEANUP_RCS := yes
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+DEB_PYTHON_SYSTEM=pycentral
-DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
-DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
+# Add here any variable or target overrides you need
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-PYTHON=$(shell pyversions -r debian/control)
-
-build: build-stamp
-build-stamp:
- dh_testdir
-
- for PY in $(PYTHON); do \
- /usr/bin/$$PY setup.py build; \
- done
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- for PY in $(PYTHON); do \
- /usr/bin/$$PY setup.py clean --all; \
- done
-
- dh_clean
-
-# Build architecture-independent files here.
-binary-indep: DH_OPTIONS=-i
-binary-indep: build
-
-# Build architecture-dependent files here.
-binary-arch: DH_OPTIONS=-a
-binary-arch: build
- dh_testdir
- dh_testroot
- dh_clean -k
-
- for PY in $(PYTHON); do \
- /usr/bin/$$PY setup.py install --prefix=`pwd`/debian/python-apt/usr; \
- done
-
- dh_installdocs
- dh_installchangelogs
- dh_installexamples
- dh_pycentral
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-source diff:
- @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-arch-build:
- rm -rf debian/arch-build
- mkdir -p debian/arch-build/python-apt-$(DEBVER)
- tar -c --exclude=arch-build --no-recursion -f - `bzr inventory` | (cd debian/arch-build/python-apt-$(DEBVER);tar xf -)
- (cd debian/arch-build/python-apt-$(DEBVER); $(DEB_BUILD_PROG))
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 00000000..d5a84db2
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,3 @@
+[encoding: UTF-8]
+[type: gettext/rfc822deb] data/templates/Ubuntu.info.in
+[type: gettext/rfc822deb] data/templates/Debian.info.in
diff --git a/po/python-apt.pot b/po/python-apt.pot
new file mode 100644
index 00000000..ba144165
--- /dev/null
+++ b/po/python-apt.pot
@@ -0,0 +1,269 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-01-26 14:17+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. ChangelogURI
+#: ../data/templates/Ubuntu.info.in.h:4
+#, no-c-format
+msgid "http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:8
+msgid "Ubuntu 7.04 'Feisty Fawn'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:25
+msgid "Cdrom with Ubuntu 7.04 'Feisty Fawn'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:59
+msgid "Ubuntu 6.10 'Edgy Eft'"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:64
+msgid "Community-maintained"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:68
+msgid "Proprietary drivers for devices"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:70
+msgid "Restricted software"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:76
+msgid "Cdrom with Ubuntu 6.10 'Edgy Eft'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:110
+msgid "Ubuntu 6.06 LTS 'Dapper Drake'"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:113
+msgid "Canonical-supported Open Source software"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:115
+msgid "Community-maintained (universe)"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:116
+msgid "Community-maintained Open Source software"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:118
+msgid "Non-free drivers"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:119
+msgid "Proprietary drivers for devices "
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:121
+msgid "Restricted software (Multiverse)"
+msgstr ""
+
+#. CompDescriptionLong
+#: ../data/templates/Ubuntu.info.in:122
+msgid "Software restricted by copyright or legal issues"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:127
+msgid "Cdrom with Ubuntu 6.06 LTS 'Dapper Drake'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:139
+msgid "Important security updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:144
+msgid "Recommended updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:149 ../data/templates/Debian.info.in:42
+msgid "Proposed updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:154
+msgid "Backported updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:161
+msgid "Ubuntu 5.10 'Breezy Badger'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:174
+msgid "Cdrom with Ubuntu 5.10 'Breezy Badger'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:186
+msgid "Ubuntu 5.10 Security Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:191
+msgid "Ubuntu 5.10 Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:196
+msgid "Ubuntu 5.10 Backports"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:203
+msgid "Ubuntu 5.04 'Hoary Hedgehog'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:216
+msgid "Cdrom with Ubuntu 5.04 'Hoary Hedgehog'"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:219 ../data/templates/Debian.info.in:94
+msgid "Officially supported"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:228
+msgid "Ubuntu 5.04 Security Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:233
+msgid "Ubuntu 5.04 Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:238
+msgid "Ubuntu 5.04 Backports"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:244
+msgid "Ubuntu 4.10 'Warty Warthog'"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:250
+msgid "Community-maintained (Universe)"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:252
+msgid "Non-free (Multiverse)"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:257
+msgid "Cdrom with Ubuntu 4.10 'Warty Warthog'"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:260
+msgid "No longer officially supported"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Ubuntu.info.in:262
+msgid "Restricted copyright"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:269
+msgid "Ubuntu 4.10 Security Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:274
+msgid "Ubuntu 4.10 Updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Ubuntu.info.in:279
+msgid "Ubuntu 4.10 Backports"
+msgstr ""
+
+#. ChangelogURI
+#: ../data/templates/Debian.info.in.h:4
+#, no-c-format
+msgid "http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog"
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:8
+msgid "Debian 4.0 'Etch' "
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:31
+msgid "Debian 3.1 'Sarge'"
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:47
+msgid "Security updates"
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:54
+msgid "Debian current stable release"
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:67
+msgid "Debian testing"
+msgstr ""
+
+#. Description
+#: ../data/templates/Debian.info.in:92
+msgid "Debian 'Sid' (unstable)"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Debian.info.in:96
+msgid "DFSG-compatible Software with Non-Free Dependencies"
+msgstr ""
+
+#. CompDescription
+#: ../data/templates/Debian.info.in:98
+msgid "Non-DFSG-compatible Software"
+msgstr ""
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 00000000..718b6e23
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,8 @@
+[build]
+l10n=True
+
+[build_l10n]
+domain=python-apt
+
+[sdist]
+formats = bztar
diff --git a/setup.py b/setup.py
index 5adb0376..99bc62c6 100755
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,8 @@
from distutils.core import setup, Extension
from distutils.sysconfig import parse_makefile
-import string, glob
-
+from DistUtilsExtra.distutils_extra import build_extra, build_l10n
+import glob, os, string
# The apt_pkg module
files = map(lambda source: "python/"+source,
@@ -16,6 +16,18 @@ files = map(lambda source: "python/"+source,
string.split(parse_makefile("python/makefile")["APT_INST_SRC"]))
apt_inst = Extension("apt_inst", files, libraries=["apt-pkg","apt-inst"]);
+# Replace the leading _ that is used in the templates for translation
+templates = []
+if not os.path.exists("build/data/templates/"):
+ os.makedirs("build/data/templates")
+for template in glob.glob('data/templates/*.info.in'):
+ source = open(template, "r")
+ build = open(os.path.join("build", template[:-3]), "w")
+ lines = source.readlines()
+ for line in lines:
+ build.write(line.lstrip("_"))
+ source.close()
+ build.close()
setup(name="python-apt",
version="0.6.17",
@@ -23,6 +35,13 @@ setup(name="python-apt",
author="APT Development Team",
author_email="deity@lists.debian.org",
ext_modules=[apt_pkg,apt_inst],
- packages=['apt']
+ packages=['apt', 'aptsources'],
+ data_files = [('share/python-apt/templates',
+ glob.glob('build/data/templates/*.info')),
+ ('share/python-apt/templates',
+ glob.glob('data/templates/*.mirrors'))],
+ cmdclass = { "build" : build_extra,
+ "build_l10n" : build_l10n },
+ license = 'GNU GPL',
+ platforms = 'posix'
)
-