summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: caefb021e16005f5613c78b5d3b35ded4b23c2c8 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Generated by debtap
# Maintainer: Jan Kohnert <bughunter@jan-kohnert.de>
# Contributor: Matthew Sexton <wsdmatty@gmail.com>
# Contributor: Lorenz Wellmer
pkgname=clockify-desktop
pkgver=2.2.9
pkgrel=1
pkgdesc="Truly free time tracker for teams, Desktop App"
arch=("x86_64")
url="https://clockify.me"
license=("LicenseRef-custom")
depends=("alsa-lib" "at-spi2-core" "cairo" "dbus" "expat" "gcc-libs" "glib2"
         "glibc" "gtk3" "hicolor-icon-theme" "java-runtime" "libcups" "libdrm"
         "libx11" "libxcb" "libxcomposite" "libxdamage" "libxext" "libxfixes"
         "libxkbcommon" "libxrandr" "mesa" "nspr" "nss" "pango")
source=("$pkgname-$pkgver.deb::https://clockify.me/downloads/Clockify_Setup_x64.deb")
sha512sums=("94d5635ce5893936c15590be44e7d9dce60227bc2e29192918f6c6f890a11517ab690abea0838898dde783f1d357976b0ffe3ab96265d3a3738f1b859d880ea7")

package() {
    # Extract package data
    tar xf data.tar.xz -C "${pkgdir}"
    
    # install license
    install -D -m644 "${pkgdir}/opt/Clockify/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    
    # Fix permission issues
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/1024x1024.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/32x32.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/64x64.ico"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/64x64.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/blue.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/appicons/white.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/assets.d.ts"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/assets.js"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/audio/pomodoro-notification.ogg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/entitlements.mac.plist"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/icon.icns"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/1024x10240.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/32x32.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/64x64.ico"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/64x64.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/\$-selected.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/\$.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/approved.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/arrow-dark-mode-up.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/arrow-dark-mode.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/arrow-light-mode-up.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/arrow-light-mode.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/at-checked.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/at-semichecked-dark-mode.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/at-unchecked.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/automatic-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/automatic.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-active-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-active-newest.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-active.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-inactive-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-inactive-newest.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/autotracker-inactive.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/billable.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/billablenew.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/bulk-add.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/bulk-delete.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/bulk-merge.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/calendar.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/checked.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/checkednew.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/circle_1.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/circle_2.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/clockify.ico"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/clockify_illustration.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/clockify_logo.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/clockify_logo_dark.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/clockify_logo_selfhosted.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/close-light.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/close.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/closeX.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/create.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/edit-unsynced-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/edit-unsynced.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/filter-arrow-down.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/filter-arrow-right.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/gear.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-cal.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-check-circle.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-chevron-left.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-chevron-right.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-lock.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-plus-circle.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon-settings.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/icon.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/loading.gif"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/lock-indicator.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logo-128.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logo-16-gray.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logo-16.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logo-48.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logo.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logout-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logout-normal.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/logout.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/manual-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/manual.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/menu-dots-vertical.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/menu-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/menu.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/no-new-notifications.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/notifications-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/notifications.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/notifications/ws-lock.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/notifications/ws-shield.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/out-link.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/play-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/play-normal.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/reload-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/reload-normal.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/semichecked.svg"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/settings-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/settings-normal.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/settings.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/sync-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/sync.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/tag.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/tagnew.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/time-hover.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/time-off.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/time.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/workspace-checked.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/images/x.png"
    chmod a-w "${pkgdir}/opt/Clockify/resources/assets/no-user-image.png"

    # Fix hardlinks
    rm "${pkgdir}/usr/share/icons/hicolor/32x32/apps/clockify.png"
    ln -s /opt/Clockify/resources/assets/appicons/32x32.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/clockify.png"
    rm "${pkgdir}/usr/share/icons/hicolor/64x64/apps/clockify.png"
    ln -s /opt/Clockify/resources/assets/appicons/64x64.png "${pkgdir}/usr/share/icons/hicolor/64x64/apps/clockify.png"
    rm "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/clockify.png"
    ln -s /opt/Clockify/resources/assets/appicons/1024x1024.png "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/clockify.png"
    
    # Remove forgotten temporary build build pkgdir
    rm -r "${pkgdir}/opt/Clockify/resources/app.asar.unpacked/node_modules/active-win/build-tmp-napi-v6"
    rm -r "${pkgdir}/opt/Clockify/resources/app.asar.unpacked/node_modules/active-win/lib/binding/napi-6-linux-glibc-x64"
    
    # generate link in PATH
    install -dm755 "${pkgdir}/usr/bin"
    ln -s "/opt/Clockify/clockify" "${pkgdir}/usr/bin/clockify"
}