diff options
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 100 | ||||
-rw-r--r-- | texlive-full.install | 23 |
3 files changed, 84 insertions, 48 deletions
@@ -1,13 +1,11 @@ pkgbase = texlive-full pkgdesc = This packages provides texlive-full in /opt. It also tricks ArchLinux into thinking it has its texlive packages installed. - pkgver = 20200626 + pkgver = 20220125 pkgrel = 1 url = http://www.tug.org/texlive/ - install = texlive-full.install arch = x86_64 license = GPL - makedepends = wget - makedepends = xz + makedepends = rsync provides = texlive-bin provides = texlive-bibtexextra provides = texlive-core @@ -28,6 +26,7 @@ pkgbase = texlive-full provides = texlive-langjapanese provides = texlive-langkorean conflicts = texlive-bin + conflicts = git-latexdiff conflicts = texlive-bibtexextra conflicts = texlive-core conflicts = texlive-fontsextra @@ -46,8 +45,8 @@ pkgbase = texlive-full conflicts = texlive-langgreek conflicts = texlive-langjapanese conflicts = texlive-langkorean + options = !strip source = http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz sha256sums = SKIP pkgname = texlive-full - @@ -1,35 +1,95 @@ -# Maintainer: Butui Hu <hot123tea123@gmail.com> +# Maintainer: Sukanka <su975853527 [AT] gmail.com> +# Contributor: Butui Hu <hot123tea123@gmail.com> pkgname=texlive-full -pkgver=$(date "+%Y%m%d") -_year=$(date "+%Y") +pkgver=20220125 pkgrel=1 pkgdesc="This packages provides texlive-full in /opt. It also tricks ArchLinux into thinking it has its texlive packages installed." url="http://www.tug.org/texlive/" arch=("x86_64") license=("GPL") -makedepends=("wget" "xz") +makedepends=('rsync') provides=('texlive-bin' $(pacman -Sgq texlive-most texlive-lang)) -conflicts=('texlive-bin' $(pacman -Sgq texlive-most texlive-lang)) +conflicts=('texlive-bin' 'git-latexdiff' $(pacman -Sgq texlive-most texlive-lang)) source=("http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz") sha256sums=('SKIP') -install=${pkgname}.install #PKGEXT='.pkg.tar' +options=(!strip) -package() { - # creating a profile for unattened installation - echo "selected_scheme scheme-full" > "${srcdir}/texlive.profile" - echo "TEXDIR ${pkgdir}/opt/texlive/${_year}" >> "${srcdir}/texlive.profile" - echo "TEXMFLOCAL ${pkgdir}/opt/texlive/texmf-local" >> "${srcdir}/texlive.profile" - echo "TEXMFSYSCONFIG ${pkgdir}/opt/texlive/${_year}/texmf-config" >> "${srcdir}/texlive.profile" - echo "TEXMFSYSVAR ${pkgdir}/opt/texlive/${_year}/texmf-var" >> "${srcdir}/texlive.profile" - echo "TEXMFHOME ~/.texmf" >> "${srcdir}/texlive.profile" +# You can choose a mirror and rsync directory here. +# _syncdir works as a local CTAN mirror (about 4.5GiB) for faster installation + +_mirror='mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet/' +_syncdir="CTAN/tlnet" - # start the installer and install - "${srcdir}/install-tl-${pkgver}/install-tl" -profile "${srcdir}/texlive.profile" - # remove profile file and installation log - rm -vf "${pkgdir}/opt/texlive/${_year}/tlpkg/texlive.profile" - rm -vf "${pkgdir}/opt/texlive/${_year}/install-tl.log" +pkgver(){ + ls | grep -E '[0-9]+' -o +} +prepare(){ + # TeXLive release year + _year=$(cat ${srcdir}/install*/release-texlive.txt| grep -E '[0-9]+' -o) + # creating a profile for unattened installation + echo "selected_scheme scheme-full" > "${srcdir}/texlive.profile" + echo "TEXDIR ${pkgdir}/opt/texlive/${_year}" >> "${srcdir}/texlive.profile" + echo "TEXMFLOCAL ${pkgdir}/opt/texlive/texmf-local" >> "${srcdir}/texlive.profile" + echo "TEXMFSYSCONFIG ${pkgdir}/opt/texlive/${_year}/texmf-config" >> "${srcdir}/texlive.profile" + echo "TEXMFSYSVAR ${pkgdir}/opt/texlive/${_year}/texmf-var" >> "${srcdir}/texlive.profile" + echo "TEXMFHOME ~/.config/texlive/texmf" >> "${srcdir}/texlive.profile" + echo "TEXMFCONFIG ~/.config/texlive/${_year}/texmf-config" >> "${srcdir}/texlive.profile" + echo "TEXMFVAR ~/.config/texlive/${_year}/texmf-var" >> "${srcdir}/texlive.profile" + + # syncing repository + mkdir -p ${_syncdir} + rsync -a --delete rsync://${_mirror} ${_syncdir} + } -# vim:set ts=2 sw=2 et: +package() { + _year=$(cat ${srcdir}/install*/release-texlive.txt| grep -E '[0-9]+' -o) + + # find installer path automatically. + _installer_dir=install-tl-${pkgver} + + # start the installer and install + _timestamp=$(date "+%m%d%H%M") + "${srcdir}/${_installer_dir}/install-tl" \ + -profile "${srcdir}/texlive.profile" -repository ${_syncdir} -logfile "/tmp/install-tl-${_timestamp}.log" + + msg2 'Stripping $srcdir' + find ${pkgdir}/* -type f -print0 | xargs -0 sed -i "s|${srcdir}||g" + + msg2 'Stripping $pkgdir' + find ${pkgdir}/* -type f -print0 | xargs -0 sed -i "s|${pkgdir}||g" + + msg2 "Linking manpage" + mkdir -p ${pkgdir}/usr/share/man/{man1,man5} + for mann in {man1,man5} + do + cd ${pkgdir}/opt/texlive/${_year}/texmf-dist/doc/man/$mann + find . -type f,l -print0 |sed "s|\./||g"| while read -d $'\0' man + do + ln -s "/opt/texlive/${_year}/texmf-dist/doc/$mann/${man}" "${pkgdir}/usr/share/man/$mann/" + done + done + + msg2 "Linking info" + cd ${pkgdir}/opt/texlive/${_year}/texmf-dist/doc/info/ + mkdir -p ${pkgdir}/usr/share/info + find . -type f,l -print0 |sed "s|\./||g"| while read -d $'\0' info + do + ln -s "/opt/texlive/${_year}/texmf-dist/doc/info/${info}" "${pkgdir}/usr/share/info/" + done + + msg2 "Linking binary" + cd ${pkgdir}/opt/texlive/${_year}/bin/${arch}-linux/ + mkdir -p ${pkgdir}/usr/bin + find . -type f,l -print0 |sed "s|\./||g"| while read -d $'\0' bin + do + ln -s "/opt/texlive/${_year}/bin/${arch}-linux/${bin}" "${pkgdir}/usr/bin/" + done + + # remove profile file and installation log, and wrong man link. + rm -rf ${pkgdir}/usr/bin/man + rm -vf "${pkgdir}/opt/texlive/${_year}/tlpkg/texlive.profile" +} +# vim:set ts=2 sw=2 et: diff --git a/texlive-full.install b/texlive-full.install deleted file mode 100644 index 1cab89a77a2b..000000000000 --- a/texlive-full.install +++ /dev/null @@ -1,23 +0,0 @@ -post_install() -{ - _year=$(date "+%Y") - echo "=======================================================================" - echo "This packages provides texlive-full in /opt. It also tricks ArchLinux" - echo "into thinking it has its texlive packages installed." - echo "-----------------------------------------------------------------------" - echo "Add" - echo " /opt/texlive/${_year}/bin/x86_64-linux" - echo "to your PATH" - echo "Add" - echo " /opt/texlive/${_year}/texmf-dist/doc/man" - echo "to your MANPATH" - echo "Add" - echo " /opt/texlive/${_year}/texmf-dist/doc/info" - echo "to your INFOPATH" - echo "=======================================================================" -} - -post_upgrade() -{ - post_install -} |