aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua5.1/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-21 06:02:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-21 06:06:27 +0000
commit054735fd9e37e2b9ce3f2752b658e6d2fffafda7 (patch)
tree9fd3acd02fab7d6c719a06fd8fc378a96693ff94 /main/lua5.1/APKBUILD
parent659ace475ea5f55b1faa1a8de4430866bf4b4d85 (diff)
downloadaports-054735fd9e37e2b9ce3f2752b658e6d2fffafda7.tar.bz2
aports-054735fd9e37e2b9ce3f2752b658e6d2fffafda7.tar.xz
main/lua5.1: new aport. symlink 'lua' to this
Diffstat (limited to 'main/lua5.1/APKBUILD')
-rw-r--r--main/lua5.1/APKBUILD76
1 files changed, 76 insertions, 0 deletions
diff --git a/main/lua5.1/APKBUILD b/main/lua5.1/APKBUILD
new file mode 100644
index 0000000000..b30643429e
--- /dev/null
+++ b/main/lua5.1/APKBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua5.1
+pkgver=5.1.5
+_ver=$pkgver
+pkgrel=0
+pkgdesc="A powerful light-weight programming language designed for extending applications."
+url="http://www.lua.org/"
+arch="all"
+license="MIT"
+depends=
+makedepends="libtool"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="http://www.lua.org/ftp/lua-$_ver.tar.gz
+ lua-5.1-make.patch
+ lua-5.1-module_paths.patch
+ lua-5.1-readline.patch
+ "
+
+_builddir="$srcdir"/lua-$_ver
+build() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ patch*|*.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:4:1/' src/Makefile
+
+ # we want packages to find our things
+ sed -i -e 's:/usr/local:/usr:' etc/lua.pc
+
+ cd src
+ make CFLAGS=" -DLUA_USE_LINUX $CFLAGS" \
+ RPATH="/usr/lib" \
+ LIB_LIBS="-lpthread -lm -ldl" \
+ V=$pkgver \
+ gentoo_all || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INSTALL_TOP="$pkgdir"/usr INSTALL_LIB="$pkgdir"/usr/lib \
+ V=$pkgver gentoo_install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+
+ for i in "$pkgdir"/usr/bin/*; do
+ mv $i ${i}5.1
+ done
+
+ install -D -m 644 etc/lua.pc "$pkgdir"/usr/lib/pkgconfig/lua5.1.pc
+ install -D -m 644 doc/lua.1 "$pkgdir"/usr/share/man/man1/lua5.1.1
+ install -D -m 644 doc/luac.1 "$pkgdir"/usr/share/man/man1/luac5.1.1
+}
+
+dev() {
+ default_dev
+ replaces="lua-dev"
+}
+
+libs() {
+ pkgdesc="Lua dynamic library runtime"
+ replaces="lua lua-libs"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+}
+
+
+md5sums="2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz
+0145ff6036eb6bfdab427dc8f0c3f3c0 lua-5.1-make.patch
+e60ef15deefb72a5930c498f1184aced lua-5.1-module_paths.patch
+f2205b897edb31292a1f597a7fd638cb lua-5.1-readline.patch"