-
Notifications
You must be signed in to change notification settings - Fork 21
/
package
210 lines (184 loc) · 8.18 KB
/
package
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT
pkgnames=(
fbinfo
inject_evdev
liboxide
liboxide-dev
libsentry
oxide
oxide-display
oxide-extra
oxide-utils
oxide-tests
)
_oxidever=$(grep 'VERSION =' qmake/common.pri | awk '{print $3}')
pkgver="$_oxidever~VERSION~"
_sentryver=0.7.9
timestamp="$(date -u +%Y-%m-%dT%H:%MZ)"
maintainer="Eeems <[email protected]>"
url=https://oxide.eeems.codes
license=MIT
flags=(patch_rm2fb)
image=qt:v3.1
source=(oxide.tar.gz)
sha256sums=(SKIP)
build() {
find . -name "*.pro" -type f -print0 \
| xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g'
find . -name "*.pri" -type f -print0 \
| xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g'
CMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" make FEATURES=sentry release
}
oxide() {
pkgdesc="Launcher application"
section="launchers"
installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" "oxide-display=$pkgver" reboot-guard sysfs_preload jq launcherctl)
replaces=(erode tarnish decay corrupt)
conflicts=(erode tarnish decay corrupt)
package() {
# System service
install -D -m 644 -t "$pkgdir"/etc/dbus-1/system.d "$srcdir"/release/etc/dbus-1/system.d/codes.eeems.oxide.conf
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/release/etc/systemd/system/tarnish.service
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/tarnish
# Task manager
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/erode
install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/erode.png
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.erode.oxide
# Launcher
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/oxide
install -D -m 644 -t "$pkgdir"/opt/etc "$srcdir"/release/opt/etc/oxide.conf
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.oxide.oxide
install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/oxide.png
# Lockscreen
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/decay
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.decay.oxide
# Task switcher
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/corrupt
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide
# Keyd configuration
install -D -m 644 -t "$pkgdir"/opt/etc/keyd "$srcdir"/release/opt/etc/keyd/oxide.conf
# launcherctl registration
install -D -T -m 755 "$srcdir"/release/opt/share/launcherctl/oxide "$pkgdir"/opt/share/launcherctl/oxide
}
configure() {
systemctl daemon-reload
if ! launcherctl is-current-launcher oxide; then
echo ""
echo "Run the following command(s) to use oxide as your launcher"
echo "launcherctl switch-launcher --start oxide"
echo ""
fi
}
preremove() {
# Just in case more than one launcher is active, do individual checks
if launcherctl is-active-launcher oxide || launcherctl is-enabled-launcher oxide; then
launcherctl switch-launcher --start xochitl
fi
}
postremove() {
systemctl daemon-reload
}
}
oxide-display() {
pkgdesc="Oxide display server"
section="devel"
installdepends=("liboxide=$pkgver" "libsentry=$_sentryver")
package() {
# Display server
install -D -m 644 -t "$pkgdir"/etc/dbus-1/system.d "$srcdir"/release/etc/dbus-1/system.d/codes.eeems.blight.conf
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/release/etc/systemd/system/blight.service
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/blight
# Client
install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libblight_client.so*
# QPA
install -D -m 755 -t "$pkgdir"/opt/usr/lib/plugins/platforms "$srcdir"/release/opt/usr/lib/plugins/platforms/liboxide.so*
}
}
oxide-extra() {
pkgdesc="Extra applications for oxide"
section="utils"
installdepends=("oxide=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver")
replaces=(fret anxiety)
conflicts=(fret anxiety)
package() {
# Screenshot viewer
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/anxiety
install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.anxiety.oxide
install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/image.png
}
}
oxide-utils() {
pkgdesc="Command line tools for Oxide"
section="admin"
installdepends=("oxide=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver")
replaces=(rot notify-send update-desktop-database desktop-file-validate)
conflicts=(rot notify-send update-desktop-database desktop-file-validate)
package() {
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/desktop-file-validate
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/gio
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/notify-send
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/rot
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/update-desktop-database
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xclip
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-icon
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-menu
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-open
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-settings
}
}
inject_evdev() {
pkgdesc="Inject input events"
section="utils"
installdepends=("liboxide=$pkgver" "libsentry=$_sentryver")
package() {
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/inject_evdev
}
}
fbinfo() {
pkgdesc="Print out framebuffer info"
section="utils"
package() {
install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/fbinfo
}
}
liboxide() {
pkgdesc="Shared library for oxide applications"
section="devel"
package() {
install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/liboxide.so*
install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libqsgepaper.so*
install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libblight.so*
}
}
liboxide-dev() {
pkgdesc="Shared library for oxide applications"
section="devel"
installdepends=("liboxide=$pkgver")
package() {
install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/oxide.pc
install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/epframebuffer.h
install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/liboxide.h
cp -ar "$srcdir"/release/opt/include/liboxide/ "$pkgdir"/opt/include/
}
}
libsentry() {
pkgdesc="Sentry SDK for C, C++ and native applications."
section="devel"
url=https://github.com/getsentry/sentry-native
pkgver="$_sentryver"
timestamp="2024-06-12T08:04:15Z"
package() {
install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libsentry.so
}
}
oxide-tests() {
pkgdesc="Automated tests for oxide"
section="devel"
installdepends=("oxide-display=$pkgver")
package() {
install -D -m 755 -t "$pkgdir"/opt/share/tests "$srcdir"/release/opt/share/tests/libblight
install -D -m 755 -t "$pkgdir"/opt/share/tests "$srcdir"/release/opt/share/tests/liboxide
}
}