archrelease: copy trunk to community-any
[ArchLinux/community.git] / hyperion / repos / community-x86_64 / PKGBUILD
blob9a4709dc8c120828b7a4e129bc923a52933b27fe
1 # Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
2 # PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
3 # Contributor: Christopher Reimer <mail+aur[at]c-reimer[dot]de>
5 pkgname=hyperion
6 pkgver=1.03.2
7 pkgrel=30
8 _commit=d3713a8ea9116c92f0a219b7114f1a8709462979
9 pkgdesc="An opensource 'AmbiLight' implementation"
10 arch=('x86_64')
11 url="https://github.com/hyperion-project/hyperion"
12 license=('MIT')
13 depends=('libusb' 'protobuf' 'python' 'qt5-base')
14 optdepends=('xorg-server: X11 grabbing')
15 makedepends=('cmake')
16 backup=('etc/hyperion/hyperion.config.json')
17 install='hyperion.install'
18 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hyperion-project/hyperion/archive/$_commit.tar.gz"
19         "0001-Fix-no-decleration-of-assert-with-GCC-7.2.patch"
20         "hyperion.sysusers"
21         "hyperiond.service"
22         "hyperion.install")
23 sha512sums=('9f0a6392d54132c82c4f62aa72fb1cee6995ecd72d49c77544e2e771391a414ba74f2bfbe68effc75c1c8b10f2b1241064581c81a1af57041c682fe4ce110430'
24             '11c51f6085d78bb75a7d73372262eedc2dab84b9d37ee1850f6b8d8c9cfe85d72a69b7d755e169028c6f7150f09201ded7d32a4edf15130ca2a12a188fe5945c'
25             '80764d3abdfb7e6e7f65913e9c89dd61b425ffb80e9ab4f9df7739abe32117441095ac7b45792acd5d2a516cf4aca3e21062b119f5790aae3b178036db74ce61'
26             'f8c23ba920ce683e731237c164f4f70f94d635398be5cc43ce1af48bb8ab672da47397979a825a5761dacb1ae18a1c5fc840b168c8f1e3ae411908e0e92a0c5b'
27             'ff5ed8ed647a621b73e922590616e4f5d63f0a7e243aa3de0f8382a835e83166a0e04944396a61a03645cc00853251690a514b3772f163f445240e4f55f18fb5')
29 prepare() {
30     cd "${srcdir}/${pkgname}-${_commit}"
31     patch -Np1 -i "${srcdir}/0001-Fix-no-decleration-of-assert-with-GCC-7.2.patch"
34 build() {
35     cd "${srcdir}/${pkgname}-${_commit}"
36     mkdir -p build
37     cd build
38     cmake -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" \
39         -DCMAKE_BUILD_TYPE=Release \
40         -DENABLE_QT5=ON \
41         -DPLATFORM=x86 \
42         -DPROTOBUF_PROTOC_EXECUTABLE=/usr/bin/protoc \
43         -DUSE_SYSTEM_PROTO_LIBS=ON \
44         ..
45     make
48 package() {
49     cd "${srcdir}/${pkgname}-${_commit}"
50     cd build
51     make install
52     cd ..
54     install -Dm 644 config/hyperion.config.json.example \
55         "${pkgdir}/etc/hyperion/hyperion.config.json"
57     install -Dm 644 "${srcdir}/hyperiond.service" \
58         "${pkgdir}/usr/lib/systemd/system/hyperiond.service"
60     rm -rf "${pkgdir}/usr/share/hyperion/service"
62     install -Dm 644 "${srcdir}/hyperion.sysusers" \
63         "${pkgdir}"/usr/lib/sysusers.d/hyperion.conf
65     install -Dm 644 LICENSE \
66         "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"