From 83a91b84531d1491639de66793e1c20e0a704736 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 20 May 2015 21:09:00 +0200 Subject: [PATCH] Use two different control files for Python 2 and 3. --- Makefile | 24 +++++++++++++----------- debian/{control => control.py2} | 0 debian/control.py3 | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 11 deletions(-) rename debian/{control => control.py2} (100%) create mode 100644 debian/control.py3 diff --git a/Makefile b/Makefile index b599698f3..a3e699966 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,13 @@ PYTHON=`which python` DESTDIR=/ -BUILDIR=$(CURDIR)/debian/limnoria PROJECT=limnoria -VERSION=0.83.4.1+limnoria1 all: @echo "make source - Create source package" @echo "make install - Install on local system" @echo "make buildrpm - Generate a rpm package" - @echo "make builddeb - Generate a deb package" + @echo "make builddeb_py2 - Generate a deb package for Python 2" + @echo "make builddeb_py3 - Generate a deb package for Python 2" @echo "make clean - Get rid of scratch and byte files" source: @@ -18,19 +17,22 @@ install: $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) buildrpm: - $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall + $(PYTHON) setup.py bdist_rpm -builddeb: - # build the source package in the parent directory - # then rename it to project_version.orig.tar.gz - $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune - rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../* - # build the package - dpkg-buildpackage -i -I -rfakeroot +builddeb_py2: + cp debian/control.py2 debian/control + debuild -us -uc + rm debian/control + +builddeb_py3: + cp debian/control.py3 debian/control + debuild -us -uc + rm debian/control clean: $(PYTHON) setup.py clean $(MAKE) -f $(CURDIR)/debian/rules clean rm -rf build/ MANIFEST find . -name '*.pyc' -delete + rm debian/control diff --git a/debian/control b/debian/control.py2 similarity index 100% rename from debian/control rename to debian/control.py2 diff --git a/debian/control.py3 b/debian/control.py3 new file mode 100644 index 000000000..3b81f8f7c --- /dev/null +++ b/debian/control.py3 @@ -0,0 +1,24 @@ +Source: limnoria +Section: net +Priority: optional +Maintainer: Valentin Lorentz +Build-Depends: debhelper (>=3.9.2), dh-python, cdbs (>= 0.4.90~), python3 (>=3.2), python3-setuptools +XS-Python-Version: >=3.2 +Standards-Version: 3.9.2 + +Package: limnoria +Architecture: all +Depends: python3 (>=3.2), dh-python, ${misc:Depends} +Recommends: python3-simplejson, python3-feedparser, python3-sqlite3 +Suggests: python3-twisted-core, python3-twisted-names, python3-dictclient, python3-dateutil, python3-gnupg, python3-sqlalchemy +Conflicts: supybot +Provides: supybot +Replaces: supybot +Section: net +Priority: optional +Homepage: https://github.com/ProgVal/Limnoria +Description: Fork of the robust and user-friendly Python IRC bot Supybot. + It provides several enhancements, such as internationalization and + embedded HTTP server available to plugins. All plugins written for + Supybot are still compatible with Limnoria. +