summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e41456e240d3afb6a9b90d224616ce5487af88f6 (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
# Maintainer: Hartmut Seichter <hartmut@technotecture.com>

tags=v1.12.4
pkgname=librealsense-legacy
pkgver=1.12.4
pkgrel=2
pkgdesc="Intel® RealSense™ SDK 1.2.x is a cross-platform API for Intel® RealSense™ F200, SR300, R200, LR200 and the ZR300"
arch=('x86_64')
url="https://github.com/IntelRealSense/librealsense"
license=('Apache')
makedepends=('cmake')
depends=('glfw' 'libusb')
source=("https://github.com/IntelRealSense/librealsense/archive/v${pkgver}.tar.gz")

sha256sums=(SKIP)

build() {
  cd "${srcdir}/librealsense-${pkgver}"
  mkdir -p build && cd build
  CFLAGS="${CFLAGS} -Wformat" \
  CXXFLAGS="${CXXFLAGS} -Wformat" \
  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_SBINDIR=bin \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=true \
    -DBUILD_UNIT_TESTS=off \
    -DBUILD_EXAMPLES=false
  make
}

package() {
  cd "${srcdir}/librealsense-${pkgver}/build"
  DESTDIR="${pkgdir}" make install
  cd "${srcdir}/librealsense-${pkgver}/config"
  install -Dm644 99-realsense-libusb.rules "${pkgdir}/etc/udev/rules.d/99-realsense-legacy-libusb.rules"
}