summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..02a5165bc6aa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Rod Kay <rodakay5 at gmail dot com>
+
+pkgname=langkit
+pkgver=20210518
+pkgrel=1
+pkgdesc='Compiler for syntactic and semantic language analysis libraries'
+
+url='https://github.com/AdaCore/langkit/'
+arch=('i686' 'x86_64')
+license=('GPL3' 'custom')
+
+depends=('gnatcoll-iconv' 'autopep8'
+ 'python-psutil' 'python-sphinx' 'python-yaml' 'python-docutils'
+ 'python-e3-core' 'python-funcy' 'python-mako' 'yapf')
+makedepends=('gprbuild' 'texlive-bin')
+
+_extract_dir="$pkgname-2021-$pkgver-19B8E-src"
+source=("$pkgname-$pkgver.tar.gz::https://community.download.adacore.com/v1/709e5ffa66fd8181655951e0ec8ed04e1d2977e2?filename=$_extract_dir.tar.gz&rand=398")
+sha1sums=('709e5ffa66fd8181655951e0ec8ed04e1d2977e2')
+
+build()
+{
+ cd "$srcdir/$_extract_dir"
+
+ # Make the Langkit Python package tree available for import
+ export PYTHONPATH="$srcdir/$_extract_dir"
+
+ # Build the Langkit_Support library, used by all Langkit-generated libraries.
+ python manage.py build-langkit-support \
+ --library-types=relocatable \
+ --build-mode=prod \
+ --gargs="-R"
+
+ make -C doc html
+}
+
+package()
+{
+ cd "$srcdir/$_extract_dir"
+
+ python setup.py install --root="$pkgdir"
+
+ python manage.py install-langkit-support \
+ --library-types=relocatable \
+ --build-mode=prod \
+ "$pkgdir/usr"
+
+ # 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"
+
+ # Install the documentation.
+ cd doc/_build/html
+
+ for file in $(find . -type f); do
+ install -m 644 -D ${file} "$pkgdir/usr/share/doc/$pkgname"/${file#source/}
+ done
+}