summaryrefslogblamecommitdiff
path: root/user/mistserver/APKBUILD
blob: 91316629a1417bebc1cb330719d574a63a3b0f89 (plain) (tree)
































                                                                                                         

                                                                             


















                                                                                                                                                                      
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=mistserver
pkgver=2.18.1
pkgrel=0
pkgdesc="Multimedia streaming services"
url="https://mistserver.org"
arch="all"
license="Zlib AND AGPL-3.0-only"
depends=""
install="$pkgname.pre-install"
makedepends="cmake libexecinfo-dev mbedtls-dev<3"
pkgusers="mistserver"
pkggroups="mistserver"
subpackages="$pkgname-dev $pkgname-openrc"
source="mistserver-$pkgver.tar.gz::https://github.com/DDVTECH/mistserver/archive/refs/tags/$pkgver.tar.gz
	mistserver.confd
	mistserver.initd
	link-execinfo.patch"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
		-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
		${CMAKE_CROSSOPTS} \
		.
	# FIXME: this usually succeeds on loop 3. should add a timeout/limit.
	until make; do :; done
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install

	# OpenRC

        install -Dm755 "$srcdir"/mistserver.initd "$pkgdir"/etc/init.d/mistserver
        install -Dm644 "$srcdir"/mistserver.confd "$pkgdir"/etc/conf.d/mistserver
}

sha512sums="671574687ecabf9b8134f2eef033b66fd13cc4463e2edcf34fe69ff9221b30ddb7ce6a6db3d82708c21fad0910bd0225c483060d36058e0ba778eadd5b8c6e82  mistserver-2.18.1.tar.gz
7288adab6589f2facc1cb794057b1c5d9ec94e12e60d6afc8f6f25c54a8e908cc9841b83b5a6e608fa799fd6aa11767e92a963004182d45f7be9ccd3b65097e7  mistserver.confd
e0c7df42f4d486983ece1ea50ab8f3006ebab5386881c14c4b2ff1246b6dd38ace935dc54f8f8a7687edb7ca5975b8c26abd6e99957b8c892862732263d49eb9  mistserver.initd
a27bac965078f7eafb339ae7be9e50519d5728ae4f5d725905d5eecbb3fdf048df3e150cfa881be4bab754ca674a11271343156d5d97758d2ca65bef5bff55a6  link-execinfo.patch"