change make install to be really useful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there!

I now switched the ebuilds to use make install. But for that to work I needed 
to modify the Makefile.

install-i18n.diff
Lets install target call install-i18n target.

makefile-destdir.diff:
It add variable DESTDIR to makefile to install under $(DESTDIR) instead of /
It also adds variable CONFDIR (by default identical to $(VIDEODIR)) to be able 
to set it to different value.
Additionally it installs svdrpsend.pl

makefile-install-header.diff:
It adds an install-header target which is also called by target install.
This installs the header files and Make.config to $(HEADERDIR) (should that be 
changed to INCDIR ?)
to be able to compile plugins against the installed vdr without the need to 
keep vdr sources.

Matthias

-- 
Matthias Schwarzott (zzam)
Index: vdr-1.5.7/Makefile
===================================================================
--- vdr-1.5.7.orig/Makefile
+++ vdr-1.5.7/Makefile
@@ -25,6 +25,7 @@ PLUGINDIR= ./PLUGINS
 PLUGINLIBDIR= $(PLUGINDIR)/lib
 
 VIDEODIR = /video
+CONFDIR  = $(VIDEODIR)
 
 DOXYGEN  = /usr/bin/doxygen
 DOXYFILE = Doxyfile
@@ -123,8 +124,8 @@ i18n: $(I18Nmo)
 	    done
 
 install-i18n:
-	@mkdir -p $(LOCDIR)
-	@(cd $(LOCALEDIR); cp -r --parents * $(LOCDIR))
+	@mkdir -p $(DESTDIR)$(LOCDIR)
+	@(cd $(LOCALEDIR); cp -r --parents * $(DESTDIR)$(LOCDIR))
 
 # The 'include' directory (for plugins):
 
@@ -162,30 +163,31 @@ install: install-bin install-i18n instal
 # VDR binary:
 
 install-bin: vdr
-	@mkdir -p $(BINDIR)
-	@cp --remove-destination vdr runvdr $(BINDIR)
+	@mkdir -p $(DESTDIR)$(BINDIR)
+	@cp --remove-destination vdr runvdr svdrpsend.pl $(DESTDIR)$(BINDIR)
 
 # Configuration files:
 
 install-conf:
-	@if [ ! -d $(VIDEODIR) ]; then\
-	    mkdir -p $(VIDEODIR);\
-	    cp *.conf $(VIDEODIR);\
+	@mkdir -p $(DESTDIR)$(VIDEODIR)
+	@if [ ! -d $(DESTDIR)$(CONFDIR) ]; then\
+	    mkdir -p $(DESTDIR)$(CONFDIR);\
+	    cp *.conf $(DESTDIR)$(CONFDIR);\
 	    fi
 
 # Documentation:
 
 install-doc:
-	@mkdir -p $(MANDIR)/man1
-	@mkdir -p $(MANDIR)/man5
-	@gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz
-	@gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz
+	@mkdir -p $(DESTDIR)$(MANDIR)/man1
+	@mkdir -p $(DESTDIR)$(MANDIR)/man5
+	@gzip -c vdr.1 > $(DESTDIR)$(MANDIR)/man1/vdr.1.gz
+	@gzip -c vdr.5 > $(DESTDIR)$(MANDIR)/man5/vdr.5.gz
 
 # Plugins:
 
 install-plugins: plugins
-	@mkdir -p $(PLUGINLIBDIR)
-	@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(PLUGINLIBDIR)
+	@mkdir -p $(DESTDIR)$(PLUGINLIBDIR)
+	@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR)
 
 # Source documentation:
 
Index: vdr-1.5.7/Makefile
===================================================================
--- vdr-1.5.7.orig/Makefile
+++ vdr-1.5.7/Makefile
@@ -20,6 +20,7 @@ BINDIR   = /usr/local/bin
 LOCDIR   = /usr/share/vdr/locale
 LIBS     = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig
 INCLUDES = -I/usr/include/freetype2
+HEADERDIR = /usr/local/include
 
 PLUGINDIR= ./PLUGINS
 PLUGINLIBDIR= $(PLUGINDIR)/lib
@@ -158,7 +159,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:
 
