mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 06:47:14 +08:00
79 lines
2.4 KiB
Bash
79 lines
2.4 KiB
Bash
# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/texlive-latexextra
|
|
|
|
pkgname=texlive-latexextra
|
|
pkgver=2018.47410
|
|
_revnr=${pkgver#*.}
|
|
pkgrel=1
|
|
pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
|
|
license=('GPL')
|
|
arch=(x86_64)
|
|
depends=('texlive-core'
|
|
'perl-file-which')
|
|
optdepends=(
|
|
'texlive-genericextras: to use the calctab package'
|
|
'texlive-pictures: to use the package overpic'
|
|
'java-environment: to use pdfannotextractor')
|
|
groups=('texlive-most')
|
|
url='http://tug.org/texlive/'
|
|
source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
|
|
"$pkgname.maps")
|
|
options=('!emptydirs')
|
|
install=texlive.install
|
|
md5sums=('9253165a3dcf7d68da99f28ad377216c'
|
|
'f06643f92ce3c5d565c6414f3e77bc4c')
|
|
|
|
build() {
|
|
for p in *.tar.xz; do
|
|
bsdtar -xf $p
|
|
done
|
|
rm -rf {tlpkg,doc,source}
|
|
}
|
|
|
|
package() {
|
|
install -m755 -d $pkgdir/var/lib/texmf/chakra/installedpkgs
|
|
sed -i '/^#/d' CONTENTS
|
|
install -m644 CONTENTS $pkgdir/var/lib/texmf/chakra/installedpkgs/${pkgname}_${_revnr}.pkgs
|
|
install -m644 $pkgname.maps $pkgdir/var/lib/texmf/chakra/installedpkgs/
|
|
install -m755 -d $pkgdir/usr/share
|
|
|
|
wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
|
|
for dir in $wanteddirs; do
|
|
find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \;
|
|
find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \;
|
|
done
|
|
|
|
if [[ -d texmf-dist ]]; then
|
|
find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \;
|
|
find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \;
|
|
fi
|
|
|
|
if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then
|
|
find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
|
|
fi
|
|
|
|
#add symlinks that were in texlive-bin:
|
|
_linked_scripts="
|
|
authorindex/authorindex
|
|
exceltex/exceltex
|
|
glossaries/makeglossaries
|
|
glossaries/makeglossaries-lite.lua
|
|
l3build/l3build.lua
|
|
makedtx/makedtx.pl
|
|
pax/pdfannotextractor.pl
|
|
perltex/perltex.pl
|
|
splitindex/splitindex.pl
|
|
svn-multi/svn-multi.pl
|
|
vpe/vpe.pl
|
|
wordcount/wordcount.sh
|
|
yplan/yplan
|
|
"
|
|
install -m755 -d "$pkgdir"/usr/bin
|
|
for _script in ${_linked_scripts}; do
|
|
_scriptbase=$(basename $_script)
|
|
_scriptbase=${_scriptbase%.*}
|
|
ln -s /usr/share/texmf-dist/scripts/${_script} ${pkgdir}/usr/bin/${_scriptbase}
|
|
done
|
|
|
|
rm $pkgdir/usr/share/texmf-dist/scripts/shipunov/biokey2html.bat
|
|
}
|