remove index_*.xml on uninstall
[enigma2.git] / Makefile.am
index 813e4f7d77ae266b1a599f7bbee845fdfed999f9..0ba310fa6910f77925a029afdd9e15e2a37ce5c3 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = lib main data po tools
+SUBDIRS = include lib main data po tools
 
 installdir = $(pkglibdir)/python
 
@@ -6,3 +6,13 @@ install_PYTHON = \
        Navigation.py NavigationInstance.py RecordTimer.py SleepTimer.py ServiceReference.py \
        keyids.py keymapparser.py mytest.py skin.py timer.py tools.py GlobalActions.py \
        e2reactor.py
+
+LANGS := $(shell cat $(srcdir)/po/LINGUAS)
+
+install-exec-hook:
+       for lang in $(LANGS); do \
+               $(PYTHON) $(srcdir)/tools/genmetaindex.py $$lang $(DESTDIR)$(pkgdatadir)/meta/enigma2/plugin_*.xml > $(DESTDIR)$(pkgdatadir)/meta/enigma2/index_$$lang.xml; \
+       done
+
+uninstall-hook:
+       $(RM) $(DESTDIR)$(pkgdatadir)/meta/enigma2/index_*.xml