summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 099df234affaeb6adb9cc60ae46af11e852fc81e (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
# Maintainer: Sulhan <ms at kilabit.info>
pkgname=pgmodeler-git
pkgver=v0.9.2.beta2.r56.gea971caa
pkgrel=1
pkgdesc="PostgreSQL Database Modeler"
arch=('i686' 'x86_64')
url="http://www.pgmodeler.com.br"
license=('GPL3')
install=${pkgname}.install
depends=('qt5-base' 'libxml2' 'postgresql-libs' 'desktop-file-utils')
makedepends=('git' 'patch')
provides=('pgmodeler')
conflicts=('pgmodeler')
source=(
  "${pkgname}::git+https://github.com/pgmodeler/pgmodeler.git#branch=develop"
  "pgmodeler.desktop"
  "pgmodeler-git.install"
)
md5sums=(
  'SKIP'
  'cfc645148c08399b2678d0dd68857706'
  'ea9cce04170c669434a402c966d257f9'
)

_prefix="/usr"

pkgver() {
  cd "${srcdir}/${pkgname}"
  ( set -o pipefail
    # Only uses annotated tags to derive a version number,
    # add --tags to use un-annotated tags as well
    git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}/${pkgname}"
  qmake pgmodeler.pro PREFIX="${pkgdir}${_prefix}" RPATHDIR="${_prefix}/lib/pgmodeler"
  make
}

package() {
  cd "${srcdir}/${pkgname}"
  make install
  install -D -m 0644 "${srcdir}/pgmodeler.desktop" "${pkgdir}/usr/share/applications/pgmodeler.desktop"
}

# vim:set ts=2 sw=2 et: