summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 28 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d5c3704aee6..d2285e244e2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,17 +12,40 @@ license=('unknown')
optdepends=('texlive-core: texdoc, mktexlsr hook, and many packages documented here')
makedepends=('rsync')
conflicts=(texlive-tlpdb)
-options=('!strip' '!purge')
+options=('!strip' '!purge')
pkgver() {
date -I | tr -d '-'
}
build() {
- mkdir -p "$srcdir/usr/share/texmf-dist"
- mkdir -p "$srcdir/usr/share/tlpkg"
- rsync -av --no-o --no-g --chmod=D755,F644 rsync://tug.org/texlive/Contents/live/texmf-dist/doc "$srcdir/usr/share/texmf-dist/"
- rsync -av --no-o --no-g --chmod=D755,F644 rsync://tug.org/texlive/Contents/live/tlpkg/texlive.tlpdb "$srcdir/usr/share/tlpkg/"
+ _texmfdoc=/usr/share/texmf-dist/doc
+ _olddoc=""
+ if test -d "$_texmfdoc"; then
+ _olddoc="--link-dest=$_texmfdoc"
+ else
+ cat >&2 <<EOT
+******************************************************************************
+Directory $_texmfdoc not found.
+This means that rsync'ing the TeXLive documentation tree will download
+several gigabytes of documentation.
+This could be made much more efficient by having a previous version of
+package $pkgname installed.
+******************************************************************************
+EOT
+ fi
+ mkdir -p "$srcdir$_texmfdoc"
+ # Excluding texmf-dist/doc/{man,info} because their contents are mostly
+ # provided by other packages in standard locations outside texmf-dist
+ rsync -av --no-o --no-g --chmod=D755,F644 $_olddoc --del --delete-excluded --exclude=/man --exclude=/info rsync://tug.org/texlive/Contents/live/texmf-dist/doc/ "$srcdir$_texmfdoc/"
+
+ _tlpkg=/usr/share/tlpkg
+ _oldtlpkg=""
+ if test -d "$_tlpkg"; then
+ _oldtlpkg="--link-dest=$_tlpkg"
+ fi
+ mkdir -p "$srcdir$_tlpkg"
+ rsync -av --no-o --no-g --chmod=D755,F644 $_oldtlpkg --del rsync://tug.org/texlive/Contents/live/tlpkg/texlive.tlpdb "$srcdir$_tlpkg/texlive.tlpdb"
}
package() {