Skip to content
Snippets Groups Projects
Commit a107ac81 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

testing/greetd: improve abuild

parent 62dff625
No related branches found
No related tags found
No related merge requests found
......@@ -5,40 +5,38 @@ pkgver=0.7.0
pkgrel=1
pkgdesc="Minimal and flexible login manager daemon"
url="https://git.sr.ht/~kennylevinsen/greetd"
arch="all !mips64 !s390x !riscv64" # blocked by cargo
arch="all !mips64 !s390x !riscv64" # limited by cargo/rust
license="GPL-3.0-only"
makedepends="cargo linux-pam-dev scdoc"
install="$pkgname.pre-install"
pkgusers="greetd"
pkggroups="greetd"
subpackages="$pkgname-doc $pkgname-openrc $pkgname-agreety:agreety"
subpackages="$pkgname-doc $pkgname-openrc $pkgname-agreety"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/greetd/archive/$pkgver.tar.gz
greetd.pam
greetd.initd
greetd.confd
$pkgname.pam
$pkgname.initd
$pkgname.confd
001-change-greetd-runas.patch
"
builddir="$srcdir/$pkgname-$pkgver"
export RUSTFLAGS="--remap-path-prefix=$builddir=/build/"
build() {
RUSTFLAGS="--remap-path-prefix=$(pwd)=/build/" cargo build --release --locked
cd man
for i in *.scd
do
scdoc < "$i" > "${i%.*}"
cargo build --release --locked
local dst src
for src in man/*.scd; do
dst=${src%.scd}; dst=${dst%-*}.${dst##*-} # foo-1.scd -> foo.1
scdoc < $src > $dst
done
}
check() {
RUSTFLAGS="--remap-path-prefix=$(pwd)=/build/" cargo check
}
agreety() {
pkgdesc="Simple, text-based greeter"
amove usr/bin/agreety
cargo check --locked
}
package() {
install -Dm755 target/release/greetd "$pkgdir"/usr/sbin/greetd
install -Dm755 target/release/agreety "$pkgdir"/usr/bin/agreety
......@@ -49,16 +47,18 @@ package() {
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
cd man
for s in 1 5 7
do
for i in *-"$s"
do
install -Dm644 "$i" "$pkgdir"/usr/share/man/man"$s"/${i%-*}."$s"
done
local i; for i in man/*.[0-9]; do
install -Dm644 $i "$pkgdir"/usr/share/man/man${i##*.}/${i##*/}
done
}
agreety() {
pkgdesc="Simple, text-based greeter"
depends="$pkgname"
amove usr/bin/agreety
}
sha512sums="
93bec412f8bb15b8d1d82ef7bd0802aef7b72d02c1f38a601318428207f2ba1bc522519f4d8ecb7f24f9b67a111ee7b5e0744040be5e18f320cbeeacb51e1ca8 greetd-0.7.0.tar.gz
7e52d2404f9ae393721a471b7b113effa969404253f730c1360001923742a1b84e131db33d988399dae93a788db33dc1bb40e22272cd6a31c0e94cfceb47ed8a greetd.pam
......
......@@ -3,7 +3,7 @@
name=greetd
addgroup -S $name 2>/dev/null
adduser -S -D -H -h /var/run/greetd -s /sbin/nologin -G $name -g $name $name 2>/dev/null
adduser -S -D -H -h /run/greetd -s /sbin/nologin -G $name -g $name $name 2>/dev/null
adduser $name video
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment