summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens John2015-07-28 15:50:49 +0200
committerJens John2015-07-28 15:50:49 +0200
commit1475ba7270823d182a7aec41d592cc62b34f6239 (patch)
treefb3bfaf2409abcb8eb7acb76a8f034516ef8ef3e
downloadaur-1475ba7270823d182a7aec41d592cc62b34f6239.tar.gz
Initial package upload
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD42
-rw-r--r--archlinux-pkgconfig.patch19
-rw-r--r--ctypes_bash_profile.sh3
4 files changed, 88 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..15ce1333f3f0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = bash-ctypes-git
+ pkgdesc = Foreign Function Interface for Bash
+ pkgver = r12.7cded42
+ pkgrel = 1
+ url = https://github.com/taviso/ctypes.sh
+ arch = x86_64
+ arch = i686
+ license = MIT
+ makedepends = git
+ makedepends = libffi
+ makedepends = pkg-config
+ depends = bash
+ depends = libffi
+ provides = bash-ctypes
+ conflicts = bash-ctypes
+ source = bash-ctypes::git+https://github.com/taviso/ctypes.sh#branch=master
+ source = archlinux-pkgconfig.patch
+ source = ctypes_bash_profile.sh
+ md5sums = SKIP
+ md5sums = d62e880683bab33be4d845602d77f237
+ md5sums = 8f94ef9e242b89d5ea860527e2595f2c
+
+pkgname = bash-ctypes-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..73cedbd07f56
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: 2ion <dev at 2ion dot de>
+pkgname=bash-ctypes-git
+pkgver=r12.7cded42
+pkgrel=1
+pkgdesc="Foreign Function Interface for Bash"
+arch=('x86_64' 'i686')
+url="https://github.com/taviso/ctypes.sh"
+license=('MIT')
+depends=('bash' 'libffi')
+makedepends=('git' 'libffi' 'pkg-config')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=(\
+ 'bash-ctypes::git+https://github.com/taviso/ctypes.sh#branch=master'\
+ 'archlinux-pkgconfig.patch'\
+ 'ctypes_bash_profile.sh')
+md5sums=(\
+ 'SKIP'\
+ 'd62e880683bab33be4d845602d77f237'\
+ '8f94ef9e242b89d5ea860527e2595f2c')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${pkgname%-git}"
+ patch -p1 -i "$srcdir/archlinux-pkgconfig.patch"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ install -Dm755 ctypes.sh "${pkgdir}/usr/bin/ctypes.sh"
+ install -Dm755 ctypes.so "${pkgdir}/usr/lib/ctypes.so"
+ install -Dm755 "${srcdir}/ctypes_bash_profile.sh" "${pkgdir}/etc/profile.d/ctypes.sh"
+}
diff --git a/archlinux-pkgconfig.patch b/archlinux-pkgconfig.patch
new file mode 100644
index 000000000000..f31e44699a99
--- /dev/null
+++ b/archlinux-pkgconfig.patch
@@ -0,0 +1,19 @@
+commit 5ba179a87a206f284b0eb2e91665617a849ef0f2
+Author: Jens John <dev@2ion.de>
+Date: Tue Jul 28 15:27:08 2015 +0200
+
+ Patched Makefile
+
+diff --git a/Makefile b/Makefile
+index 8a87263..bc41df8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+-CFLAGS = -std=gnu99 -fPIC -O0 -ggdb3 -Wall -Wextra -fvisibility=hidden
++CFLAGS = -std=gnu99 -fPIC -O0 -ggdb3 -Wall -Wextra -fvisibility=hidden $(shell pkg-config --cflags libffi)
+ CPPFLAGS= -Iinclude
+-LDLIBS = -lffi -ldl
++LDLIBS = $(shell pkg-config --libs libffi) -ldl
+ PREFIX = /usr/local
+
+ .PHONY: clean install
diff --git a/ctypes_bash_profile.sh b/ctypes_bash_profile.sh
new file mode 100644
index 000000000000..5c28f6c4a20a
--- /dev/null
+++ b/ctypes_bash_profile.sh
@@ -0,0 +1,3 @@
+if [ -n "${BASH_VERSION}+1" ]; then
+ source /usr/bin/ctypes.sh
+fi