blob: 6d2d14dc8ac2b64b2c2803fbc3eeca706c4ee8f8 (
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
|
# Maintainer: Plague-doctor <plague at privacyrequired dot com>
# Maintainer: Winston Astrachan <winston dot astrachan at gmail dot com>
pkgname=pcloud-drive
pkgver=1.9.9
pkgrel=1
pkgdesc='pCloud drive. Electron edition.'
arch=('x86_64')
url='https://www.pcloud.com/'
license=('custom')
depends=('fuse2' 'zlib' 'hicolor-icon-theme')
options=(!strip)
replaces=('pcloud-git' 'pcloud')
_shortname='pcloud'
_appimage="${pkgname}-${pkgver}-${pkgrel}.AppImage"
_api_code='XZWTVkVZQM0GNXA4hrFGPkefzUUWVLKOpPIX'
_api_response="$(curl -s "https://api.pcloud.com/getpublinkdownload?code=${_api_code}")"
_dlhost="$(echo ${_api_response} | grep -E -o '[a-zA-Z0-9\-]+\.pcloud\.com' | head -n 2 | sort -R | head -n 1)"
_dlpath="$(echo ${_api_response} | grep -E -o "\"path\":\s{0,1}\".+\"" | cut -d '"' -f 4 | tr -d '\\')"
source=('LICENSE'
"${_appimage}::https://${_dlhost}${_dlpath}")
sha256sums=('d512ec90082d82ef0e1fe5d7b14d63ae835f955d3119436d5c08761ff4e3366a'
'cd7e22f1615352b2481a36a07851862152f3fcffafb930d6fd5e62e8b9b7f3b0')
prepare() {
chmod +x ${_appimage}
./${_appimage} --appimage-extract
}
package() {
cd "$srcdir"
# Create Directories
install -d "${pkgdir}/usr/bin"
install -dm755 "${pkgdir}/usr/share/icons/hicolor"
# Install AppImage
install -Dm755 "${_appimage}" -t "${pkgdir}/opt/${_shortname}"
# Install License
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# Install Icons, Desktop Shortcut
find squashfs-root -type d -exec chmod 0755 {} \;
cp -r squashfs-root/usr/share/icons/hicolor "${pkgdir}/usr/share/icons/"
sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_shortname}|" "squashfs-root/${_shortname}.desktop"
sed -i "s/Name=pcloud/Name=pCloud/" "squashfs-root/${_shortname}.desktop"
install -Dm644 "squashfs-root/${_shortname}.desktop" -t "${pkgdir}/usr/share/applications/"
# Symlink AppImage
ln -s "/opt/${_shortname}/${_appimage}" "${pkgdir}/usr/bin/${_shortname}"
}
|