blob: 5fc79a736af81cc5de382a33847d58d32503a147 (
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
|
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: TZ86
pkgname=vivaldi-snapshot
_rpmversion=6.8.3381.40-1
pkgver=6.8.3381.40
pkgrel=1
pkgdesc='An advanced browser made with the power user in mind. Snapshot'
url="https://vivaldi.com"
options=(!strip !zipman)
license=('custom')
arch=('x86_64')
depends=('libcups' 'nss' 'alsa-lib' 'libxss' 'ttf-font' 'desktop-file-utils' 'shared-mime-info' 'hicolor-icon-theme')
makedepends=('imagemagick' 'w3m')
optdepends=(
'vivaldi-snapshot-ffmpeg-codecs: playback of proprietary video/audio'
'libnotify: native notifications'
'gtk3: gtk3 integration'
'qt6-base: qt6 integration'
)
source=("https://downloads.vivaldi.com/snapshot/vivaldi-snapshot-${_rpmversion}.x86_64.rpm"
'0001-add-support-for-user-flags.patch')
sha512sums=('e6d1046b7a204a5608b62714e3182a4d074f7c09cc7e9e1da34212d8d838b859ebdea6acee5db5f53a24b402bd135b87dab6b604aeaa59063fd1c835f01e3ee5'
'334db2056114fdbf07407b1cee24284f019df7a15acd711ed016bab1a1ab211abf3884ed848f3496486e7c78056108ccf1e88547e22b787bc4f548c6785f64d2')
package() {
cp --parents -a {opt,usr/bin,usr/share} "$pkgdir"
# add support for ~/.config/vivaldi-soprano.conf
patch -p1 -i "$srcdir/0001-add-support-for-user-flags.patch" \
"$pkgdir/opt/$pkgname/$pkgname"
# suid sandbox
chmod 4755 "$pkgdir/opt/$pkgname/vivaldi-sandbox"
# make /usr/bin/vivaldi-snapshot available
binf="$pkgdir/usr/bin/$pkgname"
if [[ ! -e "$binf" ]] && [[ ! -f "$binf" ]] && [[ ! -L "$binf" ]]; then
install -dm755 "$pkgdir/usr/bin"
ln -s /opt/$pkgname/$pkgname "$binf"
fi
# 256 and 24 are proper colored icons
for res in 128 64 48 32; do
convert "$pkgdir/opt/$pkgname/product_logo_256.png" \
-resize ${res}x${res} \
"$pkgdir/opt/$pkgname/product_logo_$res.png"
done
for res in 22 16; do
convert "$pkgdir/opt/$pkgname/product_logo_24.png" \
-resize ${res}x${res} \
"$pkgdir/opt/$pkgname/product_logo_$res.png"
done
# install icons
for res in 16 22 24 32 48 64 128 256; do
install -Dm644 "$pkgdir/opt/$pkgname/product_logo_${res}.png" \
"$pkgdir/usr/share/icons/hicolor/${res}x${res}/apps/$pkgname.png"
done
# install global icon in case hicolor theme gets bypassed
install -Dm644 "$pkgdir/opt/$pkgname/product_logo_256.png" \
"$pkgdir/usr/share/pixmaps/$pkgname.png"
# license
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
w3m -dump "$pkgdir/opt/$pkgname/LICENSE.html" \
| head -n 5 \
> "$pkgdir/usr/share/licenses/$pkgname/license.txt"
}
|