Add debian packaging rules

This allows us to package osmopy as debian package.

The package currently includes both the library as well as the
executables/scripts.  It might make sense to separate that into
a pure library package and an "utils" package

Related: SYS#3028
Change-Id: I332fb82d0e8dd09c5cf53caafa6a63297a8e3881
This commit is contained in:
Harald Welte 2018-05-31 11:43:23 +02:00 committed by Pau Espin Pedrol
parent 901f5eb259
commit 8cd233a826
6 changed files with 85 additions and 0 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
osmo-python-tests (0.0.9) unstable; urgency=medium
* Initial package
-- Harald Welte <laforge@gnumonks.org> Thu, 31 May 2019 10:33:31 +0100

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

37
debian/control vendored Normal file
View File

@ -0,0 +1,37 @@
Source: osmo-python-tests
Section: python
Priority: optional
Maintainer: Harald Welte <laforge@gnumonks.org>
Build-Depends: debhelper (>= 9), python, dh-python, python-setuptools, python3, python3-setuptools
Standards-Version: 3.9.8
Homepage: http://git.osmocom.org/python/osmo-python-tests/
Vcs-Git: git://git.osmocom.org/python/osmo-python-tests
Vcs-Browser: http://git.osmocom.org/python/osmo-python-tests/
Package: python2-osmopy-libs
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}
Description: Python code (not only) for testing of Osmocom programs
.
This package contains the Python 2 version of osmopy libraries.
Package: python2-osmopy-utils
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python2-osmopy-libs
Description: Python code (not only) for testing of Osmocom programs
.
This package contains the Python 2 version of osmopy utils.
Package: python3-osmopy-libs
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}
Description: Python code (not only) for testing of Osmocom programs
.
This package contains the Python 3 version of osmopy libraries.
Package: python3-osmopy-utils
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-osmopy-libs
Description: Python code (not only) for testing of Osmocom programs
.
This package contains the Python 3 version of osmopy utils.

27
debian/copyright vendored Normal file
View File

@ -0,0 +1,27 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: osmo-python-tests
Source: http://git.osmocom.org/python/osmo-python-tests/
Files: osmopy/obscvty.py
Copyright: Copyright (C) 2012, 2013 Holger Hans Peter Freyther
License: GPL-2+
Files: osmopy/osmo_ipa.py
Copyright: Copyright (C) 2016 sysmocom s.f.m.c. GmbH
License: GPL-3+
Files: osmopy/osmoutil.py
Copyright: (C) 2013 by Katerina Barone-Adesi <kat.obsc@gmail.com>
License: GPL-3+
Files: osmopy/osmo_interact/*
Copyright: (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
License: GPL-3+
Files: debian/*
Copyright: 2018 Harald Welte <laforge@gnumonks.org>
License: GPL-2+
Files: setup.py
Copyright: (C) 2013 by Katerina Barone-Adesi <kat.obsc@gmail.com>
License: AGPL-3.0+

14
debian/rules vendored Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/make -f
%:
dh $@ --with python2,python3
override_dh_auto_install:
python2 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python2-osmopy-libs
rm -rf $(CURDIR)/debian/python2-osmopy-libs/usr/bin
python2 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python2-osmopy-utils
rm -rf $(CURDIR)/debian/python2-osmopy-utils/usr/lib
python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-osmopy-libs
rm -rf $(CURDIR)/debian/python3-osmopy-libs/usr/bin
python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-osmopy-utils
rm -rf $(CURDIR)/debian/python3-osmopy-utils/usr/lib

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)