aboutsummaryrefslogtreecommitdiffstats
path: root/main/phodav/APKBUILD
blob: cd81e49ecb904aea8f0f78b93e6c4ffb461bd783 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=phodav
pkgver=2.2
pkgrel=0
pkgdesc="A WebDAV server using libsoup"
url="https://wiki.gnome.org/phodav"
arch="all"
license="LGPLv2+"
depends=""
depends_dev=""
makedepends="$depends_dev libsoup-dev avahi-dev intltool"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang chezdav
	spice-webdavd:spice"
source="http://download.gnome.org/sources/phodav/$pkgver/phodav-$pkgver.tar.xz
	spice-webdavd.initd"

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

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/systemd
	install -Dm755 "$srcdir"/spice-webdavd.initd \
		"$pkgdir"/etc/init.d/spice-webdavd
}

chezdav() {
	pkgdesc="A simple WebDAV server program"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

spice() {
	pkgdesc="Spice daemon for the DAV channel"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
	mv "$pkgdir"/lib "$pkgdir"/etc "$subpkgdir"/
}


sha512sums="1d16716c1bda674a6695b651e9b1bcb4b7cfefd9b60291ed3f5691f4f6f45f68a970d99fc4820bed0484cf0a43c1bf32e4d208fcc239ac0c0b7a75bf779e8913  phodav-2.2.tar.xz
9c38481ea8d59c4abee273080e7c48804c1453669804de008a98324c47e21253cbedf7b78e734afd12f4769fe3b451972f44d1dfd53012e2af02605a7fb2b916  spice-webdavd.initd"