summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 57f90583ab7b56c335ff309606f62edd58ec4933 (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
pkgname=gprbuild-bootstrap
#pkgver=r3147.g18e2bc01
pkgver=2017
pkgrel=1

pkgdesc='static gprbuild to bootstrap xmlada and gprbuild proper'
url='http://www.adacore.com/gnatpro/toolsuite/gprbuild/'
arch=('i686' 'x86_64')
license=('GPL')

options=('debug' '!strip')

depends=('glibc')
makedepends=('git' 'gcc-ada')

source=('git+https://github.com/AdaCore/gprbuild'
        'git+https://github.com/AdaCore/xmlada')

sha1sums=('SKIP' 'SKIP')

#pkgver() {
#    cd gprbuild
#    printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
#}

prepare() {
    cd gprbuild

    # Not everyone is Debian.
    sed -i 's/libexec/lib/g' doinstall gprbuild.gpr \
        share/gprconfig/compilers.xml \
        share/gprconfig/linker.xml \
        share/gprconfig/gnat.xml
}

build() {
    cd gprbuild
    export GNATMAKEFLAGS="-j$(nproc)"
    export DESTDIR="$srcdir"/bootstrap
    ./bootstrap.sh --prefix=/usr --libexecdir=/lib --with-xmlada="$srcdir"/xmlada
}

package() {
    cd bootstrap
    cp -a --no-preserve=ownership -- "$srcdir"/bootstrap/usr "$pkgdir"
}