summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f28023512b132e622fcaf3685eab3869cb8e1990 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: supdrewin <supdrewin at outlook dot com>
# Co-Maintainer: Nikolay Bryskin <nbryskin@gmail.com>
# Contributor: Liao Junxuan <mikeljx@126.com>
# Contributor: Nathaniel van Diepen <eeems@eeems.email>

pkgname=linux-enable-ir-emitter-git
pkgver=6.0.3.r0.gb8ee83d
pkgrel=1
pkgdesc="Enables infrared cameras that are not directly enabled out-of-the box"
url="https://github.com/EmixamPP/linux-enable-ir-emitter"
license=('MIT')
arch=('x86_64')

provides=(linux-enable-ir-emitter)
conflicts=(linux-enable-ir-emitter chicony-ir-toggle)

makedepends=(git meson cmake argparse qt6-base zlib gtk3)
depends=(bash cairo glib2 gdk-pixbuf2 gtk3 glibc gcc-libs)

install=linux-enable-ir-emitter.install
options=(emptydirs !buildflags)

source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgname}"
    pushd .github/workflows/deps
    cmake . -B build -GNinja
    ninja -C build
    popd
    meson setup --reconfigure build --libdir=lib --prefer-static --pkg-config-path=$(find .github -name "pkgconfig")
    meson configure build --optimization=s --prefix=/usr --strip
    meson compile -C build
}

package() {
    cd "${srcdir}/${pkgname}"
    meson install -C build --destdir=${pkgdir}
    install -d "${pkgdir}/usr/lib/systemd/system"
    mv "${pkgdir}/etc/systemd/system/linux-enable-ir-emitter.service" "${pkgdir}/usr/lib/systemd/system/linux-enable-ir-emitter.service"
    rm -r "${pkgdir}/etc/systemd"
    rm "${pkgdir}/usr/share/doc/linux-enable-ir-emitter/README.md"
    install -d "${pkgdir}/usr/share/licenses"
    mv "${pkgdir}/usr/share/doc/linux-enable-ir-emitter" "${pkgdir}/usr/share/licenses/${pkgname}"
    rm -r "${pkgdir}/usr/share/doc"
}