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` PYTHON=`which python`
DESTDIR=/ DESTDIR=/
BUILDIR=$(CURDIR)/debian/limnoria
PROJECT=limnoria PROJECT=limnoria
VERSION=0.83.4.1+limnoria1
all: all:
@echo "make source - Create source package" @echo "make source - Create source package"
@echo "make install - Install on local system" @echo "make install - Install on local system"
@echo "make buildrpm - Generate a rpm package" @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" @echo "make clean - Get rid of scratch and byte files"
source: source:
@ -18,19 +17,22 @@ install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
buildrpm: buildrpm:
$(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall $(PYTHON) setup.py bdist_rpm
builddeb: builddeb_py2:
# build the source package in the parent directory cp debian/control.py2 debian/control
# then rename it to project_version.orig.tar.gz debuild -us -uc
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune rm debian/control
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package builddeb_py3:
dpkg-buildpackage -i -I -rfakeroot cp debian/control.py3 debian/control
debuild -us -uc
rm debian/control
clean: clean:
$(PYTHON) setup.py clean $(PYTHON) setup.py clean
$(MAKE) -f $(CURDIR)/debian/rules clean $(MAKE) -f $(CURDIR)/debian/rules clean
rm -rf build/ MANIFEST rm -rf build/ MANIFEST
find . -name '*.pyc' -delete 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.