Repository navigation
Expand file tree
/
Copy pathPKGBUILD-nightly-bin
More file actions
157 lines (145 loc) · 10.2 KB
/
Copy pathPKGBUILD-nightly-bin
File metadata and controls
157 lines (145 loc) · 10.2 KB
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
# Maintainer: Riccardo Canalicchio <riccardo.canalicchio@gmail.com>
#
# The nightly package, from the tarball CI publishes under the `nightly`
# release. This file is a template: pkgver and sha256sums are placeholders
# that scripts/packaging/make-nightly-pkgbuild.sh fills in from the tarball
# it was built for, and the filled-in copy is published beside the tarball.
# Install from that copy, not from this one:
#
# curl -fLO https://github.com/nongio/otto/releases/download/nightly/PKGBUILD-nightly-bin
# makepkg -p PKGBUILD-nightly-bin -si
#
# The tarball's URL never changes, so the pinned checksum is what ties a
# copy of this file to one build — and the local file name carries pkgver so
# that makepkg fetches the new tarball on an update instead of reusing the
# one it downloaded last time.
pkgname=otto-nightly-bin
pkgver=0
pkgrel=1
pkgdesc="A visually-focused desktop system designed around smooth animations, thoughtful gestures and careful attention to detail. (nightly build)"
url="https://github.com/nongio/otto"
license=("MIT" "GPL-3.0-only")
arch=("x86_64")
provides=("otto")
conflicts=("otto" "otto-bin" "otto-git")
depends=("libdrm" "systemd-libs" "mesa" "libxkbcommon" "wayland" "libinput" "dbus" "seatd" "pipewire" "freetype2" "fontconfig" "pixman" "noto-fonts" "inter-font" "gstreamer" "gst-plugins-base-libs" "polkit" "xorg-xwayland")
optdepends=("xdg-desktop-portal: Desktop integration" "fprintd: fingerprint unlock for otto-lock, otto-greeter and otto-authorize" "greetd: login manager otto --login hosts a greeter for" "gst-plugin-pipewire: otto-rdp video capture" "gst-plugins-bad: otto-rdp hardware H.264 (VA-API)" "gst-plugins-base: Peek video playback (the playbin element)" "gst-plugins-good: Peek playback of MP4 and Matroska" "gst-libav: Peek playback of H.264 and AAC" "ffmpegthumbnailer: video thumbnails and poster frames in Files and Peek" "libvips: HEIC and AVIF photos in Files and Peek" "localsearch: file search and the Recent listing in otto-files" "ewwii: the desktop widgets in Settings ▸ Appearance" "python: the desktop widgets' scripts" "otf-libertinus: the desktop widgets' titles" "noto-fonts-emoji: colour emoji in the emoji picker" "pipewire-pulse: output and input devices in Settings ▸ Sound" "libpulse: pactl, which Settings ▸ Sound drives")
source=("otto-nightly-${pkgver}-x86_64.tar.gz::https://github.com/nongio/otto/releases/download/nightly/otto-nightly-x86_64.tar.gz")
sha256sums=("SKIP")
noextract=("otto-nightly-${pkgver}-x86_64.tar.gz")
backup=("etc/otto/config.toml" "etc/pam.d/otto-lock")
prepare() {
# The tarball's top directory is named after the workspace version
# (otto-1.4.1), which is not pkgver. Unpack it under a fixed name, and
# clear the previous build's first so a re-run does not fail on the mv.
tar -xzf "$srcdir/otto-nightly-${pkgver}-x86_64.tar.gz" -C "$srcdir"
rm -rf "$srcdir/otto"
mv "$srcdir"/otto-*/ "$srcdir/otto"
# The build the tarball says it is has to be the one this file was
# pinned to; the checksum already guarantees it, this names the mismatch.
local built
built=$(cat "$srcdir/otto/VERSION")
if [ "$built" != "$pkgver" ]; then
echo "tarball is build $built, this PKGBUILD is for $pkgver" >&2
return 1
fi
}
package() {
cd "$srcdir/otto"
# Install binaries
install -Dm755 target/release/otto "$pkgdir/usr/bin/otto"
install -Dm755 target/release/otto-bar "$pkgdir/usr/bin/otto-bar"
install -Dm755 target/release/otto-islands "$pkgdir/usr/bin/otto-islands"
install -Dm755 target/release/otto-lock "$pkgdir/usr/bin/otto-lock"
install -Dm755 target/release/otto-authorize "$pkgdir/usr/bin/otto-authorize"
install -Dm644 resources/polkit/org.otto.settings.policy "$pkgdir/usr/share/polkit-1/actions/org.otto.settings.policy"
install -Dm755 target/release/otto-greeter "$pkgdir/usr/bin/otto-greeter"
install -Dm755 target/release/otto-rdp "$pkgdir/usr/bin/otto-rdp"
install -Dm755 target/release/otto-settings "$pkgdir/usr/bin/otto-settings"
install -Dm755 target/release/otto-files "$pkgdir/usr/bin/otto-files"
install -Dm755 target/release/otto-launcher "$pkgdir/usr/bin/otto-launcher"
install -Dm755 target/release/otto-emoji "$pkgdir/usr/bin/otto-emoji"
install -Dm755 target/release/otto-stash "$pkgdir/usr/bin/otto-stash"
install -Dm755 target/release/otto-canvas "$pkgdir/usr/bin/otto-canvas"
install -Dm755 target/release/otto-peek "$pkgdir/usr/bin/otto-peek"
install -Dm755 target/release/otto-preview "$pkgdir/usr/bin/otto-preview"
install -Dm755 target/release/otto-msg "$pkgdir/usr/bin/otto-msg"
install -Dm755 target/release/otto-search "$pkgdir/usr/bin/otto-search"
install -Dm755 target/release/otto-agents "$pkgdir/usr/bin/otto-agents"
# Aliases: the launcher opens in ask or agents mode under these names.
ln -s otto-launcher "$pkgdir/usr/bin/otto-ask"
# Peek's playback worker: otto-files looks for it beside itself.
install -Dm755 target/release/otto-media-worker "$pkgdir/usr/bin/otto-media-worker"
install -Dm755 resources/bin/otto-look "$pkgdir/usr/bin/otto-look"
install -Dm755 target/release/xdg-desktop-portal-otto "$pkgdir/usr/libexec/xdg-desktop-portal-otto"
# Install documentation
install -Dm644 README.md "$pkgdir/usr/share/doc/otto/README.md"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 components/xdg-desktop-portal-otto/portals.conf.example "$pkgdir/usr/share/doc/otto/portals.conf.example"
# Install configuration
# Both the live config and the example it was copied from. config.toml is
# in backup(), so an upgrade leaves a modified one alone and writes
# .pacnew beside it; only removing the package (switching between the
# otto-bin, otto-git and otto-nightly-bin variants) moves it to .pacsave.
# Shipping it matters: with no config at all Otto falls back to
# compiled-in defaults, which is an empty dock and no bookmarks.
install -Dm644 otto_config.example.toml "$pkgdir/etc/otto/config.toml"
install -Dm644 otto_config.example.toml "$pkgdir/etc/otto/config.example.toml"
# PAM stack otto-lock authenticates against; without it PAM falls through
# to `other`, which denies everything.
install -Dm644 components/otto-lock/otto-lock.pam "$pkgdir/etc/pam.d/otto-lock"
# Install desktop files
install -Dm644 resources/otto.desktop "$pkgdir/usr/share/wayland-sessions/otto.desktop"
install -Dm644 resources/otto-files.desktop "$pkgdir/usr/share/applications/otto-files.desktop"
# The Trash window: the same binary behind its own entry, so it gets its
# own icon in the dock and the applications list.
install -Dm644 resources/otto-trash.desktop "$pkgdir/usr/share/applications/otto-trash.desktop"
install -Dm644 resources/otto-settings.desktop "$pkgdir/usr/share/applications/otto-settings.desktop"
install -Dm644 resources/otto-preview.desktop "$pkgdir/usr/share/applications/otto-preview.desktop"
# Install icons
for _px in 16 24 32 48 64 128 256 512; do
install -Dm644 "components/otto-files/resources/icons/hicolor/${_px}x${_px}/apps/otto-files.png" \
"$pkgdir/usr/share/icons/hicolor/${_px}x${_px}/apps/otto-files.png"
done
install -Dm644 components/otto-files/resources/icons/hicolor/scalable/apps/otto-files.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/otto-files.svg"
# The default wallpaper, which the shipped config names.
install -Dm644 resources/wallpaper.jpg "$pkgdir/usr/share/otto/wallpaper.jpg"
# Otto-MacTahoe, the default icon theme (MacTahoe, GPL-3.0). Its symlinks
# come as a list (see scripts/packaging/fetch-icon-theme.sh); extracting
# it here makes pacman own them like any other file.
install -d "$pkgdir/usr/share/icons"
cp -r --no-preserve=ownership icon-theme/Otto-MacTahoe icon-theme/Otto-MacTahoe-light icon-theme/Otto-MacTahoe-dark "$pkgdir/usr/share/icons/"
for _links in icon-theme/links-*.tar.gz; do
tar -xzf "$_links" -C "$pkgdir/usr/share/icons" --no-same-owner
done
install -Dm644 icon-theme/COPYING "$pkgdir/usr/share/licenses/$pkgname/MacTahoe-COPYING"
install -Dm644 icon-theme/SOURCE "$pkgdir/usr/share/licenses/$pkgname/MacTahoe-SOURCE"
install -Dm644 components/xdg-desktop-portal-otto/otto.portal "$pkgdir/usr/share/xdg-desktop-portal/portals/otto.portal"
install -Dm644 components/xdg-desktop-portal-otto/org.freedesktop.impl.portal.desktop.otto.service "$pkgdir/usr/share/dbus-1/services/org.freedesktop.impl.portal.desktop.otto.service"
install -Dm644 components/xdg-desktop-portal-otto/xdg-desktop-portal-otto.service "$pkgdir/usr/lib/systemd/user/xdg-desktop-portal-otto.service"
install -Dm644 components/otto-agents/otto-agents.service "$pkgdir/usr/lib/systemd/user/otto-agents.service"
install -Dm644 components/otto-agents/otto-agents-bridge.service "$pkgdir/usr/lib/systemd/user/otto-agents-bridge.service"
# Agent skills. One plugin directory — `.claude-plugin/plugin.json`, a
# `skills/` tree and an `agents/` file — that an agent running on this
# desktop reads when it is asked to configure Otto or to extend Files.
# Installed whole rather than file by file, so a skill gaining a reference
# page or the plugin gaining an agent needs no packaging change, and by
# mode, so an executable example script stays executable.
_plugins="resources/plugins/otto"
[ -d "$_plugins" ] || { echo "missing $_plugins" >&2; return 1; }
while IFS= read -r _file; do
if [ -x "$_file" ]; then _mode=755; else _mode=644; fi
install -D -m$_mode "$_file" \
"$pkgdir/usr/share/otto/plugins/${_file#resources/plugins/}"
done < <(find "$_plugins" -type f)
# The desktop widgets: one ewwii configuration, which Otto copies to the
# user's cache and runs when a widget is chosen. Installed whole and by
# mode, like the plugin above, so its scripts stay executable.
_widgets="resources/widgets"
[ -d "$_widgets" ] || { echo "missing $_widgets" >&2; return 1; }
while IFS= read -r _file; do
if [ -x "$_file" ]; then _mode=755; else _mode=644; fi
install -D -m$_mode "$_file" \
"$pkgdir/usr/share/otto/widgets/${_file#resources/widgets/}"
done < <(find "$_widgets" -type f)
}