From patchwork Wed Mar 12 20:50:36 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ville_Skytt=C3=A4?= X-Patchwork-Id: 12631 Received: from smtp4.pp.htv.fi ([213.243.153.38]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JZXuL-0006fU-4B for vdr@linuxtv.org; Wed, 12 Mar 2008 21:50:44 +0100 Received: from viper.bobcat.mine.nu.bobcat.mine.nu (cs181065188.pp.htv.fi [82.181.65.188]) by smtp4.pp.htv.fi (Postfix) with ESMTP id 2FEFB5BC025 for ; Wed, 12 Mar 2008 22:50:37 +0200 (EET) From: Ville =?iso-8859-1?q?Skytt=E4?= To: VDR Mailing List Date: Wed, 12 Mar 2008 22:50:36 +0200 User-Agent: KMail/1.9.9 References: <200803102318.20255.ville.skytta@iki.fi> <20080311151634.W44873@unqrf.nqzva.sez2> <6ecffcab0803120013n263d939ct94ded9fe815a489@mail.gmail.com> In-Reply-To: <6ecffcab0803120013n263d939ct94ded9fe815a489@mail.gmail.com> MIME-Version: 1.0 Message-Id: <200803122250.37396.ville.skytta@iki.fi> X-LSpam-Score: 0.0 (/) Subject: Re: [vdr] [PATCH] Install headers, add pkgconfig file X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 20:50:44 -0000 Status: O X-Status: X-Keywords: X-UID: 16126 On Wednesday 12 March 2008, clemens kirchgatterer wrote: > On Tue, Mar 11, 2008 at 3:46 PM, Joerg Pulz wrote: > > Out of this four cases (there are probably more, one for every Linux > > distribution on this planet), tell me which is the most reasonable > > default? > > the most reasonable default is simply to put vdr.pc in > [$(DESTDIR)/]$(PREFIX)/lib/pkgconfig. for cases that this is not > appropriate, there is $PKG_CONFIG_PATH. Agreed. The second revision of the patch is attached; compared to the first one this also installs the *.pc file to the first (colon separated) component of $PKG_CONFIG_PATH, or to $(PREFIX)/lib/pkgconfig if $PKG_CONFIG_PATH is not set in the environment. Unless I've missed something, as far as I'm concerned this is good enough to go in. By the way, if someone's interested, the bug I reported against pkg-config because it can't be queried for its default *.pc dirs is https://bugs.freedesktop.org/show_bug.cgi?id=14975 --- Makefile.orig 2008-03-06 21:29:58.000000000 +0200 +++ Makefile 2008-03-12 22:41:54.000000000 +0200 @@ -21,2 +21,3 @@ BINDIR = $(PREFIX)/bin +INCLUDEDIR = $(PREFIX)/include LOCDIR = ./locale @@ -34,2 +35,4 @@ +PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(PREFIX)/lib/pkgconfig)) + -include Make.config @@ -77,3 +80,3 @@ -all: vdr i18n +all: vdr i18n vdr.pc @@ -103,2 +106,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 +183,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 install-pc @@ -194,2 +215,16 @@ +# Headers: + +install-includes: include-dir + @mkdir -p $(DESTDIR)$(INCLUDEDIR) + @cp -pR include/vdr include/libsi $(DESTDIR)$(INCLUDEDIR) + +# pkg-config file: + +install-pc: vdr.pc + if [ -n "$(PCDIR)" ] ; then \ + mkdir -p $(DESTDIR)$(PCDIR) ; \ + cp vdr.pc $(DESTDIR)$(PCDIR) ; \ + fi + # Source documentation: @@ -206,3 +241,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