summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4fbdf6ffd66900b2b74709a731b897be106841bc (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: revel <revelΘmuub·net>

pkgname=gopenvpn-git
pkgver=svn.migration.r12.gb4192eb
pkgrel=8
pkgdesc='gopenvpn is a simple graphical front-end for OpenVPN, the open source VPN solution.'
arch=('i686' 'x86_64')
url='http://gopenvpn.sourceforge.net/'
license=('GPL')
depends=('libglade' 'libgnome-keyring' 'gtk2' 'openvpn')
optdepends=('gnome-keyring: handle credentials')
makedepends=('git' 'polkit')
source=("$pkgname"::'git://gopenvpn.git.sourceforge.net/gitroot/gopenvpn/gopenvpn.git'
        'config.patch'
        'compile.patch')
sha256sums=('SKIP'
            '51ec862cbd94c156e247331b357d08da805aaf458e9935dad9198c8a45a31ebc'
            '72268df6992bc91b57acd9dcf12b49fbd5078cfefa5bee99145b4ff53d28097a')

pkgver() {
  cd "$pkgname"
  # Use the tag of the last commit
  git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd "$pkgname"
  sed -i "/ACLOCAL_AMFLAGS = -I m4/d" Makefile.am
  sed -i "s/AM_GNU_GETTEXT_VERSION(\[0\.18\.1\])/AM_GNU_GETTEXT_VERSION([0.20])/g" configure.ac
  sed -i "s/\/usr\/sbin\/openvpn/\/usr\/bin\/openvpn/g" polkit/net.openvpn.gui.gopenvpn.policy
  patch -p1 -i ../config.patch
  patch -p1 -i ../compile.patch
}

build() {
  cd "$pkgname"
  autoreconf -vi
  ./configure --prefix=/usr
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}