blob: 21e3858a223593d9d4dbef7ebaaf3a86da01dbb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Maintainer: Christoph Scholz <christoph.scholz@gmail.com>
# Contributor: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Tom <reztho at archlinux dot us>
pkgname=pdfsam
pkgver=5.2.9
pkgrel=1
pkgdesc="A free open source tool to split and merge pdf documents"
arch=('any')
url="https://www.pdfsam.org/"
license=('AGPL3')
depends=('hicolor-icon-theme' 'java-runtime=21' 'sh' 'archlinux-java-run')
makedepends=('desktop-file-utils' 'gendesk')
source=("https://github.com/torakiki/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}-linux.tar.gz"
"pdfsam")
sha512sums=('4e29edf5c6002a62938746496867a0efd3ef08a355adff8e9a9596979d11c855ed34d5f99c91221b7c110ef1fb4f4132a9ed10ce1de534f83b1d1fb3a3acb22d'
'700700b8ad4fb44f6eb1aaff35ede7ac53729c0dce39f23467159b14aadd28705cf5c547c6b8871ecd4afebc1fb479eafdbdad68b95c0114e26438961abf8209')
noextract=("${pkgname}-${pkgver}-linux.tar.gz")
prepare() {
mkdir -p "${pkgname}-${pkgver}-linux"
bsdtar -xzf "${pkgname}-${pkgver}-linux.tar.gz" -C "${pkgname}-${pkgver}-linux"
# create *.desktop file
gendesk -f -n \
--pkgname="${pkgname}" \
--pkgdesc="${pkgdesc}" \
--name="PDFsam" \
--categories="Office"
# extract icons
bsdtar -xf ${pkgname}-${pkgver}-linux/pdfsam-${pkgver}-linux/lib/pdfsam-basic-${pkgver}.jar images/basic
}
package() {
install -dm755 "${pkgdir}/usr/share/java/${pkgname}"
install -Dm644 "${pkgname}-${pkgver}-linux/pdfsam-${pkgver}-linux/lib/"* \
"${pkgdir}/usr/share/java/${pkgname}"
install -dm755 "${pkgdir}/usr/share/${pkgname}"
install -Dm644 "${pkgname}-${pkgver}-linux/pdfsam-${pkgver}-linux/splash.png" \
"${pkgdir}/usr/share/${pkgname}"
# exec
install -Dm755 "pdfsam" "${pkgdir}/usr/bin/pdfsam"
# icons
for _icon in 16 24 32 48 64 96 128 256 512; do
install -Dm644 images/basic/${_icon}x${_icon}.png \
"${pkgdir}/usr/share/icons/hicolor/${_icon}x${_icon}/apps/${pkgname}.png"
done
# desktop
install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}
|