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.

287 lines
6.6 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:=13.0
  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:=961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057
  14. PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=GPL LICENSE
  17. PKG_CPE_ID:=cpe:/a:pulseaudio:pulseaudio
  18. PKG_INSTALL:=1
  19. PKG_USE_MIPS16:=0
  20. PKG_BUILD_DEPENDS:=meson/host
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. include ../../devel/meson/meson.mk
  24. define Package/pulseaudio/Default
  25. SECTION:=sound
  26. CATEGORY:=Sound
  27. DEPENDS:=+libsndfile +libltdl +libpthread +librt +alsa-lib \
  28. +libopenssl +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
  29. TITLE:=Network sound server
  30. URL:=https://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. TITLE+= (avahi/bluez)
  42. VARIANT:=avahi
  43. endef
  44. define Package/pulseaudio/Default/description
  45. PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
  46. endef
  47. define Package/pulseaudio-daemon/description
  48. $(call Package/pulseaudio/Default/description)
  49. endef
  50. define Package/pulseaudio-daemon-avahi/description
  51. $(call Package/pulseaudio/Default/description)
  52. This package enables avahi,bluez and is compiled against dbus, sbc, and avahi.
  53. endef
  54. define Package/pulseaudio-daemon/conffiles
  55. /etc/pulse/client.conf
  56. /etc/pulse/daemon.conf
  57. /etc/pulse/default.pa
  58. /etc/pulse/system.pa
  59. endef
  60. define Package/pulseaudio-daemon-avahi/conffiles
  61. /etc/pulse/client.conf
  62. /etc/pulse/daemon.conf
  63. /etc/pulse/default.pa
  64. /etc/pulse/system.pa
  65. endef
  66. define Package/pulseaudio-tools
  67. SECTION:=sound
  68. CATEGORY:=Sound
  69. DEPENDS:=+libsndfile pulseaudio
  70. TITLE:=Tools for Pulseaudio
  71. URL:=http://www.pulseaudio.org
  72. VARIANT:=noavahi
  73. endef
  74. define Package/pulseaudio-profiles
  75. SECTION:=sound
  76. CATEGORY:=Sound
  77. DEPENDS:=pulseaudio
  78. TITLE:=Profiles for Pulseaudio
  79. URL:=http://www.pulseaudio.org
  80. endef
  81. MESON_ARGS += \
  82. -Dgcov=false \
  83. -Dman=false \
  84. -Dtests=false \
  85. -Dsystem_user=pulse \
  86. -Dsystem_group=pulse \
  87. -Daccess_group=audio \
  88. -Ddatabase=simple \
  89. -Dlegacy-database-entry-format=false \
  90. -Drunning-from-build-tree=false \
  91. -Datomic-arm-linux-helpers=false \
  92. -Dalsa=enabled \
  93. -Dasyncns=disabled \
  94. -Dbluez5=false \
  95. -Dbluez5-native-headset=false \
  96. -Dbluez5-ofono-headset=false \
  97. -Dfftw=disabled \
  98. -Dglib=disabled \
  99. -Dgsettings=disabled \
  100. -Dgtk=disabled \
  101. -Dhal-compat=false \
  102. -Dipv6=true \
  103. -Djack=disabled \
  104. -Dlirc=disabled \
  105. -Dopenssl=enabled \
  106. -Dorc=disabled \
  107. -Dsamplerate=disabled \
  108. -Dsoxr=disabled \
  109. -Dspeex=disabled \
  110. -Dsystemd=disabled \
  111. -Dudev=disabled \
  112. -Dx11=disabled \
  113. -Dadrian-aec=true \
  114. -Dwebrtc-aec=disabled
  115. ifeq ($(BUILD_VARIANT),avahi)
  116. MESON_ARGS += \
  117. -Davahi=enabled \
  118. -Ddbus=enabled
  119. endif
  120. ifeq ($(BUILD_VARIANT),noavahi)
  121. MESON_ARGS += \
  122. -Davahi=disabled \
  123. -Ddbus=disabled
  124. endif
  125. TARGET_LDFLAGS += -liconv
  126. define Build/InstallDev
  127. $(INSTALL_DIR) \
  128. $(1)/usr/lib/pkgconfig \
  129. $(1)/usr/include/pulse \
  130. $(1)/usr/lib \
  131. $(1)/usr/lib/pulseaudio
  132. $(CP) \
  133. $(PKG_INSTALL_DIR)/usr/include/pulse/* \
  134. $(1)/usr/include/pulse
  135. $(CP) \
  136. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  137. $(1)/usr/lib/pkgconfig
  138. $(SED) \
  139. 's,/usr/include,$$$${prefix}/include,g' \
  140. $(1)/usr/lib/pkgconfig/libpulse.pc
  141. $(SED) \
  142. 's,/usr/lib,$$$${exec_prefix}/lib,g' \
  143. $(1)/usr/lib/pkgconfig/libpulse.pc
  144. $(SED) \
  145. 's,/usr/include,$$$${prefix}/include,g' \
  146. $(1)/usr/lib/pkgconfig/libpulse-simple.pc
  147. $(SED) \
  148. 's,/usr/lib,$$$${exec_prefix}/lib,g' \
  149. $(1)/usr/lib/pkgconfig/libpulse-simple.pc
  150. $(CP) \
  151. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  152. $(1)/usr/lib/
  153. $(CP) \
  154. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  155. $(1)/usr/lib/pulseaudio/
  156. endef
  157. define Package/pulseaudio-daemon/install
  158. $(INSTALL_DIR) \
  159. $(1)/etc/pulse \
  160. $(1)/etc/init.d \
  161. $(1)/usr/bin \
  162. $(1)/usr/lib \
  163. $(1)/usr/lib/pulseaudio \
  164. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
  165. $(INSTALL_BIN) \
  166. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  167. $(1)/usr/bin/pulseaudio
  168. $(INSTALL_BIN) \
  169. ./files/pulseaudio.init \
  170. $(1)/etc/init.d/pulseaudio
  171. $(INSTALL_DATA) \
  172. $(PKG_INSTALL_DIR)/etc/pulse/* \
  173. $(1)/etc/pulse
  174. $(CP) \
  175. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  176. $(1)/usr/lib/
  177. $(CP) \
  178. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  179. $(1)/usr/lib/pulseaudio/
  180. $(CP) \
  181. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  182. $(1)/usr/lib/
  183. $(CP) \
  184. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  185. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  186. endef
  187. define Package/pulseaudio-daemon-avahi/install
  188. $(INSTALL_DIR) \
  189. $(1)/etc/pulse \
  190. $(1)/etc/init.d \
  191. $(1)/usr/bin \
  192. $(1)/usr/lib \
  193. $(1)/usr/lib/pulseaudio \
  194. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
  195. $(1)/etc/dbus-1/system.d
  196. $(INSTALL_BIN) \
  197. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  198. $(1)/usr/bin/pulseaudio
  199. $(INSTALL_BIN) \
  200. ./files/pulseaudio.init \
  201. $(1)/etc/init.d/pulseaudio
  202. $(INSTALL_DATA) \
  203. $(PKG_INSTALL_DIR)/etc/pulse/* \
  204. $(1)/etc/pulse
  205. $(CP) \
  206. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  207. $(1)/usr/lib/
  208. $(CP) \
  209. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  210. $(1)/usr/lib/pulseaudio/
  211. $(CP) \
  212. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  213. $(1)/usr/lib/
  214. $(CP) \
  215. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  216. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  217. $(INSTALL_DATA) \
  218. $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
  219. $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  220. endef
  221. define Package/pulseaudio-tools/install
  222. $(INSTALL_DIR) \
  223. $(1)/usr/bin
  224. $(INSTALL_BIN) \
  225. $(PKG_INSTALL_DIR)/usr/bin/pa* \
  226. $(1)/usr/bin/
  227. endef
  228. define Package/pulseaudio-profiles/install
  229. $(INSTALL_DIR) \
  230. $(1)/usr/share/pulseaudio/alsa-mixer/paths \
  231. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  232. $(INSTALL_DATA) \
  233. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
  234. $(1)/usr/share/pulseaudio/alsa-mixer/paths
  235. $(INSTALL_DATA) \
  236. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
  237. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  238. endef
  239. $(eval $(call BuildPackage,pulseaudio-daemon))
  240. $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
  241. $(eval $(call BuildPackage,pulseaudio-tools))
  242. $(eval $(call BuildPackage,pulseaudio-profiles))