aboutsummaryrefslogtreecommitdiffstats
path: root/testing/csync/APKBUILD
blob: 7df5f5d65f8af424aa87584d71f4984b13114527 (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
# 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
	iniparser-dev neon-dev"
install=""
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-sftp:_plugin
	$pkgname-smb:_plugin
	$pkgname-owncloud:_plugin"
source="https://open.cryptomilk.org/attachments/download/27/csync-$pkgver.tar.xz
	iconv.patch
	gcc-fixes.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() {
	local _name="${subpkgname##*-}"
	pkgdesc="csync $1 plugin"

	local i
	cd "$pkgdir"
	for i in usr/lib/csync*/csync_${_name}.so; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv $i "$subpkgdir"/${i%/*}
	done
}

md5sums="4f022aaa19ecd8008b03876dd65a9df2  csync-0.50.0.tar.xz
166e828bf574dbfc1857b04985ec699b  iconv.patch
70a120f5f913fb44f66844734e200131  gcc-fixes.patch"
sha256sums="c07526942a93c1e213d354dc45fd61fbc0430c60e109e7a2f0fcaf6213a45c86  csync-0.50.0.tar.xz
1a64b9ad6bc8c79b16ae8f6eb31ca2d3e124132e8130b908925d60ddc0eea98c  iconv.patch
1bb262390c687780dc65adb36f0c89c7c04d3db235d69d1cae9280c8c6029cae  gcc-fixes.patch"
sha512sums="babe44af3a4f0bf58e011f1c33c7a6df9bc7751e03714dd64d8269c7c51bcc7f2ab32c4d286e5a11465c9498c988d1812c426a4f415f1138a4fb9fa341e1e29a  csync-0.50.0.tar.xz
fc124966d7b7405cc3d3bc1276180089dc44058bc89afa799c0d9378f4dc131e9382b96357fff5964c9b009cb77455f125b63557a32ca5eaa31e01cbd2f7a694  iconv.patch
88290d1dfbfeb775d89f4fbd20b9909a3fe5896ae85496eb53a0bd78162427ba7d910852ffb1887dcf380ad89e46c909d29e0a54f020c3ea92e613ac860b1b99  gcc-fixes.patch"