summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--Makefile38
3 files changed, 36 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6ae3a383..257ff954 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1924,6 +1924,7 @@ Ville Skyttä <ville.skytta@iki.fi>
for making the Makefile also install the include files
for fixing a crash when deleting a recording while cutting it
for fixing several spelling errors
+ for adding generating a pkg-config file to the Makefile
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
diff --git a/HISTORY b/HISTORY
index a0f71954..65abb3e2 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6773,3 +6773,4 @@ Video Disk Recorder Revision History
- Fixed several spelling errors (thanks to Ville Skyttä).
- The new SVDRP command UPDR can be used to trigger an update of the list of
recordings (thanks to Lars Hanisch).
+- Added generating a pkg-config file to the Makefile (thanks to Ville Skyttä).
diff --git a/Makefile b/Makefile
index 18d7eb96..ef1d1289 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 2.18 2011/05/21 12:21:40 kls Exp $
+# $Id: Makefile 2.19 2011/12/04 14:09:37 kls Exp $
.DELETE_ON_ERROR:
@@ -33,6 +33,8 @@ CONFDIR = $(VIDEODIR)
DOXYGEN = /usr/bin/doxygen
DOXYFILE = Doxyfile
+PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(shell pkg-config --variable=pc_path pkg-config):$(PREFIX)/lib/pkgconfig))
+
include Make.global
-include Make.config
@@ -77,7 +79,7 @@ DEFINES += -DLOCDIR=\"$(LOCDIR)\"
VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
-all: vdr i18n
+all: vdr i18n vdr.pc
# Implicit rules:
@@ -103,6 +105,26 @@ vdr: $(OBJS) $(SILIB)
$(SILIB):
$(MAKE) -C $(LSIDIR) all
+# pkg-config file:
+
+vdr.pc: Makefile Make.global
+ @echo "bindir=$(BINDIR)" > $@
+ @echo "includedir=$(INCDIR)" >> $@
+ @echo "configdir=$(CONFDIR)" >> $@
+ @echo "videodir=$(VIDEODIR)" >> $@
+ @echo "plugindir=$(PLUGINLIBDIR)" >> $@
+ @echo "localedir=$(LOCDIR)" >> $@
+ @echo "apiversion=$(APIVERSION)" >> $@
+ @echo "cflags=$(CXXFLAGS) $(DEFINES) -I\$${includedir}" >> $@
+ @echo "plugincflags=\$${cflags} -fPIC" >> $@
+ @echo "" >> $@
+ @echo "Name: VDR" >> $@
+ @echo "Description: Video Disk Recorder" >> $@
+ @echo "URL: http://www.tvdr.de/" >> $@
+ @echo "Version: $(VDRVERSION)" >> $@
+ @echo "Requires: freetype2 fontconfig" >> $@
+ @echo "Cflags: \$${cflags}" >> $@
+
# Internationalization (I18N):
PODIR = po
@@ -163,7 +185,7 @@ clean-plugins:
# Install the files:
-install: install-bin install-conf install-doc install-plugins install-i18n install-includes
+install: install-bin install-conf install-doc install-plugins install-i18n install-includes install-pc
# VDR binary:
@@ -200,6 +222,14 @@ install-includes: include-dir
@mkdir -p $(DESTDIR)$(INCDIR)
@cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
+# pkg-config file:
+
+install-pc: vdr.pc
+ if [ -n "$(PCDIR)" ] ; then \
+ mkdir -p $(DESTDIR)$(PCDIR) ; \
+ cp vdr.pc $(DESTDIR)$(PCDIR) ; \
+ fi
+
# Source documentation:
srcdoc:
@@ -212,7 +242,7 @@ srcdoc:
clean:
$(MAKE) -C $(LSIDIR) clean
- -rm -f $(OBJS) $(DEPFILE) vdr core* *~
+ -rm -f $(OBJS) $(DEPFILE) vdr vdr.pc core* *~
-rm -rf $(LOCALEDIR) $(PODIR)/*.mo $(PODIR)/*.pot
-rm -rf include
-rm -rf srcdoc