summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ddb1508ffd2f96561d8907da174671f389d54c63 (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
# Maintainer: Marco44 (Marc Cousin) <cousinmarc at gmail dot com>
pkgname=pgformatter-git
_gitname=pgformatter
pkgver=v5.2.r0.gfe95448
pkgrel=1
pkgdesc="Correctly indent PostgreSQL queries"
arch=('i686' 'x86_64')
url="https://github.com/darold/pgformatter"
license=('BSD')
depends=()
builddepends=()
makedepends=(git)
options=(!emptydirs !libtool)
source=('git+https://github.com/darold/pgformatter.git')
provides=("pgformatter-git")
conflicts=("pgformatter")
md5sums=('SKIP')

pkgver() {
  cd $_gitname
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  local _gitdir=$srcdir/$_gitname
  cd $_gitdir
  git clean -dfx
  git reset --hard
  perl Makefile.PL
  make
}

package() {
  cd $srcdir/$_gitname
  make DESTDIR=$pkgdir install
}