blob: 04a9d24161aff7e71d08c8e969195e7694116be1 (
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
|
# Maintainer: Alec Mev <alec@mev.earth>
pkgname=todoist-nativefier
pkgver=2021.02.22
pkgrel=1
pkgdesc='Todoist in shared Electron runtime'
arch=('x86_64')
url='https://todoist.com'
license=('MIT')
depends=('electron')
makedepends=(
'curl'
'gendesk'
'nodejs-nativefier'
)
_name=Todoist
prepare() {
cat > "${pkgname}" <<EOF
#!/usr/bin/env bash
exec electron /usr/share/${pkgname} "\$@"
EOF
gendesk \
--pkgname "${pkgname}" \
--pkgdesc "${pkgdesc}" \
--name "${_name}" \
--categories "Network;Office;ProjectManagement;" \
-n \
-f
curl \
https://d3ptyyxy2at9ui.cloudfront.net/todoist_apple_touch_icon-4b89ad.png \
> "${pkgname}.png"
}
build() {
cd "${srcdir}"
# https://regex101.com/r/FpfTKB/1
nativefier \
--name "${_name}" \
--icon "${pkgname}.png" \
--internal-urls '/^(https?:\/\/)?(todoist\.com|accounts\.google\.com|www\.facebook\.com|appleid\.apple\.com)(\/.*)?$' \
--maximize \
--single-instance \
--verbose \
https://todoist.com
}
package() {
mkdir -p "${pkgdir}/usr/share"
local _x=`echo "${_name}-linux-"*`
cp -r "${_x}/resources/app" "${pkgdir}/usr/share/${pkgname}"
install -Dm 755 -t "${pkgdir}/usr/bin/" "${pkgname}"
install -Dm 644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop"
install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${_x}/LICENSE"
install -Dm 644 -t "${pkgdir}/usr/share/pixmaps/" "${pkgname}.png"
}
|