aboutsummaryrefslogtreecommitdiffstats
path: root/community/phodav/APKBUILD
blob: 2efdb32e23e35481b7ee4910e827e12ee75aeb55 (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
72
73
74
75
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=phodav
pkgver=2.3
pkgrel=1
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
	meson_build-udev.patch
	"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"

	meson build/ \
		--prefix=/usr \
		--datadir=share \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		-Davahi=enabled \
		-Dsystemd=disabled \
		-Dudev=enabled

	# print config options to log
	meson configure build/

	ninja -C build/
}

package() {
	cd "$builddir"

	DESTDIR="$pkgdir" ninja -C build 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="5f76ed0a4322707d117fc40a7bcab3a0bed7e53de52e0517e3ad79e3a6d93fc0200f6b54d8e001941d76ae22bd7f9ad158c0bee19354a316a18691057b65a002  phodav-2.3.tar.xz
26db271c92760c38cf88bee6f8486e1c64aeaf81b19906783a3ea5e60054b2d5e7effdd26c59789ae3e964baa8bb498358724322b360bce229b45b6bee68f538  spice-webdavd.initd
5ab7b8577ad78148a49d5218f839d4e82cce01167ca5d451b121f33c292ec5f6875e7d5d78b5f2969626e34b4225091a192f70c7916886651c39c60369cf2e7d  meson_build-udev.patch"