summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 87b3f89f9b27327fac924962a05eae7490011145 (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
# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
# Contributor: Thomas Jost <schnouki@schnouki.net>
# Contributor: Alexander 'hatred' Drozdov <adrozdoff@gmail.com>

_name=gnome-commander
pkgname=$_name-git
pkgver=1.5.0.r662.87ef49d
pkgrel=1
pkgdesc="Graphical two-pane filemanager for GNOME"
arch=('i686' 'x86_64')
url="http://gcmd.github.io/"
license=('GPL')
depends=('libgnomeui' 'gnome-vfs' 'gconf' 'python2' 'libsm' 'libunique')
makedepends=('perl-xml-parser' 'gnome-doc-utils' 'intltool' 'gnome-common' 'git')
options=(!libtool)
provides=($_name)
conflicts=($_name)
source=(git+https://git.gnome.org/browse/$_name)
md5sums=('SKIP')

pkgver() {
  cd $_name

  # git describe --tags | sed -e 's/-/./g'
  _tag=$(git describe --abbrev=0)
  v=$(grep AC_INIT configure.ac | awk -F',' '{printf $2}' | sed 's/ //')
  r="$(git rev-list --count $_tag..HEAD)"
  h="$(git rev-parse --short HEAD)"
  printf "$v.r$r.$h"
}

build() {
  cd $_name
  
  # Python 2 fix
  for f in doc/*/gnome-commander.xml; do
      sed -i 's:env python$:env python2:' "$f"
  done
  export PYTHON=python2 #force python2 on configure procedures

  ./autogen.sh --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc \
              --localstatedir=/var --disable-scrollkeeper --enable-python

  make
}

package() {
  cd $_name

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
  install -d "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$_name.schemas" \
    --domain "$_name" "$pkgdir/etc/gconf/schemas/"*.schemas
  rm -rf "$pkgdir/etc/gconf/schemas/"
}