blob: 1983384bfe6c8a1425df9a06f3af5a99a40e59f2 (
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: Yurii Kolesnykov <root@yurikoles.com>
#
# Pull requests are welcome here: https://github.com/yurikoles-aur/upwork
#
pkgname=upwork
_pkgname='Upwork'
pkgver=5.8.0.35
_hashver='be1a1520901c4eef'
pkgrel=2
pkgdesc='Track your time for Hourly Payment Protection. Stay connected.'
arch=(x86_64)
url='https://www.upwork.com/ab/downloads/?os=linux'
license=(custom)
depends=(alsa-lib gtk3 libxss nss)
conflicts=(upwork-beta)
_useragent="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"
_rawver=${pkgver//./_}
DLAGENTS=("https::/usr/bin/curl --tlsv1.3 -H ${_useragent// /\\ } %u -o %o")
source=(https://upwork-usw2-desktopapp.upwork.com/binaries/v${_rawver}_${_hashver}/upwork_${pkgver}_amd64.deb
LICENSE)
sha256sums=('4aebf6dd32fa9791e190e4914f9e8ba45459271b922d855cd6e4fa85ef23eced'
'793d8d7bc0f088c48798bda3d5483972636c6b8c5dcd9aeaf85411f7d4547b38')
prepare() {
bsdtar -xpf data.tar.xz
}
package() {
# Base
local _optdir="${pkgdir}"/opt/${_pkgname}
install -dm755 "${_optdir}"
cp -dr --no-preserve=ownership opt/${_pkgname}/* "${_optdir}"
# Code ref: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/linux/after-install.tpl
# SUID chrome-sandbox for Electron 5+
test -e "${_optdir}"/chrome-sandbox && chmod 4755 "${_optdir}"/chrome-sandbox || true
# Exec
install -dm755 "${pkgdir}"/usr/bin/
ln -s /opt/${_pkgname}/${pkgname} "${pkgdir}"/usr/bin/
# Menu
install -Dm644 usr/share/applications/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
# Icons
install -dm755 "${pkgdir}"/usr/share
cp -dr --no-preserve=ownership usr/share/icons "${pkgdir}"/usr/share
# License
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
|