[PATCH] Re: [MPlayer-dev-eng] [PATCH] installing DOCS/ during make install

seru seru at gmx.net
Thu Dec 26 23:22:09 CET 2002


El jue, 26 de dic de 2002, a las 11:19:02 +0100, Dominik Mierzejewski dijo:
> On Thursday, 26 December 2002, seru wrote:
> [...]
> > +	-ln -sf mplayer.1 $(MANDIR)/man1/de/mencoder.1
> > +	-ln -sf mplayer.1 $(MANDIR)/man1/fr/mencoder.1
> > +	-ln -sf mplayer.1 $(MANDIR)/man1/hu/mencoder.1
> > +	-ln -sf mplayer.1 $(MANDIR)/man1/pl/mencoder.1
> 
> One: that's not how man links should be done and two: you messed up
> locale dirs. I suggest this:
DUH! stupid me!!! New patch included!
> 
> +	echo ".so mplayer.1" > $(MANDIR)/de/man1/mencoder.1
> +	echo ".so mplayer.1" > $(MANDIR)/fr/man1/mencoder.1
> +	echo ".so mplayer.1" > $(MANDIR)/hu/man1/mencoder.1
> +	echo ".so mplayer.1" > $(MANDIR)/pl/man1/mencoder.1
> 
> -- 
> MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
> "The Universe doesn't give you any points for doing things that are easy."
>         -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.240
diff -u -r1.240 Makefile
--- Makefile	22 Dec 2002 21:00:46 -0000	1.240
+++ Makefile	26 Dec 2002 22:42:44 -0000
@@ -246,43 +246,117 @@
 ifeq ($(SHARED_PP),yes)
 	$(MAKE) install -C postproc 
 endif
-	if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi
+# Install binary
+	$(INSTALL) -m 755 -d $(BINDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG) $(BINDIR)/$(PRG)
+ifeq ($(MENCODER),yes)
+	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
+endif
 ifeq ($(GUI),yes)
 	-ln -sf $(PRG) $(BINDIR)/gmplayer
 endif
