blob: ddd7bc39ac985ea2db812da8c9131649645b2643 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Maintainer: Max Harmathy <harmathy@mailbox.org>
# Contributor: David Runge <dvzrv@archlinux.org>
_name=MediathekView
_pkgname=mediathekview
pkgname=${_pkgname}-xdg
pkgver=14.0.0
pkgrel=2
pkgdesc="Access the Mediathek of many German TV stations (store data in XDG_DATA_HOME)"
arch=(any)
url="https://github.com/mediathekview/mediathekview"
license=(GPL3)
depends=(bash hicolor-icon-theme 'java-runtime-openjdk=21' xdg-user-dirs)
makedepends=(maven strip-nondeterminism 'java-environment-openjdk=21')
conflicts=(mediathek mediathekview)
provides=(mediathek mediathekview)
replaces=(mediathek mediathekview)
optdepends=(
'libnotify: to use desktop notifications'
'mplayer: for recording streams'
'vlc: for stream playback'
)
source=(
$_pkgname-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/refs/tags/$pkgver.tar.gz
de.$_pkgname.$_name.desktop
$_pkgname.sh
)
sha512sums=('e97844b4a06dbe42603d55854528b446638a4c0b830f824e7092c19ec2a7d308378f05887d2d0636ded48ec51354b8b2084448bf55778a7d5e31f1d145e030f2'
'24a94a078180aca7c50ed7763ef4806c116c27f901f644ef570ee413ffc3ac795b5ebd24d696a9b2ec426e7c9b6eaf8a8b22addb5ac7c9fe9700f7c04305f64b'
'313bf39ddefba91d0d9e90bf907c756cdeb1826e0fc1446f0cae2f08f10afaaf04be291f613c677ff30e30f763038fa0cbce8e3e39fdd6ca05613262b5e4b44f')
b2sums=('a24308a98714b05d8df34bf06d64e3854ed9b826276b0ea576c23cebdf2ffd47139c003a9d8fdd12a87cf47191b50b63c1e2e66a1e141c2bc07b8a22b5a312c9'
'6dbcdea2918009621fc132b4ff1056ef79f06e27c3299b69ccd7e3cb2b093e3a2a5f76acd6b1ab62689edd867ac1650f61bf829f2a1c575835d31e117d9b9ae5'
'464568ce2a8a6d670d0b9bc7f65325a216839b07aedfb526c8d636cf4c01b2a694ef33a4f16f7b678e77ba505c04b0be11637a88b97b5e4175a4996f9c0abfdc')
build() {
# check for correct java version
read -a javac_version < <(javac --version)
if [ ! "${javac_version[1]}" = "21" ]; then
echo "Please set your java version to openjdk 21 unsing \"archlinux-java\"" >&2
return 1
fi
cd $_name-$pkgver
./mvnw clean install -Plinux,install4j-linux
# Timestamps in JAR files generated by Maven do not honour SOURCE_DATE_EPOCH
# (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318)
(
shopt -s globstar
for file in **/*.jar; do
echo -n "[stripping] $file ..."
strip-nondeterminism --timestamp "$SOURCE_DATE_EPOCH" "$file"
echo "done"
done
)
}
package() {
local _size
cd $_name-$pkgver
# jar
install -vDm 644 target/$_name.jar -t "$pkgdir/usr/share/java/$_pkgname/"
# script
install -vDm 755 ../$_pkgname.sh "$pkgdir/usr/bin/$_pkgname"
# XDG desktop file
install -vDm 644 ../de.mediathekview.$_name.desktop -t "$pkgdir/usr/share/applications/"
# icons
for _size in 16 32 48 128; do
install -vDm 644 target/${_name}@x$_size.png "$pkgdir/usr/share/icons/hicolor/${_size}x$_size/apps/$_pkgname.png"
done
install -vDm 644 res/$_name.svg -t "$pkgdir/usr/share/icons/hicolor/scalable/apps/$_pkgname.svg"
# docs
install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$_pkgname/"
}
|