aboutsummaryrefslogtreecommitdiffstats
path: root/community/phodav/APKBUILD
blob: ef9e11c6c5ba0161d86d27834ac0f4e71b5b4288 (plain) (blame)
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=phodav
pkgver=2.4
pkgrel=0
pkgdesc="A WebDAV server using libsoup"
url="https://wiki.gnome.org/phodav"
arch="all"
license="LGPL-2.0-or-later"
options="!check" # No test suite
makedepends="asciidoc attr-dev avahi-dev eudev-dev gtk-doc intltool libsoup-dev meson xmlto"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang chezdav chezdav-doc:chezdav_doc
	spice-webdavd:spice spice-webdavd-openrc:spice_openrc"
source="https://download.gnome.org/sources/phodav/$pkgver/phodav-$pkgver.tar.xz
	spice-webdavd.initd
	"

build() {
	meson \
		--prefix=/usr \
		--datadir=share \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--buildtype=plain \
		-Davahi=enabled \
		-Dsystemd=disabled \
		-Dudev=enabled \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	rm -rf "$pkgdir"/usr/lib/systemd
}

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

chezdav_doc() {
	pkgdesc="A simple WebDAV server program (documentation)"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/../phodav-doc/usr/share/man "$subpkgdir"/usr/share/
}

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

spice_openrc() {
	pkgdesc="Spice daemon for the DAV channel (OpenRC init scripts)"
	install_if="spice-webdavd openrc"
	mkdir -p "$subpkgdir"/etc/init.d
	install "$srcdir"/spice-webdavd.initd "$subpkgdir"/etc/init.d/spice-webdavd
}

sha512sums="63f21843ccf62382bc48aa0c7f9ae6882431e59f590da5047f06e8cbbfcf8195744dcfc3b268997bf24ccf1f82f643b8189243f1ec80e60652a03c8c6a0f9b9e  phodav-2.4.tar.xz
1e10314f831840d9f54f38163bd518f42a378fe27b508639771b82610b4a434d4ec56c70a334dbfc7c8cd91160ba346751978f511c522577803248205dbcd211  spice-webdavd.initd"