packaging: add compiled locale files

This commit is contained in:
Daniel Pavel 2013-07-24 11:06:58 +02:00
parent f449b37bda
commit 53abd22176
4 changed files with 24 additions and 8 deletions

View File

@ -47,6 +47,7 @@ fi
export TMPDIR="$(/bin/mktemp --directory --tmpdir debbuild-$P_NAME-$P_VERSION-$USER-XXXXXX)"
./tools/po-compile.sh
python2.7 setup.py sdist --formats=gztar --quiet
/bin/tar --extract --gunzip --file "$SDIST_FILE" --directory "$DIST_DIR"
test -d "$BUILD_DIR"

View File

@ -1,5 +1,6 @@
usr/bin/
usr/share/solaar/
usr/share/locale/
usr/share/icons/hicolor/scalable/apps/
usr/share/applications/
usr/share/applications/solaar.desktop etc/xdg/autostart/

View File

@ -24,6 +24,23 @@ if 'install' in sys.argv:
del sys, backup_path_0
def _data_files():
from os.path import dirname as _dirname
yield 'share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')
yield 'share/solaar/icons', _glob('share/solaar/icons/light_*.png')
yield 'share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']
for mo in _glob('share/locale/*/LC_MESSAGES/solaar.mo'):
yield _dirname(mo), [mo]
yield 'share/applications', ['share/applications/solaar.desktop']
yield autostart_path, ['share/applications/solaar.desktop']
del _dirname
setup(name=NAME.lower(),
version=__version__,
description='Linux devices manager for the Logitech Unifying Receiver.',
@ -55,13 +72,6 @@ battery status.
package_dir={'': 'lib'},
packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui'],
data_files=[('share/solaar/icons', _glob('share/solaar/icons/solaar*.svg')),
('share/solaar/icons', _glob('share/solaar/icons/light_*.png')),
('share/icons/hicolor/scalable/apps', ['share/solaar/icons/solaar.svg']),
('share/applications', ['share/applications/solaar.desktop']),
(autostart_path, ['share/applications/solaar.desktop']),
],
data_files=list(_data_files()),
scripts=_glob('bin/*'),
)

View File

@ -1,5 +1,9 @@
#!/bin/sh
cd "$(dirname "$0")/.."
find . -type f -name '*.py[co]' -delete
find . -type d -name '__pycache__' -delete
/bin/rm --force po/*~
/bin/rm --force --recursive share/locale/