summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c61bca3e16274d67c4e4926f84eed9e95f384136 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Rod Kay <rodakay5 at gmail dot com>

pkgbase=gpr
pkgdesc='Parser for Ada GPR project files.'
pkgname=(gpr gpr2tools)
pkgver=24.0w
pkgrel=1

url=https://github.com/AdaCore/gpr
arch=(i686 x86_64)
license=(GPL3 Apache)

depends=(gnatcoll-iconv
         gnatcoll-gmp
         python
         which
         python-funcy
         python-mako
         python-docutils)

makedepends=(gprbuild python-e3-core)

source=(https://github.com/charlie5/archlinux-gnatstudio-support/raw/main/gnatstudio-sources/gpr2-$pkgver-20230324-16151-src.tar.gz)
sha256sums=(e6f85d621d5161c15004657df01ae797a6cd782a8f7cf4fdbdf5b280e6840a1b)


prepare()
{
    cd $srcdir/gpr2-$pkgver-20230428-162AF-src
    make setup prefix=$pkgdir/usr GPR2KBDIR=/usr/share/gprconfig
}


build()
{
    cd $srcdir/gpr2-$pkgver-20230428-162AF-src

    make build-lib-static
    make build-lib-static-pic
    make build-lib-relocatable
    make build-tools

    make doc
    make docgen
}


package_gpr()
{
    cd $srcdir/gpr2-$pkgver-20230428-162AF-src

    make install-libs
    make install-tools
   
    # These conflict with the binaries from 'gprbuild'.
    #
    rm $pkgdir/usr/bin/gprclean
    rm $pkgdir/usr/bin/gprconfig
    rm $pkgdir/usr/bin/gprinstall
    rm $pkgdir/usr/bin/gprls

    # Install the license.
    #
    install -D -m644 \
       COPYING3      \
       $pkgdir/usr/share/licenses/$pkgname/COPYING3

    # Install the custom license.
    #
    install -D -m644 \
       LICENSE       \
       $pkgdir/usr/share/licenses/$pkgname/LICENSE
}


package_gpr2tools()
{
    provides=(gprtools)
    conflicts=(gprtools)

    cd $srcdir/gpr2-$pkgver-20230428-162AF-src

    mkdir -p $pkgdir/usr/bin
    cp  .build/release/gprclean    $pkgdir/usr/bin
    cp  .build/release/gprconfig   $pkgdir/usr/bin
    cp  .build/release/gprinstall  $pkgdir/usr/bin
    cp  .build/release/gprls       $pkgdir/usr/bin

    # Install the license.
    #
    install -D -m644 \
       COPYING3      \
       $pkgdir/usr/share/licenses/$pkgname/COPYING3

    # Install the custom license.
    #
    install -D -m644 \
       LICENSE       \
       $pkgdir/usr/share/licenses/$pkgname/LICENSE
}