summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 499fd5570c9a9465392b58c60ee5590c953e2f04 (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
# Maintainer: Evgeniy Dombek <edombek@yandex.ru>

partyname=eqmod
_partyname=EQMOD
pkgname=libindi-$partyname-git
pkgver=v1.9.9.36.gf0e823d7
pkgrel=1
pkgdesc="3rd party drivers for INDI: EQMod"
url="http://www.indilib.org/index.php"
license=(GPL3)
arch=(x86_64)
depends=(libindi)
makedepends=(cmake)
provides=(libindi-$partyname)
conflicts=(libindi-$partyname)

source=('git+https://github.com/indilib/indi-3rdparty')
sha512sums=('SKIP')
options=("staticlibs")

pkgver() {
  cd "indi-3rdparty"
  git describe --long --tags | sed 's/-/./;s/-/./'
}

prepare() {
  #set all to off by default
  sed -i -e '/option(WITH_.*On)$/s/ On)$/ Off)/' indi-3rdparty/CMakeLists.txt
}

build() {
  cmake -B build -S indi-3rdparty \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_$_partyname=On \
    -DUDEVRULES_INSTALL_DIR=/usr/lib/udev/rules.d \
    -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects" \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects -Wp,-U_GLIBCXX_ASSERTIONS"
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}