Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upower and dependencies #786

Draft
wants to merge 11 commits into
base: testing
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions package/libglib/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Copyright (c) 2023 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(libglib)
pkgdesc="Low-level core library that forms the basis for projects such as GTK+ and GNOME."
url=https://gitlab.gnome.org/GNOME/glib/
timestamp=2023-12-06T21:45:00Z
section=util
maintainer="Eeems <[email protected]>"
license=GPL-2.0-or-later
_glib_ver=2.78.3
pkgver=${_glib_ver}-1
source=("https://download.gnome.org/sources/glib/2.78/glib-${_glib_ver}.tar.xz")
sha256sums=(609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21)
image=base:v3.1
makedepends=(build:git)
provides=(
gapplication
gdbus
gio
glib
gsettings
gtester
libgio
libgthread
pcre2grep
)

build() {
meson setup \
--cross-file /usr/share/meson/cross/arm-linux-gnueabihf \
--prefix /opt/usr/lib/libglib \
"${srcdir}/builddir"
meson compile -C "${srcdir}/builddir"
DESTDIR="${srcdir}/installdir" meson install -C "${srcdir}/builddir"
}

package() {
cp -al "${srcdir}/installdir/." "${pkgdir}"
}
35 changes: 35 additions & 0 deletions package/libgudev/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Copyright (c) 2023 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(libgudev)
pkgdesc="Library providing GObject bindings for libudev."
url=https://gitlab.gnome.org/GNOME/libgudev
timestamp=2023-07-06T12:30:00Z
section=util
maintainer="Eeems <[email protected]>"
license=GPL-2.0-or-later
_libgudev_ver=237
pkgver=${_libgudev_ver}-1
source=("https://download.gnome.org/sources/libgudev/${_libgudev_ver}/libgudev-${_libgudev_ver}.tar.xz")
sha256sums=(0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aaeb5b9148b686aa)
image=base:v3.1
makedepends=(
build:libglib2.0
host:libglib
)
installdepends=(libglib)

build() {
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$PKG_CONFIG_SYSROOT_DIR/opt/usr/lib/libglib/lib/pkgconfig"
meson setup \
--cross-file /usr/share/meson/cross/arm-linux-gnueabihf \
--prefix /opt/usr/lib/libgudev \
"${srcdir}/builddir"
meson compile -C "${srcdir}/builddir"
DESTDIR="${srcdir}/installdir" meson install -C "${srcdir}/builddir"
}

