Use two different control files for Python 2 and 3.

This commit is contained in:
Valentin Lorentz 2015-05-20 21:09:00 +02:00
parent cdb144f500
commit 83a91b8453
3 changed files with 37 additions and 11 deletions

View File

@ -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

24
debian/control.py3 vendored Normal file
View File

@ -0,0 +1,24 @@
Source: limnoria
Section: net
Priority: optional
Maintainer: Valentin Lorentz <progval@progval.net>
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.