summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3486b8b45d72c3871e86ba3de2bfa6ff24f23a9f (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: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=astyle-svn
pkgver=r672
pkgrel=1
pkgdesc="A free, fast, and small automatic code formatter"
arch=('i686' 'x86_64')
url="http://astyle.sourceforge.net/"
license=('MIT')
depends=('gcc-libs')
makedepends=('subversion')
provides=('astyle')
conflicts=('astyle')
options=('staticlibs')
source=("svn+https://svn.code.sf.net/p/astyle/code/trunk")
sha256sums=('SKIP')


pkgver() {
  cd "trunk"

  _ver="$(svnversion)"
  printf "r%s" "${_ver//[[:alpha:]]}"
}

build() {
  cd "trunk/AStyle/build/gcc"

  make release shared static
}

package() {
  cd "trunk/AStyle/build/gcc"

  install -Dm755 "bin/astyle" "$pkgdir/usr/bin/astyle"

  install -d -m755 "$pkgdir/usr/lib"
  install -m755 "bin"/libastyle.so.* "$pkgdir/usr/lib"
  install -m644 "bin/libastyle.a" "$pkgdir/usr/lib"

  install -d -m755 "$pkgdir/usr/share/doc/astyle"
  install -m644 "../../doc"/* "$pkgdir/usr/share/doc/astyle"

  install -Dm644 "../../LICENSE.md" "$pkgdir/usr/share/licenses/astyle/LICENSE.md"
}