updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / darktable-git / PKGBUILD
blob2852ef4b5e405285492a504ac30404215348a7f7
1 # Maintainer:  Christian Himpel <chressie at gmail dot com>
2 # Contributor: Johannes Hanika  <hanatos at gmail dot com>
3 # Contributor: Kevin Brubeck Unhammer <unhammer at member dot fsf dot org>
4 # Contributor: orbisvicis <orbisvicis at gmail dot com>
6 pkgname=darktable-git
7 pkgrel=1
8 pkgver=20111202
9 pkgdesc="A virtual lighttable and darkroom for photographers"
10 arch=(i686 x86_64)
11 url=http://darktable.sourceforge.net/
12 license=(GPL3)
13 depends=(sqlite3 gconf hicolor-icon-theme desktop-file-utils lcms2 lensfun
14          exiv2 openexr librsvg libgphoto2 sdl mesa libgnome-keyring flickcurl)
15 makedepends=(git intltool cmake)
16 optdepends=()
17 provides=(darktable)
18 conflicts=(darktable)
19 backup=()
20 options=(!emptydirs)
21 install=darktable.install
22 source=(darktable.install)
23 md5sums=(b1d1f094aec82e7b6eaeaba1e961a074)
25 _gitroot=git://darktable.git.sf.net/gitroot/darktable/darktable
26 _gitname=darktable
28 build() {
29   local _gitdir="${srcdir}/${_gitname}"
30   msg "Connecting to GIT server...."
32   if [[ -d "${_gitdir}/.git" ]]; then
33     cd "${_gitdir}" && git pull
34     msg "The local files are updated."
35   else
36     git clone "${_gitroot}" "${_gitdir}"
37   fi
39   msg "GIT checkout done or server timeout"
40   msg "Starting make..."
42   cd "${_gitdir}"
43   git clean -dfx
44   git reset --hard
45   [[ ! -d build ]] && mkdir build
46   cd build
48   cmake \
49       -DCMAKE_INSTALL_PREFIX=/usr \
50       -DCMAKE_BUILD_TYPE=Release \
51       -DBUILD_USERMANUAL=False \
52       -DDONT_INSTALL_GCONF_SCHEMAS=True \
53       -DUSE_GCONF_BACKEND=True \
54       ..
55   make
58 package() {
59   cd "${srcdir}/${_gitname}/build"
60   make DESTDIR="${pkgdir}" install
62   # Attribute versioning information to the documentation
63   mv "${pkgdir}/usr/share/doc/darktable" "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
65   # Move "darktable.schemas" to "usr/share/gconf/schemas/" (standard location for Arch Linux)
66   # letting makepkg/emptydirs delete the now-empty previous schemas directory
67   mkdir -p "${pkgdir}/usr/share/gconf/schemas/"
68   mv "${pkgdir}/etc/gconf/schemas/darktable.schemas" "${pkgdir}/usr/share/gconf/schemas/"