Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add owntone (aka forked-daadp) #4337

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
26 changes: 26 additions & 0 deletions cross/avahi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
PKG_NAME = avahi
PKG_VERS = 0.8
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/lathiat/avahi/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/glib cross/libevent cross/libexpat cross/libdaemon cross/dbus

HOMEPAGE = https://www.avahi.org/
COMMENT = Avahi - Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour
LICENSE = LGPLv2.1

GNU_CONFIGURE = 1
CONFIGURE_ARGS = --with-distro=none
CONFIGURE_ARGS += --disable-static
CONFIGURE_ARGS += --disable-qt5 --disable-qt4
CONFIGURE_ARGS += --disable-gtk --disable-gtk3
CONFIGURE_ARGS += --disable-gdbm
CONFIGURE_ARGS += --disable-python
CONFIGURE_ARGS += --disable-mono --disable-monodoc

# Build requires access to glib-mkenums Python script from cross/glib
ENV += PATH=$$PATH:$(STAGING_INSTALL_PREFIX)/bin

include ../../mk/spksrc.cross-cc.mk
18 changes: 18 additions & 0 deletions cross/avahi/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
lnk:lib/libavahi-client.so
lnk:lib/libavahi-client.so.3
lib:lib/libavahi-client.so.3.2.9
lnk:lib/libavahi-common.so
lnk:lib/libavahi-common.so.3
lib:lib/libavahi-common.so.3.5.4
lnk:lib/libavahi-core.so
lnk:lib/libavahi-core.so.7
lib:lib/libavahi-core.so.7.1.0
lnk:lib/libavahi-glib.so
lnk:lib/libavahi-glib.so.1
lib:lib/libavahi-glib.so.1.0.2
lnk:lib/libavahi-gobject.so
lnk:lib/libavahi-gobject.so.0
lib:lib/libavahi-gobject.so.0.0.5
lnk:lib/libavahi-libevent.so
lnk:lib/libavahi-libevent.so.1
lib:lib/libavahi-libevent.so.1.0.0
3 changes: 3 additions & 0 deletions cross/avahi/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
avahi-0.8.tar.gz SHA1 969a50ae18c8d8e2288435a75666dd076e69852a
avahi-0.8.tar.gz SHA256 060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
avahi-0.8.tar.gz MD5 229c6aa30674fc43c202b22c5f8c2be7
16 changes: 16 additions & 0 deletions cross/libantlr3c/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PKG_NAME = libantlr3c
PKG_VERS = 3.4
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://www.antlr3.org/download/C/
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://www.antlr3.org/
COMMENT = ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages.
LICENSE = 3-clause BSD

GNU_CONFIGURE = 1

include ../../mk/spksrc.cross-cc.mk
1 change: 1 addition & 0 deletions cross/libantlr3c/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib:lib/libantlr3c.so
3 changes: 3 additions & 0 deletions cross/libantlr3c/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libantlr3c-3.4.tar.gz SHA1 faa9ab43ab4d3774f015471c3f011cc247df6a18
libantlr3c-3.4.tar.gz SHA256 ca914a97f1a2d2f2c8e1fca12d3df65310ff0286d35c48b7ae5f11dcc8b2eb52
libantlr3c-3.4.tar.gz MD5 08b1420129d5dccd0f4461cedf2a0d7d
16 changes: 16 additions & 0 deletions cross/libconfuse/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PKG_NAME = confuse
PKG_VERS = 3.3
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/libconfuse/libconfuse/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://github.com/libconfuse/libconfuse#readme
COMMENT = Small configuration file parser library for C.
LICENSE = ISC

GNU_CONFIGURE = 1

include ../../mk/spksrc.cross-cc.mk
3 changes: 3 additions & 0 deletions cross/libconfuse/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libconfuse.so
lnk:lib/libconfuse.so.2
lib:lib/libconfuse.so.2.1.0
3 changes: 3 additions & 0 deletions cross/libconfuse/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
confuse-3.3.tar.xz SHA1 8d07f3877331b7e87309e4dcacb353ce5e2ea0bd
confuse-3.3.tar.xz SHA256 1dd50a0320e135a55025b23fcdbb3f0a81913b6d0b0a9df8cc2fdf3b3dc67010
confuse-3.3.tar.xz MD5 a183cef2cecdd3783436ff8de500d274
23 changes: 23 additions & 0 deletions cross/mxml/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PKG_NAME = mxml
PKG_VERS = 3.3
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/michaelrsweet/mxml/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://www.msweet.org/mxml
COMMENT = Mini-XML is a tiny XML library that you can use to read and write XML and XML-like data files in your application without requiring large non-standard libraries.
LICENSE = Apache 2.0

GNU_CONFIGURE = 1
INSTALL_TARGET = mxml_install

ADDITIONAL_CPPFLAGS = -O

include ../../mk/spksrc.cross-cc.mk

.PHONY: mxml_install
mxml_install:
@$(RUN) $(MAKE) DSTROOT=$(INSTALL_DIR) install
3 changes: 3 additions & 0 deletions cross/mxml/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libmxml.so
lnk:lib/libmxml.so.1
lib:lib/libmxml.so.1.6
3 changes: 3 additions & 0 deletions cross/mxml/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mxml-3.3.tar.gz SHA1 66dd54a74cd0eea5663f75ec21a5e80b2e2de387
mxml-3.3.tar.gz SHA256 7cf976366f9e8e4f8cff7d35a59bcf6201c769fce9e58015d64f4b6de1fe3dd8
mxml-3.3.tar.gz MD5 2172386b2f5073ec14ab44e664961b8b
47 changes: 47 additions & 0 deletions cross/owntone/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PKG_NAME = owntone
PKG_VERS = 28.1
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/owntone/owntone-server/releases/download/$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

