summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRod Kay2021-06-20 17:23:49 +1000
committerRod Kay2021-06-20 17:23:49 +1000
commitae2e5b60d0c3611d1637bd79f45db1c7a27540ca (patch)
tree1cb7d0d3ec14abf963cb691c8c88dff94bcffd76
downloadaur-ae2e5b60d0c3611d1637bd79f45db1c7a27540ca.tar.gz
Add initial PKGBUILD.
-rw-r--r--.SRCINFO17
-rw-r--r--Makefile.patch30
-rw-r--r--PKGBUILD55
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..129830a9d267
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = ada_spawn
+ pkgdesc = A simple Ada API to spawn processes and communicate with them.
+ pkgver = r69.725a42d
+ pkgrel = 1
+ url = https://github.com/AdaCore/spawn
+ arch = x86_64
+ license = GPL3
+ license = custom
+ makedepends = git
+ makedepends = gcc-ada
+ makedepends = gprbuild
+ source = git+https://github.com/AdaCore/spawn.git#commit=725a42d9511ac414147dc9d7a2e16a6743e0f779
+ source = Makefile.patch
+ sha1sums = SKIP
+ sha1sums = b77624236aa8988085ae6bddd4ca18c5d2e11cb8
+
+pkgname = ada_spawn
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 000000000000..32a905fb0c42
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,30 @@
+diff --git a/Makefile b/Makefile
+index 32b9c1d..736e964 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,8 +18,11 @@ ifneq ($(OS),Windows_NT)
+ endif
+
+ all:
++ export LIBRARY_TYPE=relocateable
+ gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn.gpr
+ gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn_tests.gpr
++ gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn_glib.gpr
++ gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn_glib_tests.gpr
+ check:
+ export LD_LIBRARY_PATH=.libs/spawn/relocatable; \
+ for TEST in ${SPAWN_TESTS}; do \
+@@ -27,7 +30,13 @@ check:
+ done
+
+ install:
++ export LIBRARY_TYPE=relocateable
+ gprinstall $(GPRINSTALL_FLAGS) -p -P gnat/spawn.gpr
++
++install-glib:
++ export LIBRARY_TYPE=relocateable
++ gprinstall $(GPRINSTALL_FLAGS) -p -P gnat/spawn_glib.gpr
++
+ clean:
+ gprclean -q -P gnat/spawn.gpr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3fbaf5090cb0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Rod Kay <rodakay5 at gmail dot com>
+
+pkgname=ada_spawn
+pkgver=r69.725a42d
+pkgrel=1
+pkgdesc="A simple Ada API to spawn processes and communicate with them."
+arch=('x86_64')
+url="https://github.com/AdaCore/spawn"
+license=('GPL3' 'custom')
+makedepends=('git' 'gcc-ada' 'gprbuild')
+source=("git+https://github.com/AdaCore/spawn.git#commit=725a42d9511ac414147dc9d7a2e16a6743e0f779"
+ "Makefile.patch")
+sha1sums=(SKIP
+ b77624236aa8988085ae6bddd4ca18c5d2e11cb8)
+
+pkgver() {
+ cd "$srcdir/spawn"
+ printf "r%s.%s" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/spawn"
+ patch -Np1 -i ../Makefile.patch
+}
+
+build() {
+ cd "$srcdir/spawn"
+ export OS=unix
+ make all
+}
+
+package() {
+ cd "$srcdir/spawn"
+
+ export OS=unix
+ DESTDIR=$pkgdir make install
+
+ # Rid duplicated '.ali' files.
+ rm $pkgdir/usr/lib/spawn/spawn-environments.ali
+ rm $pkgdir/usr/lib/spawn/spawn-internal__posix.ali
+
+ DESTDIR=$pkgdir make install-glib
+
+ # Install the license.
+ install -D -m644 \
+ "COPYING3" \
+ "$pkgdir/usr/share/licenses/ada_spawn/COPYING3"
+
+ # Install the custom license.
+ install -D -m644 \
+ "COPYING.RUNTIME" \
+ "$pkgdir/usr/share/licenses/ada_spawn/COPYING.RUNTIME"
+}