diff options
author | Alexander Blinne | 2019-10-23 11:03:04 +0200 |
---|---|---|
committer | Alexander Blinne | 2019-10-23 11:03:04 +0200 |
commit | 649951057b0ed048517a5405e7e263b056568c70 (patch) | |
tree | f5acb92bca0e5d02eb3c844abe59b48ce43c8486 | |
parent | 0d8c6514d5482c923e8d6e65989413e616443776 (diff) | |
download | aur-649951057b0ed048517a5405e7e263b056568c70.tar.gz |
Applied second patch by ccorn
* Use rsync --link-dest to speed up updates if a previous package version has been installed. Thus, passing e.g. -I texlive-most-doc-PREVIOUSVERSION-1-any.pkg.tar.xz to makechrootpkg or extra-x86_64-build -- shortens rsync transfers by a factor of roughly 100.
* I have also noticed that there are man and info subdirs, but moving those to standard locations outside the texmf-dist tree would cause conflicts with other packages, so I have chosen to simply --exclude them.
-rw-r--r-- | PKGBUILD | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -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() { |