aboutsummaryrefslogblamecommitdiffstats
path: root/community/swaylock/APKBUILD
blob: b8fd2b46fe766b4500a809d8719d0fe2cd91647e (plain) (tree)
1
2
3
4
5
                                                      
                                          
                

          














                                   





                                                










                                                                                           
                                                              







                                                











                                                                      
                                                   












                                                                            
                                                                                                                                                                  
# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=swaylock
pkgver=1.4
pkgrel=0
pkgdesc="Screen locker for Wayland"
url="http://swaywm.org"
arch="all"
license="MIT"
options="!check"
makedepends="cairo-dev
	gdk-pixbuf-dev
	libxkbcommon-dev
	linux-pam-dev
	meson
	ninja
	scdoc
	wayland-dev
	wayland-protocols
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-fish-completion:fishcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/swaywm/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	sed -i 's/login/base-auth/g' \
		pam/swaylock.linux
}

build() {
	cd "$builddir"
	meson -Dswaylock-version="$pkgver" --prefix /usr build
	ninja -C build
}

package() {
	cd "$builddir"
	DESTDIR="$pkgdir" ninja -C build install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/
}

fishcomp() {
	depends=""
	pkgdesc="Fish completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel fish"

	mkdir -p "$subpkgdir"/usr/share/fish
	mv "$pkgdir"/usr/share/fish/completions "$subpkgdir"/usr/share/fish
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	mkdir -p "$subpkgdir"/usr/share/zsh
	mv "$pkgdir"/usr/share/zsh/site-functions "$subpkgdir"/usr/share/zsh
}
sha512sums="5068b5f97e3094c511deda553f363a71f655b16e6533ef8f82befcd3b9027a55de81f143eb95e60cf4dbe4cecdc49906285bd6a0e6d51eb3b2807d0101581809  swaylock-1.4.tar.gz"