aports/community/oo7/APKBUILD
Matthias Ahouansou 0b80279e8c community/oo7: fix a couple of things with the openrc subpkgs
- Make the openrc subpkgs depend on the actual packages
- Fix the user service directories
- Make the init.d files executable
2025-05-31 16:10:10 +00:00

94 lines
2.9 KiB
Text

# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
maintainer="Matthias Ahouansou <matthias@ahouansou.cz>"
pkgname=oo7
pkgver=0.4.3
pkgrel=2
pkgdesc="CLI application to interact with the system keyring"
url="https://bilelmoussaoui.github.io/oo7/oo7/"
arch="all"
license="MIT"
depends="dbus"
makedepends="
cargo-auditable
meson
"
subpackages="
$pkgname-doc
$pkgname-portal
$pkgname-portal-openrc:portal_openrc
$pkgname-server
$pkgname-server-openrc:server_openrc
cargo-credential-$pkgname:cred
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/bilelmoussaoui/oo7/archive/refs/tags/$pkgver.tar.gz
oo7-portal.initd
oo7-server.initd
no-meson-cargo-build.patch
"
options="net !check" # cargo crates, no tests for the binaries
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo auditable build --release --frozen
for i in portal server
do
abuild-meson $i $i/output
meson compile -C $i/output
done
}
package() {
install -Dm 755 target/release/oo7-cli "$pkgdir"/usr/bin/oo7-cli
install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
portal() {
pkgdesc="An implementation of org.freedesktop.impl.portal.Secret"
install -Dm 755 "$builddir"/target/release/oo7-portal "$subpkgdir"/usr/libexec/oo7-portal
DESTDIR="$subpkgdir" meson install --no-rebuild -C "$builddir"/portal/output
}
portal_openrc() {
pkgdesc="An implementation of org.freedesktop.impl.portal.Secret (OpenRC init scripts)"
depends="openrc $pkgname-portal=$pkgver-r$pkgrel"
install_if="openrc $pkgname-portal=$pkgver-r$pkgrel"
install -Dm 755 "$srcdir"/oo7-portal.initd "$subpkgdir"/etc/user/init.d/oo7-portal
}
server() {
pkgdesc="D-Bus Secret Service provider"
install -Dm 755 "$builddir"/target/release/oo7-daemon "$subpkgdir"/usr/libexec/oo7-daemon
DESTDIR="$subpkgdir" meson install --no-rebuild -C "$builddir"/server/output
}
server_openrc() {
pkgdesc="D-Bus Secret Service provider (OpenRC init scripts)"
depends="openrc $pkgname-portal=$pkgver-r$pkgrel"
install_if="openrc $pkgname-server=$pkgver-r$pkgrel"
install -Dm 755 "$srcdir"/oo7-server.initd "$subpkgdir"/etc/user/init.d/oo7-server
}
cred() {
pkgdesc="cargo credential provider built using oo7 instead of libsecret"
depends="cargo"
install -Dm 755 "$builddir"/target/release/cargo-credential-oo7 "$subpkgdir"/usr/bin/cargo-credential-oo7
}
sha512sums="
22dc1b64f056ddbdb8cbb588b63ffe8f5ada8d8232a23193884263526ee32e72163ea61acfe788a74c684e6c143e7a8af3de5988838a2a1fc406dc5852c52528 oo7-0.4.3.tar.gz
91c65717249d1db20c31aec41416ec2fdac54d7d7f39136c333a15d1ca528834ef99e6c76c016bd85b947c259956e1b614814859bf9bef1b81d24bd879cbe905 oo7-portal.initd
c6459d144dab00b779f99047bdc5d84297a38656f3c059d8df0aa139f658a3fccf7ad0b5ea3e21a1bee9af1ef0c4eae88a61ce90a6e2241ea864ac7cb2f467dd oo7-server.initd
1f66bd1043f6559970015c19d093fa0f0fcff7a07bb6d368f435b00ca30e781fc664909b0ad0f5fe23e55aac73058420b6e6d07f19807adc8e317e2f082ea558 no-meson-cargo-build.patch
"