aboutsummaryrefslogtreecommitdiffstats
path: root/main/lsyncd/APKBUILD
blob: ec6b099e19dcb3a5710a73ddbcf890c37b32670d (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsyncd
pkgver=2.0.7
pkgrel=0
pkgdesc="Live Syncing (Mirror) Daemon"
url="http://code.google.com/p/lsyncd/"
arch="all"
license="GPLv2+"
depends="rsync"
depends_dev=
makedepends="$depends_dev lua-dev"
install=""
subpackages="$pkgname-doc"
source="http://lsyncd.googlecode.com/files/lsyncd-$pkgver.tar.gz
	$pkgname.initd"

_builddir="$srcdir"/lsyncd-$pkgver
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"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	mkdir -p "$pkgdir/etc/lsyncd"
	cp "$_builddir"/examples/*.lua \
		"$pkgdir"/etc/lsyncd/
	install -Dm755 "$srcdir/$pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname" || return 1
	
}

md5sums="4ef8787f6e3a402a9a2bcb84c123fb17  lsyncd-2.0.7.tar.gz
b3d38982ef1a6e09a76586418ec6c35d  lsyncd.initd"