blob: f72c3306867982c03c52fcc310487cb5257579c9 (
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
|
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
pkgname=lua-subprocess
pkgver=0.0.20121211
pkgrel=1
pkgdesc="A Lua module written in C that allows you to create child processes and communicate with them"
url="https://github.com/xlq/lua-subprocess"
arch="all"
license="AS-IS"
depends=""
depends_dev=""
makedepends="$depends_dev lua-dev"
install=""
subpackages=""
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
openexception.patch
makefile.patch"
_builddir="$srcdir/$pkgname-$pkgver"
_giturl="git://github.com/xlq/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
}
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
}
md5sums="c2f13ef8e1fb83af43d61586ff611957 lua-subprocess-0.0.20121211.tar.gz
fa869a7c9a11faf77ad9fd98ba35f62a openexception.patch
cc680a0ec32e0461215ce61a44bbb540 makefile.patch"
|