mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 11:24:37 +08:00
69 lines
2.2 KiB
Bash
69 lines
2.2 KiB
Bash
# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/texlive-pictures
|
|
|
|
pkgname=texlive-pictures
|
|
pkgver=2018.47373
|
|
_revnr=${pkgver#*.}
|
|
pkgrel=1
|
|
pkgdesc="TeX Live - Packages for drawings graphics"
|
|
license=('GPL')
|
|
arch=(x86_64)
|
|
depends=('texlive-core')
|
|
groups=('texlive-most')
|
|
url='http://tug.org/texlive/'
|
|
source=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip"
|
|
"$pkgname.maps"
|
|
"xypdf-rev1.21.patch")
|
|
options=('!emptydirs')
|
|
install=texlive.install
|
|
md5sums=('9873faaf1c75fc14f169dd24002e9e97'
|
|
'7d08cb8ade87687bd8676f8e8ba20697'
|
|
'82aa38aa5c7ada5bd28d6783e441e9a7')
|
|
|
|
build() {
|
|
cd "$srcdir"
|
|
for p in *.tar.xz; do
|
|
bsdtar -xf $p
|
|
done
|
|
rm -rf {tlpkg,doc,source} || true
|
|
|
|
patch -Np1 -i "${srcdir}/xypdf-rev1.21.patch" -d "${srcdir}/tex/generic/xypic"
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir"
|
|
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
|
|
|
|
_linked_scripts="
|
|
cachepic/cachepic.tlu
|
|
epspdf/epspdftk.tcl
|
|
epspdf/epspdf.tlu
|
|
fig4latex/fig4latex
|
|
getmap/getmapdl.lua
|
|
mathspic/mathspic.pl
|
|
mkpic/mkpic
|
|
petri-nets/pn2pdf
|
|
"
|
|
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
|
|
}
|