Skip to content

Commit 207591c

Browse files
owntone: Add new owntone package variant: owntone-pulseaudio
1 parent c29619c commit 207591c

File tree

1 file changed

+54
-14
lines changed

1 file changed

+54
-14
lines changed

sound/owntone/Makefile

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=owntone
1111
PKG_VERSION:=28.8
12-
PKG_RELEASE:=1
12+
PKG_RELEASE:=2
1313

1414
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
1515
PKG_SOURCE_URL:=https://github.com/owntone/owntone-server/releases/download/$(PKG_VERSION)/
@@ -26,39 +26,76 @@ PKG_LICENSE_FILES:=COPYING
2626
include $(INCLUDE_DIR)/package.mk
2727
include $(INCLUDE_DIR)/nls.mk
2828

29+
define Package/owntone/default
30+
SECTION:=sound
31+
CATEGORY:=Sound
32+
TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
33+
URL:=https://github.com/owntone/owntone-server
34+
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
35+
+libevent2 +libevent2-pthreads +libdaemon +confuse +alsa-lib +libffmpeg-full \
36+
+mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
37+
+libprotobuf-c +libgnutls +libsodium +libwebsockets +libuuid $(ICONV_DEPENDS)
38+
endef
39+
2940
define Package/owntone
30-
SECTION:=sound
31-
CATEGORY:=Sound
32-
TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
33-
URL:=https://github.com/owntone/owntone-server
34-
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
35-
+libevent2 +libevent2-pthreads +libdaemon +confuse +alsa-lib +libffmpeg-full \
36-
+mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
37-
+libprotobuf-c +libgnutls +libsodium +libwebsockets +libuuid $(ICONV_DEPENDS)
41+
$(Package/owntone/default)
42+
TITLE+= (full)
43+
# FIXME: Goal: retain full compatibility with existing owntone package. Should "full" be used here ?
44+
VARIANT:=full
45+
DEFAULT_VARIANT:=1
46+
CONFLICTS:=owntone-pulseaudio
47+
endef
48+
49+
define Package/owntone-pulseaudio
50+
$(Package/owntone/default)
51+
TITLE+= (with pulseaudio support)
52+
DEPENDS+= +pulseaudio
53+
VARIANT:=pulseaudio
3854
endef
3955

40-
define Package/owntone/description
56+
define Package/owntone/default/description
4157
OwnTone is a Linux/FreeBSD DAAP (iTunes), MPD (Music Player Daemon) and
4258
RSP (Roku) media server. It has support for AirPlay speakers, Chromecast,
4359
Apple Remote (and compatibles), MPD clients, Spotify, internet radio and
4460
LastFM. It does not support AirPlay/Chromecast video.
4561
endef
62+
Package/owntone/description = $(Package/owntone/default/description)
63+
Package/owntone-pulseaudio/description = $(Package/owntone/default/description)
4664

47-
define Package/owntone/conffiles
65+
define Package/owntone/default/conffiles
4866
/etc/owntone.conf
4967
endef
68+
Package/owntone/conffiles = $(Package/owntone/default/conffiles)
69+
Package/owntone-pulseaudio/conffiles = $(Package/owntone/default/conffiles)
5070

5171
CONFIGURE_ARGS += \
5272
--enable-chromecast \
5373
--disable-install_systemd \
5474
--disable-install_conf_file \
5575
--disable-install_user \
56-
--with-alsa \
57-
--without-pulseaudio
76+
--with-alsa
77+
78+
ifeq ($(BUILD_VARIANT),pulseaudio)
79+
# FIXME: Undoing https://github.com/openwrt/packages/commit/7a90d1836c96d2bd9322bfaf3689fb19983604bc because a "pulseaudio" dependency was missing on OpenWRT.
80+
# Problem: Which "pulseaudio" dependency to add to fix this error ?
81+
#
82+
# checking for pa_stream_get_state... no
83+
# configure: error: Unable to link function pa_stream_get_state
84+
# make[2]: *** [Makefile:104: /tmp/openwrt_packages/openwrt-sdk-Linux-x86_64/build_dir/target-aarch64_generic_musl/owntone-pulseaudio/owntone-28.8/.configured_a17fb5ef857664f03cd0ce37cc5ea591] Error 1
85+
# make[2]: Leaving directory '/mnt/share_openwrt/packages.git/sound/owntone'
86+
# time: package/feeds/packages/owntone/pulseaudio/compile#33.12#7.55#41.62
87+
# ERROR: package/feeds/packages/owntone failed to build (build variant: pulseaudio).
88+
# make[1]: *** [package/Makefile:131: package/feeds/packages/owntone/compile] Error 1
89+
90+
#
91+
CONFIGURE_ARGS+= --with-pulseaudio
92+
else
93+
CONFIGURE_ARGS+= --without-pulseaudio
94+
endif
5895

5996
TARGET_CFLAGS += $(FPIC)
6097

61-
define Package/owntone/install
98+
define Package/owntone/default/install
6299
$(INSTALL_DIR) $(1)/usr/sbin
63100
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/owntone $(1)/usr/sbin/
64101
$(INSTALL_DIR) $(1)/etc
@@ -70,5 +107,8 @@ define Package/owntone/install
70107
$(INSTALL_DIR) $(1)/usr/share/owntone
71108
$(CP) $(PKG_INSTALL_DIR)/usr/share/owntone/htdocs $(1)/usr/share/owntone
72109
endef
110+
Package/owntone/install = $(Package/owntone/default/install)
111+
Package/owntone-pulseaudio/install = $(Package/owntone/default/install)
73112

74113
$(eval $(call BuildPackage,owntone))
114+
$(eval $(call BuildPackage,owntone-pulseaudio))

0 commit comments

Comments
 (0)