summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-10-29 14:02:33 +0100
committerDimitar Petrovski <dimeptr@gmail.com>2012-10-29 14:02:33 +0100
commit9f123334782232413a36836d0894949bc7928cc9 (patch)
tree46ceabcc235005b080f63630904e77bd5ae49385
parent168f5d7c0b3b2b543ece04ccf09616c8a6b302b2 (diff)
downloadvdr-plugin-eepg-9f123334782232413a36836d0894949bc7928cc9.tar.gz
vdr-plugin-eepg-9f123334782232413a36836d0894949bc7928cc9.tar.bz2
modified Makefile according to the VDR newplugin script which fixes pot generation
added po thranslation support added Macednonian translation
-rw-r--r--Makefile78
-rw-r--r--po/mk_MK.po74
2 files changed, 114 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 49e8770..2adfd09 100644
--- a/Makefile
+++ b/Makefile
@@ -35,16 +35,20 @@ CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual
### The directory environment:
-VDRDIR = ../../..
-LIBDIR = ../../lib
-TMPDIR = /tmp
+VDRDIR ?= ../../..
+LIBDIR ?= ../../lib
+TMPDIR ?= /tmp
+
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config
-include Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
VDRVERSION = $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
APIVERSION = $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
@@ -63,24 +67,22 @@ INCLUDES += -I$(VDRDIR)/include
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-### The object files (add further files here):
-
-OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o
-
ifdef DBG
CXXFLAGS += -g
endif
-### Internationalization (I18N):
+### The object files (add further files here):
-PODIR = po
-I18Npot = $(PODIR)/$(PLUGIN).pot
-I18Nmsgs = $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo,$(notdir $(foreach file, $(wildcard $(PODIR)/*.po), $(basename $(file))))))
-LOCALEDIR = $(VDRDIR)/locale
+OBJS = $(PLUGIN).o dish.o epghandler.o setupeepg.o equivhandler.o util.o eit2.o
### Default Target
default: $(OBJS)
+### Implicit rules:
+
+%.o: %.c
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
### Dependencies:
MAKEDEP = $(CXX) -MM -MG
@@ -90,47 +92,47 @@ $(DEPFILE): Makefile
-include $(DEPFILE)
-### Targets:
-
-TARGETS = libvdr-$(PLUGIN).so
-ifneq ($(shell grep -l 'Phrases' $(VDRDIR)/i18n.c),$(VDRDIR)/i18n.c)
-TARGETS += i18n
-endif
+### Internationalization (I18N):
-all: $(TARGETS)
-.PHONY: i18n
+PODIR = po
+LOCALEDIR = $(VDRDIR)/locale
+I18Npo = $(wildcard $(PODIR)/*.po)
+I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+I18Npot = $(PODIR)/$(PLUGIN).pot
-%.o: %.c
- $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+### target All not default since it stops VDR
+all: libvdr-$(PLUGIN).so i18n
-libvdr-$(PLUGIN).so: $(OBJS)
- $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(APIVERSION)
+%.mo: %.po
+ msgfmt -c -o $@ $<
-$(I18Npot): $(shell grep -rl '\(tr\|trNOOP\)(\".*\")' *.c $(SYSDIR))
- xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP -o $@ $^
+$(I18Npot): $(wildcard *.c)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ $^
%.po: $(I18Npot)
- msgmerge -U --no-wrap -F --backup=none -q $@ $<
+ msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
@touch $@
-%.mo: %.po
- msgfmt -c -o $@ $<
-
$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
@mkdir -p $(dir $@)
cp $< $@
-i18n: $(I18Nmsgs)
+.PHONY: i18n
+i18n: $(I18Nmsgs) $(I18Npot)
+
+### Targets:
+
+libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
-dist: clean
+dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@mkdir $(TMPDIR)/$(ARCHIVE)
@cp -a * $(TMPDIR)/$(ARCHIVE)
- @tar czf $(PACKAGE).tar.gz -C $(TMPDIR) $(ARCHIVE)
+ @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
@-rm -rf $(TMPDIR)/$(ARCHIVE)
- @echo Distribution package created as $(PACKAGE).tar.gz
+ @echo Distribution package created as $(PACKAGE).tgz
clean:
- @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~
-# @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
diff --git a/po/mk_MK.po b/po/mk_MK.po
new file mode 100644
index 0000000..b7701bf
--- /dev/null
+++ b/po/mk_MK.po
@@ -0,0 +1,74 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2012
+# This file is distributed under the same license as the VDR package.
+# Dimitar Petrovski <dimeptr@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: vdr-eepg 0.0.6pre\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2012-10-29 13:42+0100\n"
+"PO-Revision-Date: 2012-10-29 13:44+0100\n"
+"Last-Translator: Dimitar Petrovski <dimeptr@gmail.com>\n"
+"Language-Team: Macedonian <mk@li.org>\n"
+"Language: mk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Parses Extended EPG data"
+msgstr "Анализира Опширни ЕПГ податоци"
+
+msgid "PremiereEPG"
+msgstr "Премиер ЕПГ"
+
+msgid "off"
+msgstr "исклучено"
+
+msgid "Tag option events"
+msgstr "Тагуван опцоини настани"
+
+msgid "Show order information"
+msgstr "Прикажи информации за нарачка"
+
+msgid "Show rating information"
+msgstr "Прикажи информации за рејтинг"
+
+msgid "Fix EPG data"
+msgstr "Поправи ЕПГ податоци"
+
+msgid "General"
+msgstr "Општо"
+
+msgid "Display summary message"
+msgstr "Прикажи сумарна порака"
+
+msgid "Replace Empty Short Text with Category - Genre"
+msgstr "Замени празен Краток Текст со Категорија - Жанр"
+
+msgid "Level of logging verbosity"
+msgstr "Ниво на логирање"
+
+msgid "Process EIT info with EEPG"
+msgstr "Процесирај ЕИТ информации со ЕЕПГ"
+
+msgid "Ordernumber"
+msgstr "Бр. на нарачка"
+
+msgid "Price"
+msgstr "Цена"
+
+msgid "Ordering"
+msgstr "Нарачка"
+
+msgid "SMS"
+msgstr "СМС"
+
+msgid "WWW"
+msgstr "WWW"
+
+msgid "Rating"
+msgstr "Рејтинг"
+
+msgid "years"
+msgstr "години"