Hello,

As discussed in the freetype/fontconfig pkgconfig thread, here's a combined 
patch implementing installation of VDR's headers and generating a pkgconfig 
*.pc file.

This patch is mostly just a discussion draft - I haven't tried installing the 
headers and the pkgconfig file isn't installed yet by any "make install*" 
(mostly because very ironically, there's no way to query pkg-config for its 
default search path, which is something I've intended to report a bug about 
since a long time ago, but failed so far - maybe I'll do it right now :)).  

Also, I don't know if all *.h are actually something that should be installed 
by "install-headers", but since they're all available in the current setup 
for plugins to use too, I suppose weeding through them is an orthogonal task 
to this patch if needed in the first place (and maybe better discussed in 
the "RFC: Makefile ravamp" [sic] thread from Sat 8th Mar).
--- Makefile~	2008-03-06 21:29:58.000000000 +0200
+++ Makefile	2008-03-10 23:05:48.000000000 +0200
@@ -21,2 +21,3 @@
 BINDIR   = $(PREFIX)/bin
+INCLUDEDIR = $(PREFIX)/include
 LOCDIR   = ./locale
@@ -77,3 +78,3 @@
 
-all: vdr i18n
+all: vdr vdr.pc i18n
 
@@ -103,2 +104,19 @@
 
+# pkg-config file:
+
+vdr.pc: Makefile
+	echo "bindir=$(BINDIR)" > $@
+	echo "includedir=$(INCLUDEDIR)" >> $@
+	echo "confdir=$(CONFDIR)" >> $@
+	echo "videodir=$(VIDEODIR)" >> $@
+	echo "plugindir=$(PLUGINLIBDIR)" >> $@
+	echo "localedir=$(LOCDIR)" >> $@
+	echo "apiversion=$(APIVERSION)" >> $@
+	echo "" >> $@
+	echo "Name: VDR" >> $@
+	echo "Description: Video Disk Recorder" >> $@
+	echo "URL: http://www.cadsoft.de/vdr/"; >> $@
+	echo "Version: $(VDRVERSION)" >> $@
+	echo "Cflags: $(CXXFLAGS) -I$(INCLUDEDIR)" >> $@
+
 # Internationalization (I18N):
@@ -163,3 +181,4 @@
 
-install: install-bin install-conf install-doc install-plugins install-i18n
+install: install-bin install-conf install-doc install-plugins install-i18n \
+	install-includes
 
@@ -194,2 +213,8 @@
 
+# Headers:
+
+install-includes: include-dir
+	@mkdir -p $(DESTDIR)$(INCLUDEDIR)
+	@cp -pR include/vdr include/libsi $(DESTDIR)$(INCLUDEDIR)
+
 # Source documentation:
@@ -206,3 +231,3 @@
 	$(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
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to