packaging: add compiled locale files
This commit is contained in:
parent
f449b37bda
commit
53abd22176
|
@ -47,6 +47,7 @@ fi
|
||||||
|
|
||||||
export TMPDIR="$(/bin/mktemp --directory --tmpdir debbuild-$P_NAME-$P_VERSION-$USER-XXXXXX)"
|
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
|
python2.7 setup.py sdist --formats=gztar --quiet
|
||||||
/bin/tar --extract --gunzip --file "$SDIST_FILE" --directory "$DIST_DIR"
|
/bin/tar --extract --gunzip --file "$SDIST_FILE" --directory "$DIST_DIR"
|
||||||
test -d "$BUILD_DIR"
|
test -d "$BUILD_DIR"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
usr/bin/
|
usr/bin/
|
||||||
usr/share/solaar/
|
usr/share/solaar/
|
||||||
|
usr/share/locale/
|
||||||
usr/share/icons/hicolor/scalable/apps/
|
usr/share/icons/hicolor/scalable/apps/
|
||||||
usr/share/applications/
|
usr/share/applications/
|
||||||
usr/share/applications/solaar.desktop etc/xdg/autostart/
|
usr/share/applications/solaar.desktop etc/xdg/autostart/
|
||||||
|
|
26
setup.py
26
setup.py
|
@ -24,6 +24,23 @@ if 'install' in sys.argv:
|
||||||
|
|
||||||
del sys, backup_path_0
|
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(),
|
setup(name=NAME.lower(),
|
||||||
version=__version__,
|
version=__version__,
|
||||||
description='Linux devices manager for the Logitech Unifying Receiver.',
|
description='Linux devices manager for the Logitech Unifying Receiver.',
|
||||||
|
@ -55,13 +72,6 @@ battery status.
|
||||||
|
|
||||||
package_dir={'': 'lib'},
|
package_dir={'': 'lib'},
|
||||||
packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui'],
|
packages=['hidapi', 'logitech_receiver', 'solaar', 'solaar.ui'],
|
||||||
|
data_files=list(_data_files()),
|
||||||
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']),
|
|
||||||
],
|
|
||||||
|
|
||||||
scripts=_glob('bin/*'),
|
scripts=_glob('bin/*'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
find . -type f -name '*.py[co]' -delete
|
find . -type f -name '*.py[co]' -delete
|
||||||
find . -type d -name '__pycache__' -delete
|
find . -type d -name '__pycache__' -delete
|
||||||
|
|
||||||
|
/bin/rm --force po/*~
|
||||||
|
/bin/rm --force --recursive share/locale/
|
||||||
|
|
Loading…
Reference in New Issue