2023-05-21 22:24:57 +09:00
|
|
|
# Maintainer: qwjyh <urataw421 at gmail dot com>
|
|
|
|
|
|
|
|
pkgname=sumatrapdf
|
2023-10-26 18:34:57 +09:00
|
|
|
pkgver=3.5.2
|
2024-03-24 12:03:38 +09:00
|
|
|
pkgrel=3
|
2023-05-21 22:24:57 +09:00
|
|
|
pkgdesc="PDF, eBook (epub, mobi), comic book (cbz/cbr), DjVu, XPS, CHM, image viewer for Windows. Small, fast, customizable, free."
|
|
|
|
arch=('x86_64')
|
|
|
|
url='https://www.sumatrapdfreader.org/free-pdf-reader'
|
|
|
|
license=('GPL3' 'BSD')
|
|
|
|
depends=('wine' 'bash')
|
|
|
|
optdepends=('ttf-ms-win11: or font data on a windows partiion'
|
|
|
|
'ttf-ms-win11-auto: another choice')
|
2023-05-22 14:22:21 +09:00
|
|
|
makedepends=('imagemagick' 'gendesk' 'icoutils')
|
2023-10-26 18:34:57 +09:00
|
|
|
source=('https://www.sumatrapdfreader.org/dl/rel/3.5.2/SumatraPDF-3.5.2-64.zip'
|
|
|
|
'https://raw.githubusercontent.com/sumatrapdfreader/sumatrapdf/3.5.2rel/COPYING.BSD'
|
2023-05-21 22:24:57 +09:00
|
|
|
'sumatrapdf.sh')
|
2023-10-26 18:34:57 +09:00
|
|
|
sha256sums=('66ccb395c9184dce6822dfbb9970c877383b3ead6d9417b5106a844aac512989'
|
2023-05-21 22:24:57 +09:00
|
|
|
'ff33648659aa06892ed13a731588a57006fafee2f848d35f70bf273a13cf9d27'
|
2023-10-30 17:43:11 +09:00
|
|
|
'8cc7cff62ca0f4b149cff9ad5f383a38fa68627d1b80a5f5e631860ca95cd56c')
|
2023-05-21 22:24:57 +09:00
|
|
|
|
2023-05-22 14:22:21 +09:00
|
|
|
build() {
|
|
|
|
wrestool -x -t 14 "SumatraPDF-${pkgver}-64.exe" > "${pkgname}.ico"
|
|
|
|
convert "${pkgname}.ico" "$srcdir/$pkgname.png"
|
|
|
|
rm $pkgname.ico
|
|
|
|
|
|
|
|
gendesk -n -f --pkgname "$pkgname" --pkgdesc "$pkgdesc" --name="SumatraPDF" --genericname "Application" --exec "/usr/bin/sumatrapdf" --icon "$srcdir/${pkgname}-3.png" --categories "Viewer;Wine;Graphics;Office" --mimetypes "application/pdf;application/epub+zip;application/x-mobipocket-ebook;image/vnd.djvu;image/vnd.djvu+multipage;application/vnd.ms-xpsdocument;application/oxps"
|
|
|
|
}
|
|
|
|
|
2023-05-21 22:24:57 +09:00
|
|
|
package() {
|
|
|
|
# license
|
|
|
|
install -Dm644 COPYING.BSD "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.BSD"
|
|
|
|
# binary and start script
|
|
|
|
install -Dm755 "SumatraPDF-${pkgver}-64.exe" "$pkgdir/usr/share/$pkgname/sumatrapdf.exe"
|
|
|
|
touch "$pkgdir/usr/share/$pkgname/SumatraPDF-settings.txt"
|
|
|
|
install -Dm755 "$srcdir/sumatrapdf.sh" "$pkgdir/usr/bin/$pkgname"
|
|
|
|
|
2023-05-22 14:22:21 +09:00
|
|
|
# desktop entry
|
|
|
|
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
|
2024-03-24 12:03:38 +09:00
|
|
|
install -Dm644 "$srcdir/${pkgname}-3.png" "$pkgdir/usr/share/pixmaps/${pkgname}-3.png"
|
2023-05-22 14:22:21 +09:00
|
|
|
|
2023-05-21 22:24:57 +09:00
|
|
|
echo "You may need MS fonts for non-latin characters."
|
|
|
|
}
|
2023-10-30 17:43:11 +09:00
|
|
|
|
|
|
|
# CHANGELOG
|
|
|
|
#
|
|
|
|
# 3.5.2-2
|
|
|
|
# - use `-appdata` cmd option of SumatraPDF.exe to specify config directory
|
|
|
|
# - all old settings works fine
|
|
|
|
# - remove symlink in config directory to sumatrapdf.sh
|
|
|
|
# - you can remove it
|
|
|
|
# - change WINEPREFIX to config directory
|
|
|
|
# - you can delete ~/.sumatrapdf/
|
2024-03-24 12:03:38 +09:00
|
|
|
# 3.5.2-3
|
|
|
|
# - fix desktop entry icon
|