-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
36 lines (31 loc) · 1.19 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: Bardia Moshiri <fakeshell@bardia.tech>
pkgname=flashlightd
pkgver=7
pkgrel=1
_commit=6c934562a089a7f117a53da74436db39a68f559a
pkgdesc="simple daemon to manage camera flash light using gstreamer"
url="https://github.com/droidian/flashlightd"
license=("GPL3")
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
makedepends=('gstreamer' 'glib2' 'vala' 'git' 'meson')
source=("git+https://github.com/droidian/flashlightd#commit=${_commit}")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname}"
git describe --tags | sed 's/^v//;s/-/+/g;s|pureos/||g;s|droidian/||g;s|bookworm/||g'
}
prepare() {
cd "${srcdir}/${pkgname}"
}
build() {
rm -rf build
arch-meson "${srcdir}/${pkgname}" build
meson compile -C build
}
package() {
DESTDIR="${pkgdir}" ninja -C build install
install -Dm644 "${srcdir}/${pkgname}"/org.droidian.Flashlightd.service ${pkgdir}/usr/lib/systemd/user/flashlightd.service
mkdir -p ${pkgdir}/usr/lib/systemd/user/default.target.wants
sed -i 's#/usr/libexec/flashlightd#/usr/lib/flashlightd#g' ${pkgdir}/usr/lib/systemd/user/flashlightd.service
ln -s /usr/lib/systemd/user/flashlightd.service ${pkgdir}/usr/lib/systemd/user/default.target.wants/flashlightd.service
}