@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
99
1010PKG_NAME: =owntone
1111PKG_VERSION: =28.8
12- PKG_RELEASE: =1
12+ PKG_RELEASE: =2
1313
1414PKG_SOURCE: =$(PKG_NAME ) -$(PKG_VERSION ) .tar.xz
1515PKG_SOURCE_URL: =https://github.com/owntone/owntone-server/releases/download/$(PKG_VERSION ) /
2323PKG_LICENSE: =GPL-2.0
2424PKG_LICENSE_FILES: =COPYING
2525
26+ PKG_CONFIG_DEPENDS: = \
27+ CONFIG_AUDIO_SUPPORT
28+
2629include $(INCLUDE_DIR ) /package.mk
2730include $(INCLUDE_DIR ) /nls.mk
2831
32+ define Package/owntone/default
33+ SECTION:=sound
34+ CATEGORY:=Sound
35+ TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
36+ URL:=https://github.com/owntone/owntone-server
37+ DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
38+ +libevent2 +libevent2-pthreads +libdaemon +confuse +alsa-lib +libffmpeg-full \
39+ +mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
40+ +libprotobuf-c +libgnutls +libsodium +libwebsockets +libuuid $(ICONV_DEPENDS )
41+ PROVIDES:=owntone
42+ endef
43+
2944define 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 )
45+ $(Package/owntone/default )
46+ TITLE+= (original)
47+ VARIANT:=original
48+ DEFAULT_VARIANT:=1
3849endef
3950
40- define Package/owntone/description
51+ define Package/owntone-pulseaudio
52+ $(Package/owntone/default )
53+ TITLE+= (with pulseaudio support)
54+ DEPENDS+= +AUDIO_SUPPORT:pulseaudio
55+ VARIANT:=pulseaudio
56+ CONFLICTS:=owntone
57+ endef
58+
59+ define Package/owntone/default/description
4160 OwnTone is a Linux/FreeBSD DAAP (iTunes), MPD (Music Player Daemon) and
4261 RSP (Roku) media server. It has support for AirPlay speakers, Chromecast,
4362 Apple Remote (and compatibles), MPD clients, Spotify, internet radio and
4463 LastFM. It does not support AirPlay/Chromecast video.
4564endef
65+ Package/owntone/description = $(Package/owntone/default/description )
66+ Package/owntone-pulseaudio/description = $(Package/owntone/default/description )
4667
47- define Package/owntone/conffiles
68+ define Package/owntone/default/ conffiles
4869/etc/owntone.conf
4970endef
71+ Package/owntone/conffiles = $(Package/owntone/default/conffiles )
72+ Package/owntone-pulseaudio/conffiles = $(Package/owntone/default/conffiles )
5073
5174CONFIGURE_ARGS += \
5275 --enable-chromecast \
5376 --disable-install_systemd \
5477 --disable-install_conf_file \
5578 --disable-install_user \
56- --with-alsa \
57- --without-pulseaudio
79+ --with-alsa
80+
81+ ifeq ($(BUILD_VARIANT ) ,pulseaudio)
82+ CONFIGURE_ARGS+ = --with-pulseaudio
83+ else
84+ CONFIGURE_ARGS+ = --without-pulseaudio
85+ endif
5886
5987TARGET_CFLAGS += $(FPIC )
6088
61- define Package/owntone/install
89+ ifeq ($(BUILD_VARIANT ) ,pulseaudio)
90+ ifeq ($(CONFIG_AUDIO_SUPPORT ) ,y)
91+ TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
92+ endif
93+ endif
94+
95+ define Package/owntone/default/install
6296 $(INSTALL_DIR ) $(1 ) /usr/sbin
6397 $(INSTALL_BIN ) $(PKG_INSTALL_DIR ) /usr/sbin/owntone $(1 ) /usr/sbin/
6498 $(INSTALL_DIR ) $(1 ) /etc
@@ -70,5 +104,8 @@ define Package/owntone/install
70104 $(INSTALL_DIR ) $(1 ) /usr/share/owntone
71105 $(CP ) $(PKG_INSTALL_DIR ) /usr/share/owntone/htdocs $(1 ) /usr/share/owntone
72106endef
107+ Package/owntone/install = $(Package/owntone/default/install )
108+ Package/owntone-pulseaudio/install = $(Package/owntone/default/install )
73109
74110$(eval $(call BuildPackage,owntone))
111+ $(eval $(call BuildPackage,owntone-pulseaudio))
0 commit comments