1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/usr/bin/make -f
DEB_PYTHON_SYSTEM=pysupport
# Must be included before python-distutils.mk to use dh_python / dh_pysupport.
include /usr/share/cdbs/1/rules/debhelper.mk
# Use Python distutils to install the package.
include /usr/share/cdbs/1/class/python-distutils.mk
DEB_PYTHON_SETUP_CMD := platform/gtk-x11/setup.py
# Override dh_python invokation.
binary-install/democracyplayer::
dh_python -pdemocracyplayer
binary-install/democracyplayer-data::
dh_python -pdemocracyplayer-data
# fix breakage in upstream build system by rebuilding and installing the .mo files
cd resources/locale && \
for I in $$(ls *.po | sed -e 's:.*/::g' -e 's:.po::g' ) ; do \
echo "Processing $$I..." && \
mkdir -p ../../debian/democracyplayer-data/usr/share/locale/$$I/LC_MESSAGES && \
msgfmt --statistics $$I.po -o ../../debian/democracyplayer-data/usr/share/locale/$$I/LC_MESSAGES/democracyplayer.mo ; \
done
include /usr/share/cdbs/1/rules/simple-patchsys.mk
# Install everything into debian/tmp, as we have a multi-binary package.
DEB_DH_INSTALL_SOURCEDIR := debian/tmp
# Remove unneeded files from the deb.
binary-post-install/democracyplayer::
rm -rf debian/democracyplayer/usr/share/python-support/democracyplayer/democracy/compiled_templates/unittest
rm -rf debian/democracyplayer/usr/share/python-support/democracyplayer/democracy/test
# Remove unneeded files from the deb.
binary-post-install/democracyplayer-data::
rm -rf debian/democracyplayer-data/usr/share/democracy/resources/testdata
rm -rf debian/democracyplayer-data/usr/share/democracy/resources/templates/unittest
# TODO: This should probably be done in the upstream source.
clean::
rm -rf portable/compiled_templates/*
rm -f portable/database.c
rm -f portable/sorts.c
rm -f platform/gtk-x11/xine/xine.c
rm -f platform/gtk-x11/frontend_implementation/MozillaBrowser.c
rm -f platform/gtk-x11/frontend_implementation/xlibhelper.c
rm -f platform/gtk-x11/democracyplayer.1.gz
# rm -f portable/*.pyc
# rm -f resources/locale/*.mo
|