diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2017-08-20 00:40:18 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2017-08-20 00:40:18 +0200 |
commit | 9f4ff4ed2cc53b09053296c5c8007bbc54d18597 (patch) | |
tree | 65ca25bcecab4a35c54d35eea964dc4498536487 /testing/lua-linotify | |
parent | 86f97ec148c9b812ac99ae2b58593999a2918a56 (diff) | |
download | aports-9f4ff4ed2cc53b09053296c5c8007bbc54d18597.tar.bz2 aports-9f4ff4ed2cc53b09053296c5c8007bbc54d18597.tar.xz |
testing/lua-linotify: new aport
Diffstat (limited to 'testing/lua-linotify')
-rw-r--r-- | testing/lua-linotify/APKBUILD | 55 | ||||
-rw-r--r-- | testing/lua-linotify/makefile.patch | 25 |
2 files changed, 80 insertions, 0 deletions
diff --git a/testing/lua-linotify/APKBUILD b/testing/lua-linotify/APKBUILD new file mode 100644 index 0000000000..782cda30f7 --- /dev/null +++ b/testing/lua-linotify/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=lua-linotify +pkgver=0.4 +pkgrel=0 +pkgdesc="Inotify bindings for Lua" +url="https://github.com/hoelzro/linotify" +arch="all" +license="MIT" +depends="" +makedepends="" +install="" +subpackages="" +source="linotify-$pkgver.tar.gz::https://github.com/hoelzro/linotify/archive/$pkgver.tar.gz + makefile.patch + " +builddir="$srcdir/linotify-$pkgver" + +_luaversions="5.1 5.2 5.3" +for _v in $_luaversions; do + makedepends="$makedepends lua$_v-dev" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage" +done + +prepare() { + default_prepare + + local lver; for lver in $_luaversions; do + cp -r "$builddir" "$builddir-$lver" + done +} + +build() { + local lver; for lver in $_luaversions; do + msg "Building for Lua $lver..." + make LUAVER=$lver -C "$builddir-$lver" + done +} + +package() { + mkdir -p "$pkgdir" +} + +_subpackage() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc (for Lua $lver)" + depends="lua$lver" + install_if="$pkgname=$pkgver-r$pkgrel lua$lver" + + cd "$builddir-$lver" + make LUAVER=$lver PREFIX="/usr" DESTDIR="$subpkgdir" install +} + +sha512sums="8024b32ffcb8ce696786bf15f5b61978e511d6484e3817550fc0e49b1dbebb3f3db9d4b2ced8e772a65b31616102a03161dbc91e3efb4082ccea63b7269ac5d8 linotify-0.4.tar.gz +d2729c6124c0119d0933c6b563747795be6ed830c539ae839ba4724412e535cabc53457b81a578fa7c551e4e1894428868b7a79d9d7299675d74e0fbae033b5a makefile.patch" diff --git a/testing/lua-linotify/makefile.patch b/testing/lua-linotify/makefile.patch new file mode 100644 index 0000000000..5a637f6d75 --- /dev/null +++ b/testing/lua-linotify/makefile.patch @@ -0,0 +1,25 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -7,19 +7,13 @@ + # out this line when debugging. + OMIT_FRAME_POINTER = -fomit-frame-pointer + +-# Seach for lua .pc file +-LUAPKG_CMD = $(shell pkg-config --list-all | grep Lua | awk '{print $$1}') +-CFLAGS = -fPIC -O3 -Wall $(shell pkg-config "$(LUAPKG_CMD)" --cflags) +-LFLAGS = -shared $(OMIT_FRAME_POINTER) +-INSTALL_PATH = $(shell pkg-config "$(LUAPKG_CMD)" --variable=INSTALL_CMOD) +- + ## If your system doesn't have pkg-config, comment out the previous + ## lines and uncomment and change the following ones according to your + ## building enviroment. + +-#CFLAGS = -I/usr/include/lua5.1/ -fPIC -O3 -Wall +-#LFLAGS = -shared $(OMIT_FRAME_POINTER) +-#INSTALL_PATH = /usr/lib/lua/5.1 ++CFLAGS = -I/usr/include/lua$(LUAVER)/ -fPIC -O3 -Wall ++LFLAGS = -shared $(OMIT_FRAME_POINTER) ++INSTALL_PATH = /usr/lib/lua/$(LUAVER) + + all: $(LIBNAME) + |