Browse Source

updated texlive-vl.spec

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5214 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 12 years ago
parent
commit
72e1f3b16c
2 changed files with 110 additions and 5 deletions
  1. 74 0
      t/texlive/find-provides-texlive.sh
  2. 36 5
      t/texlive/texlive-vl.spec

+ 74 - 0
t/texlive/find-provides-texlive.sh

@@ -0,0 +1,74 @@
+#!/bin/bash
+# find-provides-texlive.sh
+# based on /usr/lib/rpm/find-provides
+
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+
+# VINE: newer objdump (in binutils) has translated messages,
+# so at a moment we need to set LANG to C
+
+LANG=C 
+
+
+filelist=`sed "s/['\"]/\\\&/g"`
+
+solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \
+	xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1)
+pythonlist=
+tcllist=
+
+#
+# --- Alpha does not mark 64bit dependencies
+case `uname -m` in
+  alpha*)	mark64="" ;;
+  *)		mark64="()(64bit)" ;;
+esac
+
+#
+# --- Library sonames and weak symbol versions (from glibc).
+for f in $solist; do
+    soname=$(objdump -p $f | awk '/SONAME/ {print $2}')
+
+    lib64=`if file -L $f 2>/dev/null | \
+	grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
+    if [ "$soname" != "" ]; then
+	if [ ! -L $f ]; then
+	    echo $soname$lib64
+	    objdump -p $f | awk '
+		BEGIN { START=0 ; }
+		/Version definitions:/ { START=1; }
+		/^[0-9]/ && (START==1) { print $4; }
+		/^$/ { START=0; }
+	    ' | \
+		grep -v $soname | \
+		while read symbol ; do
+		    echo "$soname($symbol)`echo $lib64 | sed 's/()//'`"
+		done
+	fi
+    else
+	echo ${f##*/}$lib64
+    fi
+done | sort -u
+
+# #
+# # --- Perl modules.
+# [ -x /usr/lib/rpm/perl.prov ] &&
+#     echo $filelist | tr '[:blank:]' \\n | grep '\.pm$' | /usr/lib/rpm/perl.prov | sort -u
+
+# #
+# # --- Python modules.
+# [ -x /usr/lib/rpm/python.prov -a -n "$pythonlist" ] &&
+#     echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.prov | sort -u
+
+# #
+# # --- Tcl modules.
+# [ -x /usr/lib/rpm/tcl.prov -a -n "$tcllist" ] &&
+#     echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.prov | sort -u
+
+# #
+# # --- Mono modules.
+# [ -x /usr/lib/rpm/mono-find-provides -a -n "$filelist" ] &&
+#     echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/mono-find-provides | sort -u
+
+exit 0

+ 36 - 5
t/texlive/texlive-vl.spec

@@ -7,7 +7,7 @@
 %endif
 
 %global _use_internal_dependency_generator 0
-%global __find_provides %{nil}
+%global __find_provides %{SOURCE99}
 %global __find_requires %{nil}
 
 %define tl11suppver	111120
@@ -34,7 +34,7 @@ Summary: The TeX text formatting system
 Summary(ja): TeX 文書整形システム
 Name: texlive
 Version: 2011
-Release: 1%{?_dist_release}
+Release: 2%{?_dist_release}
 License: distributable
 Group: Applications/Publishing
 URL: http://www.tug.org/texlive/
@@ -49,9 +49,13 @@ Source9: __usr_bin_symlink.sh
 Source10: pxdvi.desktop
 Source11: texdoctk.desktop
 
+## find library sonames for libkpathsea and libptexenc
+Source99: find-provides-texlive.sh
+
 ## etc...
 Source100: texlive.cron
 Source102: http://auemath.aichi-edu.ac.jp/~khotta/ghost/disk1/jtygm.sty
+Source110: http://mirrors.ctan.org/obsolete/support/pdftexenc/cmex.enc
 
 
 ######
@@ -300,7 +304,11 @@ yes N | scripts/font.sh %{tl11supp_all_opts} || exit 1
   %__rm -f %{build_tex_destdir}/texmf-dist || exit 1
 ## remove lcdf-typetools-for-tex-live directory
 %__rm -r %{build_tex_destdir}/lcdf-typetools-for-tex-live || exit 1
+## remove unused directories in texmf/fonts/map
+%__rm -rf %{build_texmf}/fonts/map/dvips/updmap || exit 1
+%__rm -rf %{build_texmf}/fonts/map/pdftex/updmap || exit 1
 
+## move bin, lib include, man, info to /usr, resp. 
 %__rm -f %{build_tex_destdir}/bin/man || exit 1
 %__mv %{build_tex_destdir}/bin %{buildroot}%{_bindir} || exit 1
 %__mv %{build_tex_destdir}/lib %{buildroot}%{_libdir} || exit 1
@@ -308,7 +316,7 @@ yes N | scripts/font.sh %{tl11supp_all_opts} || exit 1
 %__cp -ar %{build_texmf}/doc/man %{buildroot}%{_mandir} || exit 1
 #%__mv %{build_texmf}/doc/info %{buildroot}%{_infodir} || exit 1
 
-## 
+## move dvipdfmx/newmap/{ptex,otf} to dvipdfmx/{ptex,otf}, resp. 
 %__mv %{build_texmf}/fonts/map/dvipdfmx/newmap/* %{build_texmf}/fonts/map/dvipdfmx/ || exit 1
 %__rm -rf %{build_texmf}/fonts/map/dvipdfmx/newmap
 
@@ -429,7 +437,7 @@ for i in ${del_symlnks[@]}; do
     %__rm -f %{buildroot}$(echo $i | cut -f 2 -d",") || exit 1
 done
 
-## remove psutils
+## remove man files of psutils
 %__rm \
   %{buildroot}%{_mandir}/man1/epsffit.1 \
   %{buildroot}%{_mandir}/man1/extractres.1 \
@@ -451,6 +459,20 @@ done
   %{buildroot}%{_mandir}/man1/psselect.1 \
   %{buildroot}%{_mandir}/man1/pstops.1 \
   || exit 1
+## remove man files of lcdf-typetools
+%__rm \
+  %{buildroot}%{_mandir}/man1/cfftot1.1 \
+  %{buildroot}%{_mandir}/man1/mmafm.1 \
+  %{buildroot}%{_mandir}/man1/mmpfb.1 \
+  %{buildroot}%{_mandir}/man1/otfinfo.1 \
+  %{buildroot}%{_mandir}/man1/otftotfm.1 \
+  %{buildroot}%{_mandir}/man1/t1dotlessj.1 \
+  %{buildroot}%{_mandir}/man1/t1lint.1 \
+  %{buildroot}%{_mandir}/man1/t1rawafm.1 \
+  %{buildroot}%{_mandir}/man1/t1reencode.1 \
+  %{buildroot}%{_mandir}/man1/t1testpage.1 \
+  %{buildroot}%{_mandir}/man1/ttftotype42.1 \
+  || exit 1
 
 # remove unpackaged files
 find $RPM_BUILD_ROOT -name *.la -exec %__rm -f {} \;
@@ -508,7 +530,7 @@ find %{buildroot}%{texmf}* -type d | \
 	   -e "s|$|/|" >> %{_builddir}/%{name}-%{version}/filelist.full
 
 ## subpackages
-%__grep "/texmf/doc/" %{_builddir}/%{name}-%{version}/filelist.full > %{_builddir}/%{name}-%{version}/filelist.doc
+%__grep -e "/texmf/doc/" -e "/texdoc" %{_builddir}/%{name}-%{version}/filelist.full > %{_builddir}/%{name}-%{version}/filelist.doc
 cat %{_builddir}/%{name}-%{version}/filelist.doc \
     %{_builddir}/%{name}-%{version}/filelist.full | \
     sort | uniq -u > %{_builddir}/%{name}-%{version}/filelist.tmp
@@ -636,6 +658,15 @@ fi
 
 
 %changelog
+* Mon Nov 28 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2011-2
+- added find-provides-texlive.sh and set it to %%__find_provides
+  - use to find library sonames for libkpathsea and libptexenc
+- added cmex.enc (%%{SOURCE110})
+  - do not install cmex.enc in our TDS, yet
+- removed some unused directories in texmf/fonts/map
+- removed man files of lcdf-typetools
+- moved texdoc{,tk} and its related files to texlive-doc
+
 * Wed Nov 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2011-1
 - TeX Live 2011 + tl11supp-111120