summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4f623e7f051d54f833c57510560d8be72c1ca4f1 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=libraw-git
pkgver=0.21.1.r8.gf2998bac
pkgrel=1
pkgdesc="A library for reading RAW files from digital cameras"
arch=('i686' 'x86_64')
url="https://www.libraw.org/"
license=('CDDL' 'LGPL')
depends=('glibc' 'jasper' 'lcms2')
makedepends=('git')
provides=("libraw=$pkgver")
conflicts=('libraw')
options=('staticlibs')
source=("git+https://github.com/LibRaw/LibRaw.git")
sha256sums=('SKIP')


pkgver() {
  cd "LibRaw"

  _tag=$(git tag -l --sort -v:refname | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/-/_/g'
}

build() {
  cd "LibRaw"

  autoreconf --install
  ./configure \
    --prefix="/usr" \
    --disable-examples
  make
}

package() {
  cd "LibRaw"

  make DESTDIR="$pkgdir" install

  rm "$pkgdir/usr/share/doc/libraw/COPYRIGHT"
  rm "$pkgdir/usr/share/doc/libraw"/LICENSE.*
}