#!/bin/bash # tlpdb2rpmspec # # Copyright 2010 Munehiro Yamamoto # This file is licensed under the GNU General Public License version 2 # or any later version. Usage(){ cat</dev/null 2>&1 %define exec_upddeffont [ -x %{_sbindir}/update-defaultfont ] && %{_sbindir}/update-defaultfont 2> /dev/null %define vartexfonts %{_var}/lib/texmf %define __find_provides %{nil} %define __find_requires %{nil} %define __perl_provides %{nil} %define __perl_requires %{nil} Autoreq: 0 Summary: ${RPM_SUMMARY} Summary(ja): ${RPM_SUMMARY} Name: texlive-$pkg Version: ${VERSION} Release: 1%{?_dist_release} License: ${RPM_LICENSE} Group: Applications/Publishing URL:http://www.tug.org/texlive/ Requires: texlive = %{version} $RPM_REQUIRES Requires(post): texlive = %{version} Requires(postun): texlive = %{version} BuildRequires: texlive-sources = %{version} BuildArch: noarch Buildroot: %{_tmppath}/%{name}-%{version}-root Vendor: ${RPM_VENDOR} Distribution: ${RPM_DISTRIBUTION} Packager: ${RPM_PACKAGER} %description The TeX Live software distribution offers a complete TeX system for a variety of Unix, Macintosh, Windows and other platforms. It encompasses programs for editing, typesetting, previewing and printing of TeX documents in many different languages, and a large collection of TeX macros and font libraries. The distribution includes extensive general documentation about TeX, as well as the documentation for the included software packages. This package is a collection of ${PKG_SHORTDESC}: ${PKG_LONGDESC} This package contains the following CTAN packages: ${PKG_CTANPKGSLIST} %description -l ja TeX Live ソフトウェアディストリビューションは、 さまざまな Unix, Macintosh, Windows、および 他のプラットホームに対して完全な TeX システムを提供します。 多くの異なった言語を含む TeX ドキュメントの 編集、組版、閲覧、印刷するためのプログラム、 そして、TeX マクロやフォントライブラリの大きなコレクションを 同梱しています。 このディストリビューションは 同梱しているソフトウェアパッケージのためのドキュメントばかりでなく、 TeX に関するたくさんの一般的なドキュメントを含んでいます。 このパッケージは以下のようなパッケージ集です。 ${PKG_SHORTDESC}: ${PKG_LONGDESC} このパッケージは以下の CTAN パッケージを含んでいます: ${PKG_CTANPKGSLIST} EOF ## subpackage: %{name}-doc if [ $with_docpkg -eq 1 ]; then cat< filelist.full find %{buildroot}%{texmf}-dist -type d | \\ %__sed -e "s|^%{buildroot}|%dir |" \\ -e "s|\$|/|" >> filelist.full EOF ## subpackage: %{name}-doc if [ $with_docpkg -eq 1 ]; then cat< filelist.doc cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp %__mv -f filelist.tmp filelist.full EOF fi cat</dev/null | egrep -q "^#! ${maptype} ${map}" && \\ echo -n " " && \\ echo -n "Running updmap: enable ${map} ... " && \\ %{exec_updmap} --enable ${maptype} ${map} >/dev/null 2>&1 && \\ echo "done." EOT done) EOF fi ## Running fmtutil if [ $with_inilist -eq 1 ]; then cat</dev/null | egrep -q "^${maptype} ${map}" && \\ echo -n " " && \\ echo -n "Running updmap: disable ${map} ... " && \\ %{exec_updmap} --disable ${map} >/dev/null 2>&1 && \\ echo "done." EOT done) EOF fi cat< texlive-${i}-vl.spec rpmbuild -ba texlive-${i}-vl.spec || exit 1 done ;; --standard-collections) [ ! -f /etc/vine-release ] && echo "E: support Vine Linux only" && exit 1 for i in collection-context \ collection-latexextra \ collection-luatex \ collection-pictures \ collection-genericrecommended \ collection-pstricks \ collection-documentation-english; do $0 $i > texlive-${i}-vl.spec rpmbuild -ba texlive-${i}-vl.spec || exit 1 done ;; --full-collections) [ ! -f /etc/vine-release ] && echo "E: support Vine Linux only" && exit 1 for i in $($0 | egrep "^collection-"); do $0 $i > texlive-${i}-vl.spec rpmbuild -ba texlive-${i}-vl.spec || exit 1 done ;; *) mkrpmspec $1 || exit 1 ;; esac exit ### end of file