You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
6.2 KiB

  1. #
  2. # Copyright (C) 2011-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pulseaudio
  9. PKG_VERSION:=12.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
  13. PKG_HASH:=809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055
  14. PKG_LICENSE:=LGPL-2.1+
  15. PKG_LICENSE_FILES:=GPL LICENSE
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=intltool/host
  18. PKG_FIXUP:=autoreconf
  19. PKG_USE_MIPS16:=0
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  21. PKG_INSTALL = 1
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/pulseaudio/Default
  25. SECTION:=sound
  26. CATEGORY:=Sound
  27. DEPENDS:=+libsndfile +libltdl +libpthread +librt +alsa-lib \
  28. +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
  29. TITLE:=Network sound server
  30. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  31. URL:=http://www.pulseaudio.org
  32. PROVIDES:=pulseaudio
  33. USERID:=pulse=51:pulse=51
  34. endef
  35. define Package/pulseaudio-daemon
  36. $(call Package/pulseaudio/Default)
  37. VARIANT:=noavahi
  38. endef
  39. define Package/pulseaudio-daemon-avahi
  40. $(call Package/pulseaudio/Default)
  41. DEPENDS+=+dbus +libavahi-client +sbc
  42. TITLE+= (avahi/bluez)
  43. VARIANT:=avahi
  44. endef
  45. define Package/pulseaudio/Default/description
  46. PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
  47. endef
  48. define Package/pulseaudio-daemon/description
  49. $(call Package/pulseaudio/Default/description)
  50. endef
  51. define Package/pulseaudio-daemon-avahi/description
  52. $(call Package/pulseaudio/Default/description)
  53. This package enables avahi,bluez and is compiled against dbus, sbc, and avahi.
  54. endef
  55. define Package/pulseaudio-daemon/conffiles
  56. /etc/pulse/client.conf
  57. /etc/pulse/daemon.conf
  58. /etc/pulse/default.pa
  59. /etc/pulse/system.pa
  60. endef
  61. define Package/pulseaudio-daemon-avahi/conffiles
  62. /etc/pulse/client.conf
  63. /etc/pulse/daemon.conf
  64. /etc/pulse/default.pa
  65. /etc/pulse/system.pa
  66. endef
  67. define Package/pulseaudio-tools
  68. SECTION:=sound
  69. CATEGORY:=Sound
  70. DEPENDS:=+libsndfile +pulseaudio
  71. TITLE:=Tools for Pulseaudio
  72. URL:=http://www.pulseaudio.org
  73. VARIANT:=noavahi
  74. endef
  75. define Package/pulseaudio-profiles
  76. SECTION:=sound
  77. CATEGORY:=Sound
  78. DEPENDS:=+pulseaudio
  79. TITLE:=Profiles for Pulseaudio
  80. URL:=http://www.pulseaudio.org
  81. endef
  82. CONFIGURE_ARGS += \
  83. $(if $(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),--enable-neon-opt,--disable-neon-opt) \
  84. --with-system-user=pulse \
  85. --with-system-group=pulse \
  86. --with-access-group=audio \
  87. --with-database=simple \
  88. --enable-alsa \
  89. --disable-hal \
  90. --disable-gconf \
  91. --disable-nls \
  92. --disable-manpages \
  93. --enable-oss-output \
  94. --disable-oss-wrapper \
  95. --disable-samplerate \
  96. --disable-per-user-esound-socket \
  97. --disable-solaris \
  98. --disable-gtk2 \
  99. --disable-glib2 \
  100. --disable-jack \
  101. --disable-asyncns \
  102. --disable-lirc \
  103. --disable-udev \
  104. --without-fftw \
  105. --without-soxr \
  106. --without-speex
  107. ifeq ($(BUILD_VARIANT),avahi)
  108. CONFIGURE_ARGS += \
  109. --enable-avahi \
  110. --enable-dbus
  111. endif
  112. ifeq ($(BUILD_VARIANT),noavahi)
  113. CONFIGURE_ARGS += \
  114. --disable-avahi \
  115. --disable-dbus
  116. endif
  117. CONFIGURE_VARS += \
  118. PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
  119. define Build/InstallDev
  120. $(INSTALL_DIR) \
  121. $(1)/usr/lib/pkgconfig \
  122. $(1)/usr/include/pulse \
  123. $(1)/usr/lib \
  124. $(1)/usr/lib/pulseaudio
  125. $(CP) \
  126. $(PKG_INSTALL_DIR)/usr/include/pulse/* \
  127. $(1)/usr/include/pulse
  128. $(CP) \
  129. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  130. $(1)/usr/lib/pkgconfig
  131. $(CP) \
  132. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  133. $(1)/usr/lib/
  134. $(CP) \
  135. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  136. $(1)/usr/lib/pulseaudio/
  137. endef
  138. define Package/pulseaudio-daemon/install
  139. $(INSTALL_DIR) \
  140. $(1)/etc/pulse \
  141. $(1)/etc/init.d \
  142. $(1)/usr/bin \
  143. $(1)/usr/lib \
  144. $(1)/usr/lib/pulseaudio \
  145. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
  146. $(INSTALL_BIN) \
  147. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  148. $(1)/usr/bin/pulseaudio
  149. $(INSTALL_BIN) \
  150. ./files/pulseaudio.init \
  151. $(1)/etc/init.d/pulseaudio
  152. $(INSTALL_DATA) \
  153. $(PKG_INSTALL_DIR)/etc/pulse/* \
  154. $(1)/etc/pulse
  155. $(CP) \
  156. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  157. $(1)/usr/lib/
  158. $(CP) \
  159. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  160. $(1)/usr/lib/pulseaudio/
  161. $(CP) \
  162. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  163. $(1)/usr/lib/
  164. $(CP) \
  165. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  166. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  167. endef
  168. define Package/pulseaudio-daemon-avahi/install
  169. $(INSTALL_DIR) \
  170. $(1)/etc/pulse \
  171. $(1)/etc/init.d \
  172. $(1)/usr/bin \
  173. $(1)/usr/lib \
  174. $(1)/usr/lib/pulseaudio \
  175. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
  176. $(1)/etc/dbus-1/system.d
  177. $(INSTALL_BIN) \
  178. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  179. $(1)/usr/bin/pulseaudio
  180. $(INSTALL_BIN) \
  181. ./files/pulseaudio.init \
  182. $(1)/etc/init.d/pulseaudio
  183. $(INSTALL_DATA) \
  184. $(PKG_INSTALL_DIR)/etc/pulse/* \
  185. $(1)/etc/pulse
  186. $(CP) \
  187. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  188. $(1)/usr/lib/
  189. $(CP) \
  190. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  191. $(1)/usr/lib/pulseaudio/
  192. $(CP) \
  193. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  194. $(1)/usr/lib/
  195. $(CP) \
  196. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  197. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  198. $(INSTALL_DATA) \
  199. $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
  200. $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  201. endef
  202. define Package/pulseaudio-tools/install
  203. $(INSTALL_DIR) \
  204. $(1)/usr/bin
  205. $(INSTALL_BIN) \
  206. $(PKG_INSTALL_DIR)/usr/bin/pa* \
  207. $(1)/usr/bin/
  208. endef
  209. define Package/pulseaudio-profiles/install
  210. $(INSTALL_DIR) \
  211. $(1)/usr/share/pulseaudio/alsa-mixer/paths \
  212. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  213. $(INSTALL_DATA) \
  214. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
  215. $(1)/usr/share/pulseaudio/alsa-mixer/paths
  216. $(INSTALL_DATA) \
  217. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
  218. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  219. endef
  220. $(eval $(call BuildPackage,pulseaudio-daemon))
  221. $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
  222. $(eval $(call BuildPackage,pulseaudio-tools))
  223. $(eval $(call BuildPackage,pulseaudio-profiles))