aboutsummaryrefslogtreecommitdiffstats
path: root/testing/csync/APKBUILD
blob: 2dd215b7674e95efe0764182806edfc7556bcdeb (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=csync
pkgver=0.50.0
pkgrel=0
pkgdesc="a client only bidirectional file synchronizer"
url="http://www.csync.org/"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev check-dev samba-dev libssh-dev cmake sqlite-dev
	libiconv-dev iniparser-dev neon-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-sftp $pkgname-smb $pkgname-owncloud"
source="https://open.cryptomilk.org/attachments/download/27/csync-$pkgver.tar.xz
	iconv.patch
	"

_builddir="$srcdir"/csync-$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"
	mkdir build && cd build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		.. \
		|| return 1
	make || return 1

}

package() {
	cd "$_builddir"/build
	make install DESTDIR="$pkgdir" || return 1
}

_plugin() {
	pkgdesc="csync $1 plugin"
	cd "$pkgdir"
	local i
	for i in usr/lib/csync*/csync_$1.so; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv $i "$subpkgdir"/${i%/*}
	done
}

smb() { _plugin smb; }
sftp() { _plugin sftp; }
owncloud() { _plugin owncloud; }

md5sums="4f022aaa19ecd8008b03876dd65a9df2  csync-0.50.0.tar.xz
166e828bf574dbfc1857b04985ec699b  iconv.patch"
sha256sums="c07526942a93c1e213d354dc45fd61fbc0430c60e109e7a2f0fcaf6213a45c86  csync-0.50.0.tar.xz
1a64b9ad6bc8c79b16ae8f6eb31ca2d3e124132e8130b908925d60ddc0eea98c  iconv.patch"
sha512sums="babe44af3a4f0bf58e011f1c33c7a6df9bc7751e03714dd64d8269c7c51bcc7f2ab32c4d286e5a11465c9498c988d1812c426a4f415f1138a4fb9fa341e1e29a  csync-0.50.0.tar.xz
fc124966d7b7405cc3d3bc1276180089dc44058bc89afa799c0d9378f4dc131e9382b96357fff5964c9b009cb77455f125b63557a32ca5eaa31e01cbd2f7a694  iconv.patch"