From patchwork Wed Aug 15 10:57:49 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 12502 Received: from mail-out.m-online.net ([212.18.0.10]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1ILGZZ-00031j-Hy for vdr@linuxtv.org; Wed, 15 Aug 2007 12:57:57 +0200 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id C02E8222D87 for ; Wed, 15 Aug 2007 12:57:52 +0200 (CEST) Received: from gauss.x.fun (DSL01.83.171.183.164.ip-pool.NEFkom.net [83.171.183.164]) by mail.nefkom.net (Postfix) with ESMTP id 7CE809097A for ; Wed, 15 Aug 2007 12:57:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by gauss.x.fun (Postfix) with ESMTP id 3F777F72C8 for ; Wed, 15 Aug 2007 12:57:51 +0200 (CEST) From: Matthias Schwarzott To: VDR Mailing List Date: Wed, 15 Aug 2007 12:57:49 +0200 User-Agent: KMail/1.9.7 References: <200708131830.21902.zzam@gentoo.org> <46C1DC9F.403@gmx.de> <46C1F8E4.801@o2.pl> In-Reply-To: <46C1F8E4.801@o2.pl> MIME-Version: 1.0 Message-Id: <200708151257.50388.zzam@gentoo.org> Subject: Re: [vdr] change make install to be really useful 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, 15 Aug 2007 10:57:57 -0000 Status: O X-Status: X-Keywords: X-UID: 13736 On Dienstag, 14. August 2007, Artur Skawina wrote: > Udo Richter wrote: > > Matthias Schwarzott wrote: > >> makefile-destdir.diff: > >> It add variable DESTDIR to makefile to install under $(DESTDIR) instead > >> of / > > > > I would prefer something like DESTDIR=/usr/local that can be redirected > > to /usr or /tmp/newpackage/usr or similar, just as many configure > > scripts do it. On the downside, this wouldn't work for > > $(DESTDIR)$(VIDEODIR). > > the usual convention is PREFIX, which defaults to '/usr/local' and can be > changed to eg '/usr/' or '/sw/vdr-1.6.0' etc. > DESTDIR is completely independent -- it adds _another_ prefix; this is used > eg when building packages. > So "make install DESTDIR=/tmp/BLD-38746 PREFIX=/sw/vdr-1.6.0" > means to assume the program will be installed in /sw/vdr-1.6.0 (and look > for config files in /sw/vdr-1.6.0/etc/, binaries in /sw/vdr-1.6.0/bin/ > etc), but to copy all the files to /tmp/BLD-38746/sw/vdr-1.6.0. This way > you can build a package w/o disturbing the /sw/ tree and install using a > package manager later. I updated the patch to use DESTDIR and PREFIX. Comments on installing header files and Make.config? Should Make.config go to $PREFIX/share/vdr ? Matthias Index: vdr-1.5.7/Makefile =================================================================== --- vdr-1.5.7.orig/Makefile +++ vdr-1.5.7/Makefile @@ -20,6 +20,7 @@ PREFIX ?= /usr/local MANDIR = $(PREFIX)/man BINDIR = $(PREFIX)/bin LOCDIR = $(PREFIX)/share/vdr/locale +INCDIR = $(PREFIX)/include LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig INCLUDES = -I/usr/include/freetype2 @@ -160,7 +161,7 @@ clean-plugins: # Install the files: -install: install-bin install-i18n install-conf install-doc install-plugins +install: install-bin install-i18n install-conf install-doc install-plugins install-header # VDR binary: @@ -191,6 +192,13 @@ install-plugins: plugins @mkdir -p $(DESTDIR)$(PLUGINLIBDIR) @cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR) +# Header files: + +install-header: + @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi + @cp *.h Make.config $(DESTDIR)$(INCDIR)/vdr + @cp libsi/*.h $(DESTDIR)$(INCDIR)/vdr/libsi + # Source documentation: srcdoc: