--- admin/PlamoBuild-template-20180815 2018-08-15 16:18:50.000000000 +0900 +++ plamo/08_tex/texlive_texmf/PlamoBuild.texlive_texmf-20150523 2018-11-05 11:59:03.000000000 +0900 @@ -1,19 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="ftp://tug.org/historic/systems/texlive/2015/texlive-20150523-texmf.tar.xz" verify= digest= branch= commitid= -pkgbase= -vers= -arch=`uname -m` -build=P1 -src=$pkgbase-$vers +pkgbase=texlive_texmf +vers=20150523 +arch=noarch +build=P3 +src=texlive-$vers-texmf patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="texmf-dist/README" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -69,13 +69,47 @@ cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date -u '+%m%d0000'` {} \; + install -d $P/opt/texlive/2015 + cp -a $B/texmf-dist $P/opt/texlive/2015 + chmod -R g-sw $P/opt/texlive/2015/texmf-dist + chown -R root.root $P/opt/texlive/2015/texmf-dist compress setup_docdir 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` - tar rvpf $pkg.tar -C $P usr/share/doc/$src - TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar - xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz + archive_subdir() { + pkg=${pkgbase}_`echo ${1////_} | sed 's/-/_/g'`-$vers-$arch-$build + tar cvpJf $pkg.txz -C $P opt/texlive/2015/texmf-dist/$1 usr/share/doc/$src + touch -r $P/opt/texlive/2015/texmf-dist/$1 dir + rm -rf $P/opt/texlive/2015/texmf-dist/$1/* + touch -r dir $P/opt/texlive/2015/texmf-dist/$1 ; rm dir + } + archive_subdir_split() { + n=`ls -A $P/opt/texlive/2015/texmf-dist/$1 | wc -l` ; d=$2 ; b=$((n / d)) + for i in `seq 0 $d` ; do + [ $((b * i)) -eq $n ] && break; + pkg=${pkgbase}_`echo ${1////_} | sed 's/-/_/g'`$i-$vers-$arch-$build + tar cvpf $pkg.tar -C $P --no-r opt/texlive/2015/texmf-dist/$1 + tar rvpf $pkg.tar -C $P \ + `cd $P ; find opt/texlive/2015/texmf-dist/$1 -maxdepth 1 \ + | tail -n+2 | sed -n "$((b * i + 1)),$((b * (i + 1)))p"` + tar rvpf $pkg.tar -C $P usr/share/doc/$src + xz $pkg.tar ; mv $pkg.{tar.xz,txz} + done + touch -r $P/opt/texlive/2015/texmf-dist/$1 dir + rm -rf $P/opt/texlive/2015/texmf-dist/$1/* + touch -r dir $P/opt/texlive/2015/texmf-dist/$1 ; rm dir + } + for i in fonts/type1{/public{/nanumtype1,/cm-super,/cbfonts,},} ; do + archive_subdir $i + done + for i in fonts{/truetype,/afm,/opentype,/tfm,} ; do + archive_subdir $i + done + archive_subdir doc/generic + archive_subdir_split doc/latex 7 + for i in doc{/fonts,} ; do archive_subdir $i ; done + for i in tex source ; do archive_subdir $i ; done + pkg=$pkgbase-$vers-$arch-$build + tar cvpJf $pkg.txz -C $P opt/texlive/2015/texmf-dist usr/share/doc/$src cleanup fi