summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: efe0f06968307045db63d7f8a0c6dfb1d1b03945 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Maintainer: Gustavo alvarez <sl1pkn07@gmail.com>

pkgname=oyranos-git
pkgver=0.9.6.215.g5acb5b8c
pkgrel=1
pkgdesc="A Colour Management System (CMS) on operating system level. (GIT version)"
arch=('i686' 'x86_64')
url='http://www.oyranos.org'
license=('BSD')
depends=('libxcm-git'
         'libxrandr'
         'elektra-git'
         'fltk'
         'cairo'
         'yajl'
         )
makedepends=('git'
             'cmake'
             'qt5-tools'
             'doxygen'
             'graphviz'
             'sane'
             'libraw'
             'exiv2'
             'libcups'
             'lcms'
             'lcms2'
             'qt5-x11extras'
             )
optdepends=('xcalib'
            'openicc: ICC prolfiles'
            'openicc-basiccolor-offset-profiles: ICC prolfiles'
            'sane: sane module'
            'libraw: lraw module'
            'lcms: lcms module'
            'lcms2: lcms2 module'
            'exiv2: lraw & oyRE module'
            'libcups: CUPS module'
            'qt5-x11extras: qcmsevents'
            )
conflicts=('oyranos')
provides=('oyranos')
source=('git+https://github.com/oyranos-cms/oyranos.git')
sha256sums=('SKIP')

pkgver() {
  cd oyranos
  echo "$(git describe --long --tags | tr - .)"
}

prepare() {
  mkdir -p build

  # Force build in Qt5 mode when both frameworks is installed
  sed '2d' -i oyranos/src/tools/qcmsevents/CMakeLists.txt
}

build() {
  cd build
  cmake ../oyranos \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  make -C build DESTDIR="${pkgdir}" install
  install -Dm644 oyranos/COPYING.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  # Fix references to SRCDIR
  for i in $(find ${pkgdir}/usr/share/doc -type f); do sed 's|&#45;git|-git|g' -i ${i} ;done
  for i in $(find ${pkgdir}/usr/share/doc -type f); do sed "s|${srcdir}|/usr/share/doc|g" -i ${i} ;done
  sed -e "s|${srcdir}/build|\"\"|g" -e "s|${srcdir}/oyranos|\"\"|g" -i "${pkgdir}/usr/bin/oyranos-config"
}