duplicates-0.0.5_Makefile-new.diff 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. New Makefile handling up from vdr-1.7.34
  2. completed german translation
  3. minor fixes in .po files
  4. Signed-of-by: Joerg Bornkessel <hd_brummy@gentoo.org> 2015/Jan/03
  5. diff -Naur duplicates-0.0.5.orig/Makefile duplicates-0.0.5/Makefile
  6. --- duplicates-0.0.5.orig/Makefile 2015-02-03 10:40:33.661259290 +0100
  7. +++ duplicates-0.0.5/Makefile 2015-02-03 10:53:20.542203193 +0100
  8. @@ -6,48 +6,50 @@
  9. # The official name of this plugin.
  10. # This name will be used in the '-P...' option of VDR to load the plugin.
  11. # By default the main source file also carries this name.
  12. -# IMPORTANT: the presence of this macro is important for the Make.config
  13. -# file. So it must be defined, even if it is not used here!
  14. -#
  15. +
  16. PLUGIN = duplicates
  17. ### The version number of this plugin (taken from the main source file):
  18. VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
  19. -### The C++ compiler and options:
  20. -
  21. -CXX ?= g++
  22. -CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses
  23. -
  24. ### The directory environment:
  25. -VDRDIR = ../../..
  26. -LIBDIR = ../../lib
  27. -TMPDIR = /tmp
  28. +# Use package data if installed...otherwise assume we're under the VDR source directory:
  29. +PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
  30. +LIBDIR = $(call PKGCFG,libdir)
  31. +LOCDIR = $(call PKGCFG,locdir)
  32. +PLGCFG = $(call PKGCFG,plgcfg)
  33. +#
  34. +TMPDIR ?= /tmp
  35. -### Make sure that necessary options are included:
  36. +### The compiler options:
  37. --include $(VDRDIR)/Make.global
  38. +export CFLAGS = $(call PKGCFG,cflags)
  39. +export CXXFLAGS = $(call PKGCFG,cxxflags)
  40. -### Allow user defined options to overwrite defaults:
  41. +### The version number of VDR's plugin API:
  42. --include $(VDRDIR)/Make.config
  43. +APIVERSION = $(call PKGCFG,apiversion)
  44. -### The version number of VDR's plugin API (taken from VDR's "config.h"):
  45. +### Allow user defined options to overwrite defaults:
  46. -APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
  47. +-include $(PLGCFG)
  48. ### The name of the distribution archive:
  49. ARCHIVE = $(PLUGIN)-$(VERSION)
  50. PACKAGE = vdr-$(ARCHIVE)
  51. +### The name of the shared object file:
  52. +
  53. +SOFILE = libvdr-$(PLUGIN).so
  54. +
  55. ### Includes and Defines (add further entries here):
  56. -INCLUDES += -I$(VDRDIR)/include
  57. +INCLUDES +=
  58. -DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
  59. +DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
  60. ### The object files (add further files here):
  61. @@ -55,52 +57,57 @@
  62. ### The main target:
  63. -all: libvdr-$(PLUGIN).so i18n
  64. +all: $(SOFILE) i18n
  65. ### Implicit rules:
  66. %.o: %.c
  67. - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
  68. + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
  69. ### Dependencies:
  70. MAKEDEP = $(CXX) -MM -MG
  71. DEPFILE = .dependencies
  72. $(DEPFILE): Makefile
  73. - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
  74. + @$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
  75. -include $(DEPFILE)
  76. ### Internationalization (I18N):
  77. PODIR = po
  78. -LOCALEDIR = $(VDRDIR)/locale
  79. I18Npo = $(wildcard $(PODIR)/*.po)
  80. -I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
  81. +I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
  82. +I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
  83. I18Npot = $(PODIR)/$(PLUGIN).pot
  84. %.mo: %.po
  85. msgfmt -c -o $@ $<
  86. $(I18Npot): $(wildcard *.c)
  87. - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ $^
  88. + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
  89. %.po: $(I18Npot)
  90. - msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
  91. + msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
  92. @touch $@
  93. -$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
  94. - @mkdir -p $(dir $@)
  95. - cp $< $@
  96. +$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
  97. + install -D -m644 $< $@
  98. .PHONY: i18n
  99. -i18n: $(I18Nmsgs) $(I18Npot)
  100. +i18n: $(I18Nmo) $(I18Npot)
  101. +
  102. +install-i18n: $(I18Nmsgs)
  103. ### Targets:
  104. -libvdr-$(PLUGIN).so: $(OBJS)
  105. +$(SOFILE): $(OBJS)
  106. $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
  107. - @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
  108. +
  109. +install-lib: $(SOFILE)
  110. + install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
  111. +
  112. +install: install-lib install-i18n
  113. dist: $(I18Npo) clean
  114. @-rm -rf $(TMPDIR)/$(ARCHIVE)
  115. @@ -111,4 +118,5 @@
  116. @echo Distribution package created as $(PACKAGE).tgz
  117. clean:
  118. - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
  119. + @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
  120. + @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
  121. diff -Naur duplicates-0.0.5.orig/Makefile-vdr-1.7.33 duplicates-0.0.5/Makefile-vdr-1.7.33
  122. diff -Naur duplicates-0.0.5.orig/po/de_DE.po duplicates-0.0.5/po/de_DE.po
  123. --- duplicates-0.0.5.orig/po/de_DE.po 2012-12-13 09:32:52.000000000 +0100
  124. +++ duplicates-0.0.5/po/de_DE.po 2015-02-03 11:12:44.879118021 +0100
  125. @@ -5,20 +5,19 @@
  126. #
  127. msgid ""
  128. msgstr ""
  129. -"Project-Id-Version: vdr-duplicates 0.0.1\n"
  130. +"Project-Id-Version: vdr-duplicates 0.0.6\n"
  131. "Report-Msgid-Bugs-To: <see README>\n"
  132. "POT-Creation-Date: 2011-12-20 18:14+0200\n"
  133. -"PO-Revision-Date: 2011-06-05 23:37+0100\n"
  134. -"Last-Translator: Reiner Paulus <flex0r@gmx.net>\n"
  135. +"PO-Revision-Date: 2015-02-03 11:12+0100\n"
  136. +"Last-Translator: Joerg Bornkessel <hd_brummy@gentoo.org>\n"
  137. "Language-Team: \n"
  138. -"Language: \n"
  139. +"Language: de\n"
  140. "MIME-Version: 1.0\n"
  141. -"Content-Type: text/plain; charset=utf-8\n"
  142. +"Content-Type: text/plain; charset=UTF-8\n"
  143. "Content-Transfer-Encoding: 8bit\n"
  144. "Plural-Forms: nplurals=2; plural=(n != 1);\n"
  145. -"X-Poedit-Language: German\n"
  146. -"X-Poedit-Country: GERMANY\n"
  147. -"X-Poedit-SourceCharset: utf-8\n"
  148. +"X-Poedit-SourceCharset: UTF-8\n"
  149. +"X-Generator: Poedit 1.5.5\n"
  150. msgid "Shows duplicate recordings"
  151. msgstr "Zeigt doppelte Aufnahmen an"
  152. @@ -35,4 +34,4 @@
  153. msgstr "%d Aufnahmen ohne Beschreibung"
  154. msgid "Compare title"
  155. -msgstr ""
  156. +msgstr "Vergleiche Titel"
  157. diff -Naur duplicates-0.0.5.orig/po/fi_FI.po duplicates-0.0.5/po/fi_FI.po
  158. --- duplicates-0.0.5.orig/po/fi_FI.po 2015-02-03 10:40:33.661259290 +0100
  159. +++ duplicates-0.0.5/po/fi_FI.po 2015-02-03 11:13:00.607116870 +0100
  160. @@ -12,7 +12,7 @@
  161. "PO-Revision-Date: 2011-12-12 19:57+0300\n"
  162. "Last-Translator: Timo Eskola <timo@tolleri.net>\n"
  163. "Language-Team: Finnish\n"
  164. -"Language: \n"
  165. +"Language: fi\n"
  166. "MIME-Version: 1.0\n"
  167. "Content-Type: text/plain; charset=UTF-8\n"
  168. "Content-Transfer-Encoding: 8bit\n"
  169. diff -Naur duplicates-0.0.5.orig/po/it_IT.po duplicates-0.0.5/po/it_IT.po
  170. --- duplicates-0.0.5.orig/po/it_IT.po 2015-02-03 10:40:33.661259290 +0100
  171. +++ duplicates-0.0.5/po/it_IT.po 2015-02-03 11:13:17.167115659 +0100
  172. @@ -12,7 +12,7 @@
  173. "PO-Revision-Date: 2011-06-05 23:37+0100\n"
  174. "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
  175. "Language-Team: \n"
  176. -"Language: \n"
  177. +"Language: it\n"
  178. "MIME-Version: 1.0\n"
  179. "Content-Type: text/plain; charset=utf-8\n"
  180. "Content-Transfer-Encoding: 8bit\n"