@@ -189,6 +190,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)$(HEADERDIR)/vdr $(DESTDIR)$(HEADERDIR)/vdr/libsi
+	@cp *.h Make.config $(DESTDIR)$(HEADERDIR)/vdr
+	@cp libsi/*.h $(DESTDIR)$(HEADERDIR)/vdr/libsi
+
 # Source documentation:
 
 srcdoc:
Index: vdr-1.4.7/Makefile
===================================================================
--- vdr-1.4.7.orig/Makefile
+++ vdr-1.4.7/Makefile
@@ -24,6 +24,7 @@ PLUGINDIR= ./PLUGINS
 PLUGINLIBDIR= $(PLUGINDIR)/lib
 
 VIDEODIR = /video
+CONFDIR  = $(VIDEODIR)
 
 DOXYGEN  = /usr/bin/doxygen
 DOXYFILE = Doxyfile
@@ -200,30 +201,31 @@ install: install-bin install-conf instal
 # VDR binary:
 
 install-bin: vdr
-	@mkdir -p $(BINDIR)
-	@cp --remove-destination vdr runvdr $(BINDIR)
+	@mkdir -p $(DESTDIR)$(BINDIR)
+	@cp --remove-destination vdr runvdr svdrpsend.pl $(DESTDIR)$(BINDIR)
 
 # Configuration files:
 
 install-conf:
-	@if [ ! -d $(VIDEODIR) ]; then\
-	    mkdir -p $(VIDEODIR);\
-	    cp *.conf $(VIDEODIR);\
+	@mkdir -p $(DESTDIR)$(VIDEODIR)
+	@if [ ! -d $(DESTDIR)$(CONFDIR) ]; then\
+	    mkdir -p $(DESTDIR)$(CONFDIR);\
+	    cp *.conf $(DESTDIR)$(CONFDIR);\
 	    fi
 
 # Documentation:
 
 install-doc:
-	@mkdir -p $(MANDIR)/man1
-	@mkdir -p $(MANDIR)/man5
-	@gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz
-	@gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz
+	@mkdir -p $(DESTDIR)$(MANDIR)/man1
+	@mkdir -p $(DESTDIR)$(MANDIR)/man5
+	@gzip -c vdr.1 > $(DESTDIR)$(MANDIR)/man1/vdr.1.gz
+	@gzip -c vdr.5 > $(DESTDIR)$(MANDIR)/man5/vdr.5.gz
 
 # Plugins:
 
 install-plugins: plugins
-	@mkdir -p $(PLUGINLIBDIR)
-	@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(PLUGINLIBDIR)
+	@mkdir -p $(DESTDIR)$(PLUGINLIBDIR)
+	@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR)
 
 # Source documentation:
 
Index: vdr-1.4.7/Makefile
===================================================================
--- vdr-1.4.7.orig/Makefile
+++ vdr-1.4.7/Makefile
@@ -19,6 +19,7 @@ MANDIR   = /usr/local/man
 BINDIR   = /usr/local/bin
 LIBS     = -ljpeg -lpthread -ldl -lcap
 INCLUDES =
+HEADERDIR = /usr/local/include
 
 PLUGINDIR= ./PLUGINS
 PLUGINLIBDIR= $(PLUGINDIR)/lib
@@ -196,7 +197,7 @@ clean-plugins:
 
 # Install the files:
 
-install: install-bin install-conf install-doc install-plugins
+install: install-bin install-conf install-doc install-plugins install-header
 
 # VDR binary:
 
@@ -227,6 +228,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)$(HEADERDIR)/vdr $(DESTDIR)$(HEADERDIR)/vdr/libsi
+	@cp *.h Make.config $(DESTDIR)$(HEADERDIR)/vdr
+	@cp libsi/*.h $(DESTDIR)$(HEADERDIR)/vdr/libsi
+
 # Source documentation:
 
 srcdoc:
Index: vdr-1.5.7/Makefile
===================================================================
--- vdr-1.5.7.orig/Makefile
+++ vdr-1.5.7/Makefile
@@ -157,7 +157,7 @@ clean-plugins:
 
 # Install the files:
 
-install: install-bin install-conf install-doc install-plugins
+install: install-bin install-i18n install-conf install-doc install-plugins
 
 # VDR binary:
 
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux