proper debian packaging, dropper stdeb

This commit is contained in:
Daniel Pavel 2013-01-05 11:48:35 +02:00
parent d06e07542e
commit 36f34da227
66 changed files with 117 additions and 27 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@
__pycache__/
*.log
/src/Solaar.egg-info/
/lib/Solaar.egg-info/
/build/
/sdist/
/dist/

0
CHANGES.txt Normal file
View File

2
COPYRIGHT Normal file
View File

@ -0,0 +1,2 @@
Copyright 2012, 2013
Daniel Pavel <daniel.pavel@gmail.com>

2
MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include COPYRIGHT COPYING README.md
recursive-include rules.d *

View File

@ -10,10 +10,14 @@ def init_paths():
import sys
import os.path as _path
src_lib = _path.normpath(_path.join(_path.realpath(sys.path[0]), '..', 'src'))
init_py = _path.join(src_lib, 'solaar', '__init__.py')
if _path.exists(init_py):
sys.path[0] = src_lib
prefix = _path.normpath(_path.join(_path.realpath(sys.path[0]), '..'))
src_lib = _path.join(prefix, 'lib')
share_lib = _path.join(prefix, 'share', 'solaar', 'lib')
for location in src_lib, share_lib:
init_py = _path.join(location, 'solaar', '__init__.py')
if _path.exists(init_py):
sys.path[0] = location
break
if __name__ == '__main__':

View File

@ -10,10 +10,14 @@ def init_paths():
import sys
import os.path as _path
src_lib = _path.normpath(_path.join(_path.realpath(sys.path[0]), '..', 'src'))
init_py = _path.join(src_lib, 'solaar', '__init__.py')
if _path.exists(init_py):
sys.path[0] = src_lib
prefix = _path.normpath(_path.join(_path.realpath(sys.path[0]), '..'))
src_lib = _path.join(prefix, 'lib')
share_lib = _path.join(prefix, 'share', 'solaar', 'lib')
for location in src_lib, share_lib:
init_py = _path.join(location, 'solaar', '__init__.py')
if _path.exists(init_py):
sys.path[0] = location
break
if __name__ == '__main__':

View File

@ -14,7 +14,7 @@ def _look_for_application_icons():
local_share = _os.environ.get('XDG_DATA_HOME', _path.expanduser('~/.local/share'))
data_dirs = _os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share')
share_solaar = [src_share] + list(_path.join(x, 'solaar') for x in [local_share] + data_dirs.split(':'))
share_solaar = list(_path.join(x, 'solaar') for x in [src_share, local_share] + data_dirs.split(':'))
for location in share_solaar:
solaar_png = _path.join(location, 'icons', 'solaar.png')
if _path.exists(solaar_png):

View File

@ -0,0 +1,18 @@
solaar (0.8.5-2) UNRELEASED; urgency=low
* Proper debian packaging, dropped stdeb.
-- Daniel Pavel <daniel.pavel@gmail.com> Sat, 05 Jan 2013 11:33:00 +0200
solaar (0.8.5-1) UNRELEASED; urgency=low
* Fixed locating application-specific icons.
-- Daniel Pavel <daniel.pavel@gmail.com> Fri, 04 Jan 2013 11:33:00 +0200
solaar (0.8.4-1) UNRELEASED; urgency=low
* Initial debian packaging.
-- Daniel Pavel <daniel.pavel@gmail.com> Tue, 18 Dec 2012 00:46:17 +0200

1
packaging/debian/compat Normal file
View File

@ -0,0 +1 @@
8

21
packaging/debian/control Normal file
View File

