summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83a4e0c38bf2f74530ebb351e288795890c89ab7 (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
56
57
58
59
60
61
62
63
64
65
# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
# Contributor: ksj <podhorsky.ksj@gmail.com>

_gitname=geany
pkgname=${_gitname}-git
pkgver=1.38.0.r151.gdf27d1b22
pkgrel=1
pkgdesc="Fast and lightweight IDE (git version)"
arch=('x86_64' 'i686')
url="https://github.com/${_gitname}/${_gitname}"
license=('GPL2')
depends=('gtk3' 'python')
makedepends=('doxygen' 'git' 'intltool' 'python-lxml' 'python-docutils' 'python-reportlab' 'vte3')
optdepends=(
    'geany-plugins: additional functionality'
    'vte3: enbedded terminal support'
)
conflicts=("${_gitname}" "${_gitname}-gtk3" "${_gitname}-gtk3-git")
provides=("${_gitname}" "${_gitname}=$pkgver")
source=(${_gitname}::git+https://github.com/${_gitname}/${_gitname}.git)
md5sums=('SKIP')


pkgver() {
  cd "${srcdir}/${_gitname}"

  (
    set -o pipefail
    git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "${srcdir}/${_gitname}"

  # Syntax highlighting for PKGBUILD files
  sed -i 's/Sh=/Sh=PKGBUILD;/' data/filetype_extensions.conf
}

build() {
  cd "${srcdir}/${_gitname}"

  export CFLAGS="${CFLAGS} -D_FILE_OFFSET_BITS=64"
  ./autogen.sh \
    --enable-api-docs \
    --enable-html-docs \
    --enable-gtk3 \
    --enable-gtkdoc-header \
    --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd "${srcdir}/${_gitname}"

  make check
}

package() {
  cd "${srcdir}/${_gitname}"

  make PREFIX=/usr DESTDIR="$pkgdir" install
}