Question

I've written a Python 3 LIRC extension since pylirc doesn't work for Python 3. I'm trying to package it up into a Debian package and have had success in creating the packages python3-lirc_1.2.0-1_all.deb and python-lirc_1.2.0-1_all.deb. The packages install fine but only work on the specific architecture that they were compiled on.

So python3-lirc_1.2.0-1_all.deb works on my laptop when it was compiled on my laptop and python3-lirc_1.2.0-1_all.deb works on my Raspberry Pi when it was compiled on my Raspberry Pi but each package is architecture dependant.

I could just rename the packages before handing them out:

python3-lirc_1.2.0-1_all.deb -> python3-lirc_1.2.0-1_amd64.deb
python3-lirc_1.2.0-1_all.deb -> python3-lirc_1.2.0-1_armhf.deb

but this doesn't seem the right way. Are there any flags inside the debian/{control,rules} files that I need to set? Usually this is handled automatically.

Here is my debian/control file:

Source: python-lirc
Maintainer: Thomas Preston <thomasmarkpreston@gmail.com>
Section: python
Priority: optional
Build-Depends: python (>= 2.6.6-3),
               debhelper (>= 7),
               python3,
               python3-setuptools,
               liblircclient-dev,
               cython
Standards-Version: 3.9.1
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.2
Homepage: https://github.com/tompreston/python-lirc

Package: python-lirc
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, lirc
Description: Python module for creating LIRC clients.
 This Python module allows you to retrieve commands from the LIRC
 server.

Package: python3-lirc
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, lirc
Description: Python 3 module for creating LIRC clients.
 This Python 3 module allows you to retrieve commands from the LIRC
 server.

Here is my debian/rules file:

#!/usr/bin/make -f

%:
    dh $@ --with python2,python3 --buildsystem=python_distutils

override_dh_auto_build:
    cython -a lirc/lirc.pyx;
    python2.6 setup.py build;
    python2.7 setup.py build;
    cython -3 -a lirc/lirc.pyx;
    python3 setup.py build;

override_dh_auto_install:
    python2.6 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb;
    python2.7 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb;
    python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb;
Was it helpful?

Solution

Architecture: all is for platform-independant packages.

Try Architecture: any.

See: Debian Policy Manual : Chapter 5 - Control files and their fields

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top