summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 539b6702066a9e14989579a7ef848306d5fddd8f (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
# Maintainer: Rod Kay <rodakay5 at gmail dot com>

pkgname=gnatcoll-gnatinspect
pkgdesc='GNAT Components Collection - the gnatinspect tool.'
pkgver=26.0w
pkgrel=1
epoch=1

url=https://github.com/AdaCore/gnatcoll-db
arch=(i686 x86_64)
license=(GPL3 custom)

depends=(gnatcoll-readline gnatcoll-xref)
makedepends=(gprbuild)

_repo_name=gnatcoll-db
_source_dir=gnatcoll-db-26.0w-20250416-16353-src

source=(https://github.com/charlie5/archlinux-gnatstudio-support/raw/refs/heads/main/gnatstudio-sources-2025/gnatcoll-db-26.0w-20250409-16317-src.tar.gz)
sha256sums=(fe4367a13407bb0d300dda10fbca26ffd5fa9d13121625f37b38d998e728d649)


build()
{
    cd $srcdir/$_source_dir/gnatinspect

    # Rid flags not used by Ada.
    #
    CFLAGS="${CFLAGS//-Wformat}"
    CFLAGS="${CFLAGS//-Werror=format-security}"

    make setup BUILD=PROD prefix=/usr
    make -j1 GPRBUILD_OPTIONS="-R -cargs $CFLAGS -largs $LDFLAGS -gargs"


    # Build documentation.
    #
    cd $srcdir/$_source_dir
    
    make -C docs html latexpdf      \
         1> build-docs-warnings.log \
         2> build-docs-errors.log 
}


package()
{
    cd $srcdir/$_source_dir/gnatinspect

    # Make one install at a time to avoid GPRinstall reading/writing to
    # the same installed project files at the same time.
    #
    make prefix="$pkgdir/usr" install -j1


    # Install the documentation.
    #
    mkdir -p $pkgdir/usr/share/doc/$pkgname
    
    cp -r ../docs/_build/html                  $pkgdir/usr/share/doc/$pkgname
    cp    ../docs/_build/latex/gnatcoll-db.pdf $pkgdir/usr/share/doc/$pkgname
    

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

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