--- admin/PlamoBuild-template-20180815 2018-08-15 16:18:50.000000000 +0900 +++ plamo/08_tex/texlive/PlamoBuild.texlive-20150521 2018-11-25 12:22:06.000000000 +0900 @@ -1,19 +1,27 @@ #!/bin/sh ###################################################################### -url="" +url="ftp://tug.org/texlive/historic/2015/texlive-20150521-source.tar.xz" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=texlive +vers=20150521 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P3 +src=$pkgbase-$vers-source patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--prefix=/opt/texlive/2015 --datarootdir=/opt/texlive/2015 + --infodir=/opt/texlive/2015/texmf-dist/doc/info + --mandir=/opt/texlive/2015/texmf-dist/doc/man + --disable-native-texlive-build --enable-shared --with-system-libgs + --with-system-harfbuzz --with-system-icu --with-system-graphite2 + --with-system-xpdf --with-poppler --with-system-mpfr --with-system-gmp + --with-system-cairo --with-system-pixman --with-system-freetype2 + --with-system-libpng --with-system-libpaper --with-system-zlib + --with-system-fontconfig" +DOCS="ChangeLog README*" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -29,20 +37,27 @@ fscheck prepare "$@" +S2=$W/source +TEXARCH=`echo $arch | sed 's/i6/i3/;s/v7l/el/'`-linux if [ $opt_download -eq 1 ] ; then download_sources fi if [ $opt_config -eq 1 ] ; then for i in `seq 0 $((${#B[@]} - 1))` ; do - if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} + if [ -d ${S2[$i]} ] ; then rm -rf ${S2[$i]} ; fi ; cp -a ${S[$i]} ${S2[$i]} + if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; mkdir ${B[$i]} done apply_patches + cd $S2 + cp -p texk/kpathsea/texmf.cnf{,.orig} + sed -i '/^OSFONTDIR =/s@/.*@/usr/share/fonts@' texk/kpathsea/texmf.cnf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} - if [ -x configure ] ; then - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + if [ -x ${S2[$i]}/configure ] ; then + ${S2[$i]}/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --bindir=/opt/texlive/2015/bin/$TEXARCH --with-banner-add=" - Plamo" fi done fi @@ -62,19 +77,90 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + make install-strip DESTDIR=$P + make texlinks DESTDIR=$P fi done + ln -s dvipdfmx $P/opt/texlive/2015/bin/$TEXARCH/xbb + install -d $P/opt/texlive/2015/tlpkg/TeXLive + install -m 444 $S2/texk/tests/TeXLive/* $P/opt/texlive/2015/tlpkg/TeXLive + install -d $P/opt/texlive/texmf-local + cat <<- EOF >> $P/opt/texlive/2015/texinit.sh + #!/bin/sh + + export PATH=/opt/texlive/2015/bin/$TEXARCH:\$PATH + texlinks -v -f /opt/texlive/2015/texmf-dist/web2c/fmtutil.cnf \\ + -e "" /opt/texlive/2015/bin/$TEXARCH + mktexlsr + fmtutil-sys --all + mtxrun --generate + kanji-config-updmap-sys ipaex + echo "TeXLive の日本語フォントの設定を行いました:" + kanji-config-updmap-sys status + EOF + chmod 755 $P/opt/texlive/2015/texinit.sh + install -d $P/etc/profile.d + cat <<- EOF > $P/etc/profile.d/texlive.sh + # PATH + PATH=\$PATH:/opt/texlive/2015/bin/$TEXARCH + export INFOPATH=\$INFOPATH:/opt/texlive/2015/texmf-dist/info + export MANPATH=\$MANPATH:/opt/texlive/2015/texmf-dist/man + EOF + cat <<- EOF > $P/etc/profile.d/texlive.csh + # path + set path = ( \$path /opt/texlive/2015/bin/$TEXARCH ) + setenv INFOPATH \$INFOPATH:/opt/texlive/2015/texmf-dist/info + setenv MANPATH \$MANPATH:/opt/texlive/2015/texmf-dist/man + EOF touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date -u '+%m%d0000'` {} \; compress + strip_bindir $P/opt/texlive/2015/bin/$TEXARCH + strip_libdir $P/opt/texlive/2015/lib + mv $P/opt/texlive/2015/texmf-dist/doc/info/dir $C + gzip_dir $P/opt/texlive/2015/texmf-dist/doc/info + mv $C/dir $P/opt/texlive/2015/texmf-dist/doc/info + for i in 1 5 ; do gzip_dir $P/opt/texlive/2015/texmf-dist/doc/man/man$i ; done + TZ=UTC touch -t `date -u '+%m%d0000'` \ + $P/opt/texlive/2015/texmf-dist/doc/{info,man/man{1,5}} setup_docdir + TZ=UTC touch -t `date -u '+%m%d0000'` $docdir/$src convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + prune_symlink $P/opt/texlive/2015/bin/$TEXARCH + prune_symlink $P/opt/texlive/2015/lib + TZ=UTC touch -t `date -u '+%m%d0000'` \ + $P/opt/texlive/2015/{bin/$TEXARCH,lib} + cat <<- EOF | unexpand >> $P/install/doinst.sh + #%% begin initialize $pkg + if ! grep -q "/opt/texlive/2015/lib" /etc/ld.so.conf ; then + echo "/opt/texlive/2015/lib" >> /etc/ld.so.conf + ldconfig + fi + for i in texlive_texmf texlive_texmf_fonts texlive_texmf_fonts_type1 \\ + texlive_texmf_fonts_type1_public \\ + texlive_texmf_fonts_type1_public_nanumtype1 \\ + texlive_texmf_fonts_type1_public_cm_super \\ + texlive_texmf_fonts_type1_public_cbfonts texlive_texmf_fonts_truetype \\ + texlive_texmf_fonts_afm texlive_texmf_fonts_opentype \\ + texlive_texmf_fonts_tfm texlive_texmf_tex texlive_texmf_source ; do + if [ ! -f /var/log/packages/\$i ] ; then + cat <<- "EOF" + texinit.sh execution will be deferred until all required texlive_texmf + packages are installed. + EOF + exit 1 + fi + done + /opt/texlive/2015/texinit.sh + #%% end + EOF + TZ=UTC touch -t `date -u '+%m%d0000'` $P/install/doinst.sh + tar cvpf $pkg.tar -C $P opt/texlive + tar rvpf $pkg.tar -C $P `cd $P ; find etc/profile.d | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup