cruxports/greetd/Pkgfile
2022-02-05 15:39:19 -05:00

46 lines
1.2 KiB
Plaintext

# Description: minimal and flexible login manager daemon
# URL: https://git.sr.ht/~kennylevinsen/greetd
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: rust scdoc
name=greetd
version=0.8.0
release=1
source=(https://git.sr.ht/~kennylevinsen/greetd/archive/$version.tar.gz
greetd.pam greetd.service)
renames=($name-$version.tar.gz SKIP SKIP)
build() {
cd $name-*
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
[ -d "$PKGMK_SOURCE_DIR/rust" ] || mkdir "$PKGMK_SOURCE_DIR/rust"
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
cargo update
cargo fetch
cargo build --release --locked
install -Dt $PKG/usr/bin target/release/greetd
install -Dt $PKG/usr/bin target/release/agreety
install -Dt $PKG/etc/greetd config.toml
# install pam configuration
install -Dm644 $SRC/greetd.pam \
$PKG/etc/pam.d/greetd
# install service file
install -Dm 755 $SRC/greetd.service $PKG/etc/rc.d/greetd
## needs scdoc
# install man files
cd man
for i in *.scd; do
scdoc < "$i"> "$i".roff
done
for s in 1 5 7; do
install -d $PKG/usr/share/man/man$s
done
for i in *.roff; do
s=$(echo $i | sed 's/.*-//; s/\.scd\.roff//')
gzip -c $i > $PKG/usr/share/man/man$s/${i%-*}.$s.gz
done
}