OPTIONAL_DEPENDS = cross/ffmpeg4

DEPENDS = cross/libunistring cross/zlib cross/libconfuse cross/curl
DEPENDS += cross/mxml cross/sqlite cross/libevent cross/json-c
DEPENDS += cross/libantlr3c cross/libgcrypt
DEPENDS += cross/avahi
DEPENDS += cross/libplist
DEPENDS += cross/libwebsockets
DEPENDS += cross/libsodium
DEPENDS += cross/alsa-lib

ifeq ($(wildcard $(FFMPEG_DIR)),)
DEPENDS += cross/ffmpeg4
endif

HOMEPAGE = http://owntone.github.io/owntone-server
COMMENT = OwnTone is forked-daapd's new name. Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
LICENSE = GPLv2

GNU_CONFIGURE = 1
ADDITIONAL_CFLAGS = -std=c99

include ../../mk/spksrc.archs.mk
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(PPC_ARCHS)),$(ARCH))
POST_INSTALL_TARGET = owntone_post_install
else
PLIST_TRANSFORM = sed -e '/\/libssp\.so/d'
endif

include ../../mk/spksrc.cross-cc.mk

# install libssp of toolchain
TC_LIBSSP_FILE = libssp.so.0.0.0

.PHONY: owntone_post_install
owntone_post_install:
@$(MSG) Install libssp from toolchain
@$(RUN) ; install $(TC_PATH)../$(TC_LIBRARY)/$(TC_LIBSSP_FILE) $(STAGING_INSTALL_PREFIX)/lib/
@$(RUN) ; cd $(STAGING_INSTALL_PREFIX)/lib/ && ln -sf $(TC_LIBSSP_FILE) libssp.so.0
@$(RUN) ; cd $(STAGING_INSTALL_PREFIX)/lib/ && ln -sf $(TC_LIBSSP_FILE) libssp.so
6 changes: 6 additions & 0 deletions cross/owntone/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rsc:etc/owntone.conf
lib:lib/owntone/owntone-sqlext.so
bin:sbin/owntone
lnk:lib/libssp.so
lnk:lib/libssp.so.0
lib:lib/libssp.so.0.0.0
3 changes: 3 additions & 0 deletions cross/owntone/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
owntone-28.1.tar.xz SHA1 5a2d5d507df0d4f52c7bb44a47107b7e47e95860
owntone-28.1.tar.xz SHA256 6b72776dd1fdd6e19fa71e0ba1ce355c2648dfa5be89da08df064bdf84e55f0a
owntone-28.1.tar.xz MD5 b8e1e55364e1e4cc9e6cd10af1758c72
15 changes: 15 additions & 0 deletions cross/owntone/patches/001-fix_mdns_avahi_init.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# fix mdns_init:
# - fix error handling when avahi is not available.
# this is fixed for owntone >= 28.4 (https://github.com/owntone/owntone-server/pull/1479)
#
--- src/mdns_avahi.c.orig 2021-05-21 21:42:05.000000000 +0000
+++ src/mdns_avahi.c 2022-05-22 18:05:20.678625353 +0000
@@ -1044,7 +1044,7 @@
client_callback, NULL, &error);
if (!mdns_client)
{
- DPRINTF(E_WARN, L_MDNS, "mdns_init: Could not create Avahi client: %s\n", MDNSERR);
+ DPRINTF(E_WARN, L_MDNS, "mdns_init: Could not create Avahi client: %s\n", avahi_strerror(error));

return -1;
}
52 changes: 52 additions & 0 deletions spk/owntone/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
SPK_NAME = owntone
SPK_VERS = 28.1
SPK_REV = 1
SPK_ICON = src/owntone.png

DEPENDS = cross/owntone

MAINTAINER = SynoCommunity
DESCRIPTION = OwnTone is forked-daapd\'s new name. Linux/FreeBSD DAAP \(iTunes\) and MPD media server with support for AirPlay devices \(multiroom\), Apple Remote \(and compatibles\), Chromecast, Spotify and internet radio.
CHANGELOG = "Initial package release."

DISPLAY_NAME = OwnTone

HOMEPAGE = http://owntone.github.io/owntone-server
LICENSE = GPLv2

# owntone's ports
# 3689 (daap)
# 3688 (web UI)
# 6600 (MPD client requests)

SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
STARTABLE = yes
SERVICE_PORT = 3689
ADMIN_PORT = $(SERIVCE_PORT)

# Reuse FFmpeg libraries
export FFMPEG_DIR = $(shell pwd)/../ffmpeg4/work-$(ARCH)-$(TCVERSION)/install/var/packages/ffmpeg/target

ifneq ($(wildcard $(FFMPEG_DIR)),)
PRE_DEPEND_TARGET = owntone_pre_depend
SPK_DEPENDS = "ffmpeg>4.2"
# Use some shared libraries of the FFMPEG package
FFMPEG_LIBS = libavformat.pc libavcodec.pc libavutil.pc libavfilter.pc
FFMPEG_LIBS += libswscale.pc libpostproc.pc
FFMPEG_LIBS += libswresample.pc libavresample.pc
endif

POST_STRIP_TARGET = owntone_extra_install

include ../../mk/spksrc.spk.mk

.PHONY: owntone_pre_depend
owntone_pre_depend:
mkdir -p $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/
$(foreach lib,$(FFMPEG_LIBS),ln -sf $(FFMPEG_DIR)/lib/pkgconfig/$(lib) $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/ ;)

.PHONY: owntone_extra_install
owntone_extra_install:
install -d -m 755 $(STAGING_DIR)/var
install -m 644 src/owntone.conf $(STAGING_DIR)/var
Loading