blob: e1dd45adeb71f570fbbf74f3e67651e46b6a0b15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
_luaversions="5.1 5.2"
pkgname=lua-subprocess
pkgver=0.0.20141229
pkgrel=0
pkgdesc="A Lua module written in C that allows you to create child processes and communicate with them"
url="https://github.com/tdtrask/lua-subprocess"
arch="all"
license="AS-IS"
depends=""
install=""
depends_dev=""
makedepends="$depends_dev asciidoc"
subpackages=""
for _i in $_luaversions; do
makedepends="$makedepends lua$_i-dev"
subpackages="$subpackages lua$_i-subprocess:split_${_i/./_}"
done
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
makefile.patch"
_giturl="git://github.com/tdtrask/lua-subprocess.git"
_upload="dev.alpinelinux.org:/archive/$pkgname/"
snapshot() {
local _date=$(date +%Y%m%d)
local _ver=0.0.$_date
local _pkg=$pkgname-$_ver.tar.gz
mkdir -p "$srcdir"
cd "$srcdir"
msg "Creating snapshot: $_pkg"
rm -rf ${_giturl##*/}
git clone --depth=1 --bare $_giturl || return 1
git --git-dir ${_giturl##*/} archive -o $_pkg \
--prefix=$pkgname-$_ver/ HEAD \
|| return 1
msg "Uploading to $_upload"
rsync -Lave ssh $_pkg $_upload || return 1
cd "$startdir"
sed -i -e "s/^pkgver=.*/pkgver=$_ver/" \
APKBUILD || return 1
abuild checksum
}
_sdir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_sdir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
for _i in $_luaversions; do
cp -r "$_sdir" "$srcdir"/build-$_i
done
}
build() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make lua_package="lua$_i" || return 1
done
}
package() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make lua_package="lua$_i" DESTDIR="$pkgdir" install || return 1
done
}
_split() {
local d= _ver=$1
pkgdesc="A Lua $_ver module written in C that allows you to create child processes and communicate with them"
replaces="$pkgname"
depends=
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
for _i in $_luaversions; do
eval "split_${_i/./_}() { _split $_i; }"
done
md5sums="a2ab629c701eba6f3300405daf104f1d lua-subprocess-0.0.20141229.tar.gz
f1e3718f4bcc74c7903354c5ddab0229 makefile.patch"
sha256sums="6d58417d9e2791408092ec2b232072c0461343954d3f72ee6943b0103ac6ce20 lua-subprocess-0.0.20141229.tar.gz
0f99c91db81e4dc2d3f49fdb6ab4bc6970f369752f2092c286456c6641ada1f3 makefile.patch"
sha512sums="5d0648a883102172bc086a0054f76832d25ce760149f0e0ddac927a325815b1937e780efc5d553bb6b751ed7642d728ff37745be134dfdb42753bde3b338a1b9 lua-subprocess-0.0.20141229.tar.gz
86cccb94ad5bf13c0ce85bc61d899f83d48ee46f06f8a49ef1f720c08a055165c2cb1b5b0596f8d14a237bcab7f2de7e9b2f2ecb11441802e07e6baa01d50b1f makefile.patch"
|