summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a84687e8ec4e4070ce4325005839fa106e36ecb (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
53
54
# Contributor: Adam Goldsmith <contact@adamgoldsmith.name>
pkgname=libarcus-git
pkgver=r402.6cc4cec
pkgrel=1
pkgdesc="A library designed to facilitate the communication between Cura and its backend and similar code."
arch=('i686' 'x86_64')
url="https://github.com/Ultimaker/libArcus"
license=('GPL2')
provides=('arcus' 'libarcus')
conflicts=('arcus' 'libarcus')
depends=(
  'protobuf'
  'python'
)
makedepends=(
  'cmake'
  'conan'
  'cura'
  'git'
  'ninja'
  'python-virtualenv'
)
source=('git+https://github.com/Ultimaker/libArcus.git'
        'git+https://github.com/ultimaker/conan-config.git')
b2sums=('SKIP'
        'SKIP')

prepare() {
  cd libArcus
  conan config install ../conan-config
  conan profile detect --force
  conan remote remove cura # as the JFrog artifact is behind loginwall, so cura needs to be in makedepends instead

  conan install . --build=missing --update
}

pkgver() {
  cd libArcus
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  mkdir -p libArcus/build
  cd libArcus/build
  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
  cmake --build .
}

package() {
  cd "$srcdir/libArcus/build"
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et: