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.

274 lines
6.3 KiB

  1. #
  2. # Copyright (C) 2011-2016 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:=11.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases/
  13. PKG_HASH:=f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e
  14. PKG_LICENSE:=LGPL-2.1+
  15. PKG_LICENSE_FILES:=GPL LICENSE
  16. PKG_BUILD_DEPENDS:=intltool/host
  17. PKG_FIXUP:=autoreconf
  18. PKG_USE_MIPS16:=0
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_INSTALL = 1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/pulseaudio/Default
  24. SECTION:=sound
  25. CATEGORY:=Sound
  26. DEPENDS:=+libsndfile +libltdl +libpthread +librt +alsa-lib \
  27. +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
  28. TITLE:=Network sound server
  29. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  30. URL:=http://www.pulseaudio.org
  31. PROVIDES:=pulseaudio
  32. USERID:=pulse=51:pulse=51
  33. endef
  34. define Package/pulseaudio-daemon
  35. $(call Package/pulseaudio/Default)
  36. VARIANT:=noavahi
  37. endef
  38. define Package/pulseaudio-daemon-avahi
  39. $(call Package/pulseaudio/Default)
  40. DEPENDS+=+dbus +libavahi-client +sbc
  41. # DEPENDS+=+avahi-daemon
  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. # --disable-bluez
  108. ifeq ($(BUILD_VARIANT),avahi)
  109. CONFIGURE_ARGS += \
  110. --enable-avahi \
  111. --enable-dbus
  112. endif
  113. ifeq ($(BUILD_VARIANT),noavahi)
  114. CONFIGURE_ARGS += \
  115. --disable-avahi \
  116. --disable-dbus
  117. endif
  118. CONFIGURE_VARS += \
  119. PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
  120. #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
  121. TARGET_CFLAGS += -std=gnu99
  122. define Build/InstallDev
  123. $(INSTALL_DIR) \
  124. $(1)/usr/lib/pkgconfig \
  125. $(1)/usr/include/pulse \
  126. $(1)/usr/lib \
  127. $(1)/usr/lib/pulseaudio
  128. $(CP) \
  129. $(PKG_INSTALL_DIR)/usr/include/pulse/* \
  130. $(1)/usr/include/pulse
  131. $(CP) \
  132. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  133. $(1)/usr/lib/pkgconfig
  134. $(CP) \
  135. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  136. $(1)/usr/lib/
  137. $(CP) \
  138. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  139. $(1)/usr/lib/pulseaudio/
  140. endef
  141. define Package/pulseaudio-daemon/install
  142. $(INSTALL_DIR) \
  143. $(1)/etc/pulse \
  144. $(1)/etc/init.d \
  145. $(1)/usr/bin \
  146. $(1)/usr/lib \
  147. $(1)/usr/lib/pulseaudio \
  148. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
  149. $(INSTALL_BIN) \
  150. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  151. $(1)/usr/bin/pulseaudio
  152. $(INSTALL_BIN) \
  153. ./files/pulseaudio.init \
  154. $(1)/etc/init.d/pulseaudio
  155. $(INSTALL_DATA) \
  156. $(PKG_INSTALL_DIR)/etc/pulse/* \
  157. $(1)/etc/pulse
  158. $(CP) \
  159. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  160. $(1)/usr/lib/
  161. $(CP) \
  162. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  163. $(1)/usr/lib/pulseaudio/
  164. $(CP) \
  165. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  166. $(1)/usr/lib/
  167. $(CP) \
  168. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  169. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  170. endef
  171. define Package/pulseaudio-daemon-avahi/install
  172. $(INSTALL_DIR) \
  173. $(1)/etc/pulse \
  174. $(1)/etc/init.d \
  175. $(1)/usr/bin \
  176. $(1)/usr/lib \
  177. $(1)/usr/lib/pulseaudio \
  178. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
  179. $(1)/etc/dbus-1/system.d
  180. $(INSTALL_BIN) \
  181. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  182. $(1)/usr/bin/pulseaudio
  183. $(INSTALL_BIN) \
  184. ./files/pulseaudio.init \
  185. $(1)/etc/init.d/pulseaudio
  186. $(INSTALL_DATA) \
  187. $(PKG_INSTALL_DIR)/etc/pulse/* \
  188. $(1)/etc/pulse
  189. $(CP) \
  190. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  191. $(1)/usr/lib/
  192. $(CP) \
  193. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  194. $(1)/usr/lib/pulseaudio/
  195. $(CP) \
  196. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  197. $(1)/usr/lib/
  198. $(CP) \
  199. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  200. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  201. $(INSTALL_DATA) \
  202. $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
  203. $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  204. endef
  205. define Package/pulseaudio-tools/install
  206. $(INSTALL_DIR) \
  207. $(1)/usr/bin
  208. $(INSTALL_BIN) \
  209. $(PKG_INSTALL_DIR)/usr/bin/pa* \
  210. $(1)/usr/bin/
  211. endef
  212. define Package/pulseaudio-profiles/install
  213. $(INSTALL_DIR) \
  214. $(1)/usr/share/pulseaudio/alsa-mixer/paths \
  215. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  216. $(INSTALL_DATA) \
  217. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
  218. $(1)/usr/share/pulseaudio/alsa-mixer/paths
  219. $(INSTALL_DATA) \
  220. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
  221. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  222. endef
  223. $(eval $(call BuildPackage,pulseaudio-daemon))
  224. $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
  225. $(eval $(call BuildPackage,pulseaudio-tools))
  226. $(eval $(call BuildPackage,pulseaudio-profiles))