-	if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
+# Install manpages
+	$(INSTALL) -m 755 -d $(MANDIR)/de
+	$(INSTALL) -m 755 -d $(MANDIR)/fr
+	$(INSTALL) -m 755 -d $(MANDIR)/pl
+	$(INSTALL) -m 755 -d $(MANDIR)/hu
+	$(INSTALL) -m 755 -d $(MANDIR)/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/de/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/fr/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/hu/man1
+	$(INSTALL) -m 755 -d $(MANDIR)/pl/man1
 	$(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
-ifeq ($(MENCODER),yes)
-	$(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
-	-ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1
-endif
-	@if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
-	@if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi
+	$(INSTALL) -c -m 644 DOCS/German/mplayer.1 $(MANDIR)/de/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/French/mplayer.1 $(MANDIR)/fr/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/Hungrian/mplayer.1 $(MANDIR)/hu/man1/mplayer.1
+	$(INSTALL) -c -m 644 DOCS/Polish/mplayer.1 $(MANDIR)/pl/man1/mplayer.1
+	echo ".so mplayer.1" > $(MANDIR)/man1/mencoder.1
+	echo ".so mplayer.1" > $(MANDIR)/de/man1/mencoder.1
+	echo ".so mplayer.1" > $(MANDIR)/fr/man1/mencoder.1
+	echo ".so mplayer.1" > $(MANDIR)/hu/man1/mencoder.1
+	echo ".so mplayer.1" > $(MANDIR)/pl/man1/mencoder.1
+# Install html and tech docs
+	$(INSTALL) -m 755 -d $(DOCSDIR)
+ifeq($(INSTALL_DOCS_EN),yes)
+	for en_docs in DOCS/*.html; do \
+		$(INSTALL) -m 644 $$en_docs $(DOCSDIR); \
+	done  
+endif
+ifeq($(INSTALL_DOCS_CN),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Chinese
+	for cn_docs in DOCS/Chinese/*.html; do \
+                $(INSTALL) -m 644 $$cn_docs $(DOCSDIR)/Chinese; \
+	 done
+endif
+ifeq($(INSTALL_DOCS_DE),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/German
+	for cn_docs in DOCS/German/*.html; do \
+                $(INSTALL) -m 644 $$de_docs $(DOCSDIR)/German; \
+        done
+endif
+ifeq($(INSTALL_DOCS_FR),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/French
+	for cn_docs in DOCS/French/*.html; do \
+                $(INSTALL) -m 644 $$fr_docs $(DOCSDIR)/French; \
+        done
+endif
+ifeq($(INSTALL_DOCS_HU),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Hungrian
+	for hu_docs in DOCS/Hungrian/*.html; do \
+                $(INSTALL) -m 644 $$hu_docs $(DOCSDIR)/Hungrian; \
+        done
+endif
+ifeq($(INSTALL_DOCS_IT),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Italian
+	for it_docs in DOCS/Italian/*.html; do \
+                $(INSTALL) -m 644 $$it_docs $(DOCSDIR)/Italian; \
+        done
+endif
+ifeq($(INSTALL_DOCS_PL),yes) 
+       $(INSTALL) -m 755 -d $(DOCSDIR)/Polish
+	for pl_docs in DOCS/Polish/*.html; do \
+                $(INSTALL) -m 644 $$pl_docs $(DOCSDIR)/Polish; \
+        done
+endif
+	$(INSTALL) -m 755 -d $(DOCSDIR)/tech
+	$(INSTALL) -m 755 -d $(DOCSDIR)/tech/realcodecs
+	for techdocs in `find DOCS/tech/ -type f -maxdepth 1`; do \
+               $(INSTALL) -m 644 $$techdocs $(DOCSDIR)/tech; \
+	done
+	for realcodecs in `find DOCS/tech/realcodecs -type f -maxdepth 1`; do \
+               $(INSTALL) -m 644 $$realcodecs $(DOCSDIR)/tech/realcodecs; \
+	done
+	@echo "*** Installed documentation to $(DOCSDIR)"
+# Install fonts, skins
+	$(INSTALL) -m 755 -d $(DATADIR)
+	$(INSTALL) -m 755 -d $(DATADIR)/font
 	@if test ! -f $(DATADIR)/font/font.desc ; then \
 	echo "*** Download font at http://www.mplayerhq.hu/homepage/dload.html" ; \
 	echo "*** for OSD/Subtitles support and extract to $(DATADIR)/font/" ; \
 	fi
 ifeq ($(GUI),yes)
-	@if test ! -d $(DATADIR)/Skin ; then mkdir -p $(DATADIR)/Skin ; fi
+	$(INSTALL) -m 755 -d $(DATADIR)/Skin
 	@echo "*** Download skin(s) at http://www.mplayerhq.hu/homepage/dload.html"
 	@echo "*** for GUI, and extract to $(DATADIR)/Skin/"
 endif
-	@if test ! -d $(CONFDIR) ; then mkdir -p $(CONFDIR) ; fi
+# Install codecs
+	$(INSTALL) -m 755 -d $(CONFDIR)
 	@if test -f $(CONFDIR)/codecs.conf.old ; then mv -f $(CONFDIR)/codecs.conf.old $(CONFDIR)/codecs.conf.older ; fi
 	@if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
 	$(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf
+# Install libmpdvdkit
 ifeq ($(DVDKIT_SHARED),yes)
 ifeq ($(DVDKIT2),yes)
-	if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
+	$(INSTALL) -m 755 -d $(LIBDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit2/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
 else
 ifeq ($(DVDKIT),yes)
-	if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
+	$(INSTALL) -m 755 -d $(LIBDIR)
 	$(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
 endif
 endif
 endif
+# Install fibmap_mplayer
 ifeq ($(CSS_USE),yes)
 	@echo "The following task requires root privileges. If it fails don't panic,"
 	@echo "however it means you can't use fibmap_mplayer."
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.625
diff -u -r1.625 configure
--- configure	23 Dec 2002 00:33:05 -0000	1.625
+++ configure	26 Dec 2002 22:42:56 -0000
@@ -105,8 +105,8 @@
   *)	_echo_n='-n '	_echo_c=	;;	# BSD echo
 esac
 
-LANGUAGES=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s/help_mp-\(..\).h/\1/g" |sed "s/help_mp-\(.....\).h/\1/g"`
-
+LANGUAGES_AVAILABLE=`echo help/help_mp-??.h help/help_mp-??_??.h | sed "s/help\/help_mp-\(..\).h/\1/g" |sed "s/help\/help_mp-\(.....\).h/\1/g"`
+DOCS_LANGUAGES_DEFAULT="de,en,fr,hu,it,pl,zh_CN"
 for parm in "$@" ; do
   if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then
     cat << EOF
@@ -124,8 +124,10 @@
                          data files (fonts, skins) [PREFIX/share/mplayer]
   --mandir=DIR           use this prefix for installing manpages [PREFIX/man]
   --confdir=DIR          use this prefix for installing configuration files
-                         [same as datadir]
+                         [PREFIX/share/mplayer]
   --libdir=DIR           use this prefix for object code libraries [PREFIX/lib]
+  --docsdir=DIR          use this prefix for installing the documentation 
+                         [PREFIX/doc/mplayer]
 
 Optional features:
   --disable-mencoder     disable mencoder (a/v encoder) compilation [enable]
@@ -223,7 +225,9 @@
   --enable-static        build a statically linked binary. Set further linking
                          options with --enable-static="-lslang -lncurses"
   --language=xx          select a language (for translated messages/gui) [en]
-                         (Available: $LANGUAGES)
+                         (Available: $LANGUAGES_AVAILABLE)
+  --docs-languages=xx    select html docs to be installed 
+                         [$DOCS_LANGUAGES_DEFAULT]
   --enable-shared-pp     install & use shared postprocessing lib
   --install-path=PATH    the path to a custom install program (useful if
                          your OS uses a GNU-incompatible install utility by
@@ -1022,6 +1026,7 @@
 _bl=no
 _largefiles=no
 _language=en
+_docs_languages=$DOCS_LANGUAGES_DEFAULT
 _shm=auto
 _linux_devfs=no
 _i18n=auto
@@ -1238,6 +1243,9 @@
   --language=*)
     LINGUAS=`echo $ac_option | cut -d '=' -f 2`
     ;;
+  --docs-languages=*)
+    DOCS_INSTALL=`echo $ac_option | cut -d '=' -f 2`
+    ;;
   --with-libdvdnav=*)
     _dvdnavdir=`echo $ac_option | cut -d '=' -f 2`
     _dvdnav=yes
@@ -1383,6 +1391,7 @@
 test -z "$_mandir" && _mandir="$_prefix/man"
 test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
 test -z "$_libdir" && _libdir="$_prefix/lib"
+test -z "$_docsdir" && _docsdir="$_prefix/doc/mplayer"
 test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
 
 if x86 ; then
@@ -1550,7 +1559,6 @@
 fi
 echores "$_i18n"
 
-
 # Checking for setlocale() ...
 # CSAK EGY MARADHAT - A HEGYLAKO
 # Nemnem. a TV Maci !
@@ -1570,7 +1578,6 @@
 fi
 echores "$_setlocale"
 
-
 echocheck "language"
 test -z "$LINGUAS" && LINGUAS="en"
 if test -f "help/help_mp-${LINGUAS}.h" ; then
@@ -1582,6 +1589,44 @@
 _mp_help="help/help_mp-${LINGUAS}.h"
 test -f $_mp_help || die "$_mp_help not found"
 
+echocheck "html docs"
+if test "`echo $DOCS_INSTALL | grep zh_CN`" ; then
+ _install_docs_cn=yes
+else
+ _install_docs_cn=no
+fi
+if test "`echo $DOCS_INSTALL | grep en`" ; then
+ _install_docs_en=yes
+else
+ _install_docs_en=no
+fi
+if test "`echo $DOCS_INSTALL | grep de`" ; then
+ _install_docs_de=yes
+else
+ _install_docs_de=no
+fi
+if test "`echo $DOCS_INSTALL | grep fr`" ; then
+ _install_docs_fr=yes
+else
+ _install_docs_rf=no
+fi
+if test "`echo $DOCS_INSTALL | grep hu`" ; then
+ _install_docs_hu=yes
+else
+ _install_docs_hu=no
+fi
+if test "`echo $DOCS_INSTALL | grep it`" ; then
+ _install_docs_it=yes
+else
+ _install_docs_it=no
+fi
+if test "`echo $DOCS_INSTALL | grep pl`" ; then
+ _install_docs_pl=yes
+else
+ _install_docs_pl=no
+fi
+echores "using ${DOCS_INSTALL}"
+
 echocheck "enable sighandler"
 if test "$_sighandler" = yes ; then
   _def_sighandler='#define ENABLE_SIGHANDLER 1'
@@ -4651,6 +4696,7 @@
 MANDIR = \$(DESTDIR)$_mandir
 CONFDIR = \$(DESTDIR)$_confdir
 LIBDIR = \$(DESTDIR)$_libdir
+DOCSDIR = \$(DESTDIR)$_docsdir
 #AR = ar
 CC = $_cc
 AWK = $_awk
@@ -4769,6 +4815,15 @@
 GTK_LIBS =  $_ld_static $_ld_gui
 GUI = $_gui
 DEBUG = -DDEBUG
+
+# --- Install international HTML docs ---
+INSTALL_DOCS_CN = $_install_docs_cn
+INSTALL_DOCS_DE = $_install_docs_de
+INSTALL_DOCS_EN = $_install_docs_en
+INSTALL_DOCS_FR = $_install_docs_fr
+INSTALL_DOCS_HU = $_install_docs_hu
+INSTALL_DOCS_IT = $_install_docs_it
+INSTALL_DOCS_PL = $_install_docs_pl
 
 EOF
 


More information about the MPlayer-dev-eng mailing list