PKGBUILD 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Maintainer (arch): Firmicus <firmicus āt gmx dōt net>
  2. # Maintainer (arch): Rémy Oudompheng <remy@archlinux.org>
  3. # Contributor: André Silva <emulatorman@hyperbola.info>
  4. # Contributor: Michał Masłowski <mtjm@mtjm.eu>
  5. # Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
  6. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  7. # parabola changes and rationale:
  8. # - remove nonfree add-on packages
  9. _pkgname=texlive-latexextra-libre
  10. pkgname=texlive-latexextra
  11. pkgver=2023.66551
  12. _revnr=${pkgver#2023.}
  13. pkgrel=1
  14. pkgrel+=.parabola2
  15. pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
  16. license=('GPL')
  17. arch=(any)
  18. depends=('texlive-core'
  19. 'perl-file-which' # for pdfannotextractor
  20. )
  21. optdepends=(
  22. 'inkscape: required for svg package'
  23. 'java-environment: to use pdfannotextractor'
  24. 'python-pygments: for pygmentex'
  25. 'texlive-genericextra: required for calctab package'
  26. 'texlive-pictures: required for overpic package'
  27. )
  28. groups=('texlive-most')
  29. url='http://tug.org/texlive/'
  30. mksource=("https://sources.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip")
  31. mksha256sums=('6254daf3152e9f2a7fcf1084873ee9cab150a7f04b0696c327e31da49eae6a95')
  32. noextract=("$pkgname-$pkgver-src.zip")
  33. source=("https://repo.parabola.nu/other/$_pkgname/$_pkgname-$pkgver-src.tar.xz"{,.sig}
  34. "$pkgname.maps"
  35. "$pkgname.fmts")
  36. options=('!emptydirs')
  37. sha256sums=('fcd6b79f6dbf77efd51a146829eaac917935f3870b43f70cf1a85c91512a2166'
  38. 'SKIP'
  39. 'd53750a03a52472a1c7c5ba5142959ba382a5d69215471691c0b12c3663950ce'
  40. '828a9cf082b9a89a4aa0eec402a9c32b8056bb873e4a5dc92ce60aec2ea69435')
  41. validpgpkeys=('1B8C5E87702444D3D825CC8086ED62396D5DBA58' # Omar Vega Ramos
  42. '38D33EF29A7691134357648733466E12EC7BA943' # Isaac David
  43. '3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40' # bill-auger
  44. 'BFA8008A8265677063B11BF47171986E4B745536') # oaken-source
  45. mksource() {
  46. mkdir $pkgname-$pkgver
  47. pushd $pkgname-$pkgver
  48. bsdtar xfv ../$pkgname-$pkgver-src.zip
  49. # remove nonfree packages
  50. # no specific free license
  51. rm -v {authoraftertitle,clock,fnpara}.tar.xz
  52. # nonfree license (CC BY-NC)
  53. rm -v axessibility.tar.xz
  54. popd
  55. }
  56. build() {
  57. cd $srcdir/$pkgname-$pkgver
  58. for p in *.tar.xz; do
  59. bsdtar -xf $p
  60. done
  61. rm -rf {tlpkg,doc,source} || true
  62. # remove nonfree packages references from package list
  63. sed -ri '/^(axessibility|authoraftertitle|fnpara) /d' CONTENTS
  64. }
  65. package() {
  66. cd $srcdir/$pkgname-$pkgver
  67. install -m755 -d "$pkgdir"/var/lib/texmf/arch/installedpkgs
  68. sed -i '/^#/d' CONTENTS
  69. install -m644 CONTENTS "$pkgdir"/var/lib/texmf/arch/installedpkgs/${pkgname}_${_revnr}.pkgs
  70. install -m644 "$srcdir"/$pkgname.maps "$pkgdir"/var/lib/texmf/arch/installedpkgs/
  71. install -m755 -d "$pkgdir"/usr/share
  72. wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
  73. for dir in $wanteddirs; do
  74. find $dir -type d -exec install -d -m755 "$pkgdir"/usr/share/texmf-dist/'{}' \;
  75. find $dir -type f -exec install -m644 '{}' "$pkgdir"/usr/share/texmf-dist/'{}' \;
  76. done
  77. if [[ -d texmf-dist ]]; then
  78. find texmf-dist -type d -exec install -d -m755 "$pkgdir"/usr/share/'{}' \;
  79. find texmf-dist -type f -exec install -m644 '{}' "$pkgdir"/usr/share/'{}' \;
  80. fi
  81. if [[ -d "$pkgdir"/usr/share/texmf-dist/scripts ]]; then
  82. find "$pkgdir"/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
  83. fi
  84. #add symlinks that were in texlive-bin:
  85. _linked_scripts="
  86. authorindex/authorindex
  87. exceltex/exceltex
  88. glossaries/makeglossaries
  89. glossaries/makeglossaries-lite.lua
  90. hyperxmp/hyperxmp-add-bytecount.pl
  91. l3build/l3build.lua
  92. makedtx/makedtx.pl
  93. pagelayout/pagelayoutapi
  94. pagelayout/textestvis
  95. pax/pdfannotextractor.pl
  96. perltex/perltex.pl
  97. pygmentex/pygmentex.py
  98. splitindex/splitindex.pl
  99. svn-multi/svn-multi.pl
  100. vpe/vpe.pl
  101. webquiz/webquiz.py
  102. wordcount/wordcount.sh
  103. yplan/yplan
  104. "
  105. install -m755 -d "$pkgdir"/usr/bin
  106. for _script in ${_linked_scripts}; do
  107. _scriptbase=$(basename $_script)
  108. _scriptbase=${_scriptbase%.*}
  109. ln -s /usr/share/texmf-dist/scripts/${_script} "${pkgdir}/usr/bin/${_scriptbase}"
  110. done
  111. }