package() {
cp -al "${srcdir}/installdir/." "${pkgdir}"
}
4 changes: 2 additions & 2 deletions package/oxide/package
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry)
_oxidever=2.7
pkgver=$_oxidever-3
pkgver=$_oxidever-4
_sentryver=0.5.0
timestamp=2023-12-05T04:43:04Z
maintainer="Eeems <[email protected]>"
Expand Down Expand Up @@ -36,7 +36,7 @@ oxide() {

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"/opt/share/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
Expand Down
6 changes: 6 additions & 0 deletions package/toltec-base/dbus-toltec-session.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<includedir>/opt/etc/dbus-1/session.d</includedir>
<includedir>/opt/share/dbus-1/session.d</includedir>
</busconfig>
6 changes: 6 additions & 0 deletions package/toltec-base/dbus-toltec-system.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<includedir>/opt/etc/dbus-1/system.d</includedir>
<includedir>/opt/share/dbus-1/system.d</includedir>
</busconfig>
15 changes: 11 additions & 4 deletions package/toltec-base/package
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ archs=(rmall rmallos2 rmallos3 rm1 rm1os2 rm1os3 rm2 rm2os2 rm2os3)
pkgnames=(toltec-base)
pkgdesc="Metapackage defining the base set of packages in a Toltec install"
url=https://toltec-dev.org/
pkgver=1.3-2
pkgver=1.4-1
timestamp=2023-12-27T08:30Z
section="utils"
maintainer="Eeems <[email protected]>"
Expand All @@ -17,11 +17,18 @@ installdepends_rm1os3=(open-remarkable-shutdown)
installdepends_rm2os2=(rm2-suspend-fix)
installdepends_rm2os3=(rm2-suspend-fix)

source=()
sha256sums=()
source=(
dbus-toltec-system.conf
dbus-toltec-session.conf
)
sha256sums=(
SKIP
SKIP
)

package() {
true
install -D -m 666 -t "$pkgdir"/usr/share/dbus-1/system.d "$srcdir"/dbus-toltec-system.conf
install -D -m 666 -t "$pkgdir"/usr/share/dbus-1/session.d "$srcdir"/dbus-toltec-session.conf
}

configure() {
Expand Down
71 changes: 71 additions & 0 deletions package/upower/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Copyright (c) 2023 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(upower)
pkgdesc="Power management support for DeviceKit"
url=https://gitlab.freedesktop.org/upower/upower
timestamp=2023-07-06T09:03:00Z
section=util
maintainer="Eeems <[email protected]>"
license=GPL-2.0-or-later
_upower_ver=1.90.1
pkgver=${_upower_ver}-1
source=(
"https://gitlab.freedesktop.org/upower/upower/-/archive/v${_upower_ver}/upower-v${_upower_ver}.zip"
upower-toltec.conf
)
sha256sums=(
cba3cea3ae4cd345a4d7a787a47e20b35af00859b7089de5aab4796df406fe00
SKIP
)
image=base:v3.1
makedepends=(
build:gtk-doc-tools
build:libglib2.0
build:libglib2.0-dev-bin
host:libglib
host:libgudev
)
installdepends=(libgudev)

build() {
# Workaround https://github.com/toltec-dev/toolchain/issues/33
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$PKG_CONFIG_SYSROOT_DIR/usr/share/pkgconfig"
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$PKG_CONFIG_SYSROOT_DIR/opt/usr/lib/libglib/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$PKG_CONFIG_SYSROOT_DIR/opt/usr/lib/libgudev/lib/pkgconfig"
meson setup \
--cross-file /usr/share/meson/cross/arm-linux-gnueabihf \
--prefix /opt \
-Dgtk-doc=false \
-Dman=false \
-Dsysconfdir=/opt/etc \
-Dudevrulesdir=/lib/udev/hwdb.d \
-Dudevhwdbdir=/lib/udev/rules.d \
-Dos_backend=linux \
"${srcdir}/builddir"
meson compile -C "${srcdir}/builddir"
DESTDIR="${srcdir}/installdir" meson install -C "${srcdir}/builddir"
}

package() {
cp -al "${srcdir}/installdir/." "${pkgdir}"
mkdir -p "${pkgdir}/etc/systemd/system/upower.service.d"
cp "${srcdir}/upower-toltec.conf" "${pkgdir}/etc/systemd/system/upower.service.d/"
patchelf \
--set-rpath '/lib:/usr/lib:/opt/lib:/opt/usr/lib:/opt/usr/lib/libglib/lib:/opt/usr/lib/libgudev/lib' \
"${pkgdir}/opt/bin/upower" \
"${pkgdir}/opt/libexec/upowerd"
}

configure() {
systemctl daemon-reload
systemctl reload dbus
systemctl enable --now upower
}

postremove() {
systemctl daemon-reload
disable-unit upower
systemctl reload dbus
}
9 changes: 9 additions & 0 deletions package/upower/upower-toltec.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Service]
Environment=LD_LIBRARY_PATH=/lib:/usr/lib:/opt/lib:/opt/usr/lib:/opt/usr/lib/libglib/lib:/opt/usr/lib/libgudev/lib
WorkingDirectory=/opt
PrivateUsers=no
RestrictNamespaces=no

[Install]
WantedBy=
WantedBy=multi-user.target
Loading