@ -0,0 +1,21 @@
Source: solaar
Section: misc
Priority: optional
Maintainer: Daniel Pavel <daniel.pavel@gmail.com>
Build-Depends: debhelper (>= 8)
Build-Depends-Indep: python
X-Python-Version: >= 2.7, << 2.8
X-Python3-Version: >= 3.2
Standards-Version: 3.9.4
Homepage: http://pwr.github.com/Solaar
Vcs-Git: git://github.com/pwr/Solaar.git
Vcs-browser: http://github.com/pwr/Solaar
Package: solaar
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, udev, python-pyudev (>= 0.13), python-gi (>= 3.2), gir1.2-gtk-3.0 (>= 3.4)
Suggests: gir1.2-notify-0.7
Description: Logitech Unifying Receiver peripherals manager for Linux.
Solaar is a Linux device manager for Logitech's Unifying Receiver peripherals.
It is able to pair/unpair devices to the receiver, and for some devices read
battery status.

21
packaging/debian/rules Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
# Adding the required helpers
dh $@ --with=python2
# override_dh_auto_clean:
# dh_auto_clean
# rm -rf build/
override_dh_auto_install:
python setup.py install --root=debian/solaar --install-layout=deb --install-lib=/usr/share/solaar/lib
override_dh_auto_build:
override_dh_installudev:
dh_installudev -v --priority=99 --name=logitech-unifying-receiver

View File

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

View File

@ -1,10 +0,0 @@
[Solaar]
Source = solaar
Package = solaar
Section = misc
Copyright-File = packaging/debian/copyright
XS-Python-Version = >= 2.7
Depends = python-pyudev (>= 0.13), python-gi (>= 3.2), gir1.2-gtk-3.0
Suggests = gir1.2-notify-0.7
Udev-Rules = rules.d/99-logitech-unifying-receiver.rules
no-backwards-compatibility = True

2
packaging/debian/watch Normal file
View File

@ -0,0 +1,2 @@
version=3
http://github.com/pwr/solaar/tags .*/v?(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz))

View File

@ -4,7 +4,7 @@ from glob import glob
from distutils.core import setup
setup(name='Solaar',
setup(name='solaar',
version='0.8.5',
description='Linux devices manager for the Logitech Unifying Receiver.',
long_description='''
@ -33,16 +33,15 @@ battery status.
platforms=['linux'],
requires=['pyudev (>= 0.13)', 'gi.repository.GObject (>= 2.0)', 'gi.repository.Gtk (>= 3.0)'],
package_dir={'': 'src'},
package_dir={'': 'lib'},
packages=['hidapi', 'logitech', 'logitech.unifying_receiver', 'solaar', 'solaar.ui'],
data_files=[
('share/icons/hicolor/128x128/apps', ['share/icons/solaar.png']),
('share/solaar/icons', glob('share/icons/*.png')),
('share/icons/hicolor/128x128/apps', ['share/solaar/icons/solaar.png']),
('share/solaar/icons', glob('share/solaar/icons/*.png')),
('share/applications', ['share/applications/solaar.desktop']),
('share/doc/solaar', glob('share/doc/*')),
# ('/etc/udev/rules.d', ['rules.d/99-logitech-unifying-receiver.rules']),
],
scripts=['bin/solaar', 'bin/solaar-cli'],
scripts=glob('bin/*'),
)

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 800 B

After

Width:  |  Height:  |  Size: 800 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,4 +1,29 @@
#!/bin/sh
cd `dirname "$0"`/..
exec python setup.py sdist_dsc -x packaging/debian/stdeb.cfg bdist_deb "$@"
DEBIAN="$PWD/packaging/debian"
RULES_D="$PWD/rules.d"
DIST="${TMPDIR:-/tmp}/$PWD"
mkdir -m 0700 -p "$DIST"
rm -rf "$DIST"/*
python setup.py sdist --dist-dir="$DIST"
cd "$DIST"
S=`ls -1 solaar-*.tar.gz`
VERSION=${S#solaar-}
VERSION=${VERSION%.tar.gz}
tar xfz "$S"
mv "$S" solaar_$VERSION.orig.tar.gz
cd solaar-*
cp -a "$DEBIAN" .
for rule in "$RULES_D"/*.rules; do
target=`basename "$rule"`
target=${target##??-}
target=${target%%.rules}
cp -av "$rule" ./debian/solaar.$target.udev
done
debuild -uc -us