blob: 38c45f7cf716d9bf38a359f2189ef4706c8fd28f (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
#! /bin/sh
AUR_NAME=sublime-music
PROJ_NAME=sublime-music
DESCRIPTION="A native Subsonic/Airsonic/*sonic client for Linux. Build using Python and GTK+."
URL=https://gitlab.com/sumner/sublime-music
DEPENDS=(
python-bottle
python-dataclasses-json
python-dateutil
python-deepdiff
python-fuzzywuzzy
python-gobject
python-levenshtein
python-mpv
python-peewee
python-pychromecast
python-requests
)
LICENSE='GPL3'
ADDITIONAL=
if [[ $# == 0 ]]; then
echo 'Usage: ./update.sh VERSION_NUMBER'
exit 1
fi
pkgrel=1
if [[ $# == 2 ]]; then
pkgrel=$2
fi
# Manually download the logo build artifact to avoid the fact that the GitLab
# artifacts download using the tag may give you an incorrect version of the
# logo build artifacts.
# wget -O logo.zip "https://gitlab.com/sumner/sublime-music/-/jobs/artifacts/v$1/download?job=build_logo"
SRCS=(
https://files.pythonhosted.org/packages/source/${PROJ_NAME:0:1}/${PROJ_NAME}/${PROJ_NAME}-$1.tar.gz
https://gitlab.com/sumner/sublime-music/-/archive/v$1/sublime-music-v$1.tar.gz
)
printf '' > PKGBUILD
echo "# Maintainer: Sumner Evans <sumner.evans98 at gmail dot com>
pkgbase='${AUR_NAME}'
pkgname=('${AUR_NAME}')
_module='${PROJ_NAME}'
pkgver='$1'
pkgrel=$pkgrel
pkgdesc='${DESCRIPTION}'
url='${URL}'
depends=(
'python'" >> PKGBUILD
# Include the dependencies.
for d in ${DEPENDS[*]}; do
echo " '$d'" >> PKGBUILD
done
echo ")
optdepends=(
'python-keyring: support for storing passwords in the system keyring'
'libnotify: for system song notification support'
'libnm-glib: for changing the Subsonic server address depending on what SSID you are connected to'
)
makedepends=(
'python-setuptools'
)
license=('${LICENSE}')
arch=('any')
source=(" >> PKGBUILD
# Include the dependencies.
for s in ${SRCS[*]}; do
echo " '$s'" >> PKGBUILD
done
echo ")
md5sums=()
${ADDITIONAL}
build() {
cd \"\${srcdir}/\${_module}-\${pkgver}\"
python setup.py build
}
package() {
pushd \${srcdir}
pushd \"\${_module}-\${pkgver}\"
python setup.py install --root=\"\${pkgdir}\" --optimize=1 --skip-build
popd
pushd \"\${_module}-v\${pkgver}\"
desktop-file-install --dir=\${pkgdir}/usr/share/applications sublime-music.desktop
pushd logo/rendered
install -Dm644 16.png \${pkgdir}/usr/share/icons/hicolor/16x16/apps/sublime-music.png
install -Dm644 22.png \${pkgdir}/usr/share/icons/hicolor/22x22/apps/sublime-music.png
install -Dm644 32.png \${pkgdir}/usr/share/icons/hicolor/32x32/apps/sublime-music.png
install -Dm644 36.png \${pkgdir}/usr/share/icons/hicolor/36x36/apps/sublime-music.png
install -Dm644 48.png \${pkgdir}/usr/share/icons/hicolor/48x48/apps/sublime-music.png
install -Dm644 64.png \${pkgdir}/usr/share/icons/hicolor/64x64/apps/sublime-music.png
install -Dm644 72.png \${pkgdir}/usr/share/icons/hicolor/72x72/apps/sublime-music.png
install -Dm644 96.png \${pkgdir}/usr/share/icons/hicolor/96x96/apps/sublime-music.png
install -Dm644 128.png \${pkgdir}/usr/share/icons/hicolor/128x128/apps/sublime-music.png
install -Dm644 192.png \${pkgdir}/usr/share/icons/hicolor/192x192/apps/sublime-music.png
install -Dm644 512.png \${pkgdir}/usr/share/icons/hicolor/512x512/apps/sublime-music.png
install -Dm644 1024.png \${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/sublime-music.png
popd
popd # pkg
popd # srcdir
}" >> PKGBUILD
updpkgsums
makepkg --printsrcinfo > .SRCINFO
# Test
makepkg -f
|