Skip to content

Commit

Permalink
Use two different control files for Python 2 and 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed May 20, 2015
1 parent cdb144f commit 83a91b8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

File renamed without changes.
24 changes: 24 additions & 0 deletions debian/control.py3
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 83a91b8

Please sign in to comment.