1
0
mirror of https://github.com/alrayyes/slock synced 2023-11-13 18:16:41 +00:00
slock/PKGBUILD

55 lines
1.6 KiB
Bash
Raw Normal View History

2019-03-13 19:34:13 +00:00
# Maintainer: Ryan Kes <alrayyes@gmail.com>
2019-03-13 19:33:18 +00:00
pkgname=slock
pkgver=1.4
pkgrel=3
pkgdesc="A simple screen locker for X"
arch=('x86_64')
url="http://tools.suckless.org/slock"
license=('MIT')
depends=('libxext' 'libxrandr')
source=("http://dl.suckless.org/tools/$pkgname-$pkgver.tar.gz")
2019-03-13 19:39:22 +00:00
2019-03-13 20:11:22 +00:00
sha256sums=('b53849dbc60109a987d7a49b8da197305c29307fd74c12dc18af0d3044392e6a'
'97c09fd6f7e0aff3002a24dabe57798bcfaa1467a043cf7b7119177f005e5848'
'0d5508c24ab2e870f1d807044c08c7c4f835e696267ecca7521b08f59bc803d1'
2019-03-13 20:32:25 +00:00
'e4f1401e0f6a2615e3c1a6ab204e84b83917388d77247c311bf7902f1245b373'
'1c46c67980e367321b3d243f843cd34465a2c7dff242b79e1f07b3a5e434e13b')
2019-03-13 20:11:22 +00:00
_patches=("slock-dpms-20170923-fa11589.diff"
"local-quickcancel-20160619-65b8d52.diff"
2019-03-13 20:32:25 +00:00
"local-mediakeys-20170111-2d2a21a.diff"
2019-03-13 20:11:22 +00:00
#"slock-message-20180626-35633d4.diff"
#"slock-1.2-background-image.diff"
)
2019-03-13 19:39:22 +00:00
source=("http://dl.suckless.org/st/$pkgname-$pkgver.tar.gz"
"config.h"
"${_patches[@]}")
2019-03-13 19:33:18 +00:00
prepare() {
cd "$srcdir/slock-$pkgver"
sed -i 's|static const char \*group = "nogroup";|static const char *group = "nobody";|' config.def.h
sed -ri 's/((CPP|C|LD)FLAGS) =/\1 +=/g' config.mk
2019-03-13 19:39:22 +00:00
for patch in "${_patches[@]}"; do
echo "Applying patch $(basename $patch)..."
patch -Np1 -i "$srcdir/$(basename $patch)"
done
cp $srcdir/config.h config.h
2019-03-13 19:33:18 +00:00
}
build() {
cd "$srcdir/slock-$pkgver"
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
}
package() {
cd "$srcdir/slock-$pkgver"
make PREFIX=/usr DESTDIR="$pkgdir" install
install -m644 -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}