mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
# Maintainer: Donoban <donoban@riseup.net>
|
|
pkgname=pdfjs
|
|
pkgver=3.5.141
|
|
pkgrel=0
|
|
pkgdesc="A general-purpose, web standards-based platform for parsing and rendering PDFs."
|
|
url="https://mozilla.github.io/pdf.js/"
|
|
arch="noarch"
|
|
license="Apache-2.0"
|
|
source="https://github.com/mozilla/pdf.js/releases/download/v$pkgver/pdfjs-$pkgver-legacy-dist.zip"
|
|
options="!check" # No tests
|
|
subpackages="$pkgname-dbg"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
#disable bundled fonts
|
|
sed -i "s|\"../web/standard_fonts/\",|null,|" web/viewer.js
|
|
}
|
|
|
|
package() {
|
|
# Remove bundled fonts and weird pdf included
|
|
rm "$srcdir/web/compressed.tracemonkey-pldi-09.pdf"
|
|
rm -fr "$srcdir/web/cmaps"
|
|
rm -fr "$srcdir/web/standard_fonts"
|
|
|
|
mkdir -p "$pkgdir/usr/share/pdf.js"
|
|
cp -R "$srcdir"/build "$pkgdir"/usr/share/pdf.js
|
|
cp -R "$srcdir"/web "$pkgdir"/usr/share/pdf.js
|
|
}
|
|
|
|
dbg() {
|
|
amove /usr/share/pdf.js/*/*.js.map
|
|
amove /usr/share/pdf.js/*/debugger*
|
|
}
|
|
|
|
sha512sums="
|
|
57fc6a01b9c32db35d0a206e171200145da17950a0d1318f54c0e03f4819e168c21568c32b6e79263811c81f4c135f429d8c913e5c4f706d562ffbefc177debe pdfjs-3.5.141-legacy-dist.zip
|
|
"
|