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.

301 lines
7.0 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:=14.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:=75d3f7742c1ae449049a4c88900e454b8b350ecaa8c544f3488a2562a9ff66f1
  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. -Db_lto=true \
  83. -Dgcov=false \
  84. -Dman=false \
  85. -Dtests=false \
  86. -Dsystem_user=pulse \
  87. -Dsystem_group=pulse \
  88. -Daccess_group=audio \
  89. -Ddatabase=simple \
  90. -Dlegacy-database-entry-format=false \
  91. -Dstream-restore-clear-old-devices=true \
  92. -Drunning-from-build-tree=false \
  93. -Datomic-arm-linux-helpers=false \
  94. -Datomic-arm-memory-barrier=false \
  95. -Dalsa=enabled \
  96. -Dasyncns=disabled \
  97. -Dbluez5-native-headset=false \
  98. -Dbluez5-ofono-headset=false \
  99. -Dfftw=disabled \
  100. -Dglib=disabled \
  101. -Dgsettings=disabled \
  102. -Dgstreamer=disabled \
  103. -Dgtk=disabled \
  104. -Dhal-compat=false \
  105. -Dipv6=true \
  106. -Djack=disabled \
  107. -Dlirc=disabled \
  108. -Dopenssl=enabled \
  109. -Dorc=disabled \
  110. -Dsamplerate=disabled \
  111. -Dsoxr=disabled \
  112. -Dspeex=disabled \
  113. -Dsystemd=disabled \
  114. -Dudev=disabled \
  115. -Dx11=disabled \
  116. -Dadrian-aec=true \
  117. -Dwebrtc-aec=disabled
  118. ifeq ($(BUILD_VARIANT),avahi)
  119. MESON_ARGS += \
  120. -Davahi=enabled \
  121. -Dbluez5=true \
  122. -Ddbus=enabled
  123. endif
  124. ifeq ($(BUILD_VARIANT),noavahi)
  125. MESON_ARGS += \
  126. -Davahi=disabled \
  127. -Dbluez5=false \
  128. -Ddbus=disabled
  129. endif
  130. TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
  131. define Build/Prepare
  132. $(call Build/Prepare/Default)
  133. ifneq ($(findstring arm,$(CONFIG_ARCH)),)
  134. ifeq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
  135. $(SED) '/remap_neon\.c/d' $(PKG_BUILD_DIR)/src/pulsecore/meson.build
  136. endif
  137. endif
  138. endef
  139. define Build/InstallDev
  140. $(INSTALL_DIR) \
  141. $(1)/usr/lib/pkgconfig \
  142. $(1)/usr/include/pulse \
  143. $(1)/usr/lib \
  144. $(1)/usr/lib/pulseaudio
  145. $(CP) \
  146. $(PKG_INSTALL_DIR)/usr/include/pulse/* \
  147. $(1)/usr/include/pulse
  148. $(CP) \
  149. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  150. $(1)/usr/lib/pkgconfig
  151. $(SED) \
  152. 's,/usr/include,$$$${prefix}/include,g' \
  153. $(1)/usr/lib/pkgconfig/libpulse.pc
  154. $(SED) \
  155. 's,/usr/lib,$$$${exec_prefix}/lib,g' \
  156. $(1)/usr/lib/pkgconfig/libpulse.pc
  157. $(SED) \
  158. 's,/usr/include,$$$${prefix}/include,g' \
  159. $(1)/usr/lib/pkgconfig/libpulse-simple.pc
  160. $(SED) \
  161. 's,/usr/lib,$$$${exec_prefix}/lib,g' \
  162. $(1)/usr/lib/pkgconfig/libpulse-simple.pc
  163. $(CP) \
  164. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  165. $(1)/usr/lib/
  166. $(CP) \
  167. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  168. $(1)/usr/lib/pulseaudio/
  169. endef
  170. define Package/pulseaudio-daemon/install
  171. $(INSTALL_DIR) \
  172. $(1)/etc/pulse \
  173. $(1)/etc/init.d \
  174. $(1)/usr/bin \
  175. $(1)/usr/lib \
  176. $(1)/usr/lib/pulseaudio \
  177. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
  178. $(INSTALL_BIN) \
  179. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  180. $(1)/usr/bin/pulseaudio
  181. $(INSTALL_BIN) \
  182. ./files/pulseaudio.init \
  183. $(1)/etc/init.d/pulseaudio
  184. $(INSTALL_DATA) \
  185. $(PKG_INSTALL_DIR)/etc/pulse/* \
  186. $(1)/etc/pulse
  187. $(CP) \
  188. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  189. $(1)/usr/lib/
  190. $(CP) \
  191. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  192. $(1)/usr/lib/pulseaudio/
  193. $(CP) \
  194. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  195. $(1)/usr/lib/
  196. $(CP) \
  197. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  198. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  199. endef
  200. define Package/pulseaudio-daemon-avahi/install
  201. $(INSTALL_DIR) \
  202. $(1)/etc/pulse \
  203. $(1)/etc/init.d \
  204. $(1)/usr/bin \
  205. $(1)/usr/lib \
  206. $(1)/usr/lib/pulseaudio \
  207. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
  208. $(1)/etc/dbus-1/system.d
  209. $(INSTALL_BIN) \
  210. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  211. $(1)/usr/bin/pulseaudio
  212. $(INSTALL_BIN) \
  213. ./files/pulseaudio.init \
  214. $(1)/etc/init.d/pulseaudio
  215. $(INSTALL_DATA) \
  216. $(PKG_INSTALL_DIR)/etc/pulse/* \
  217. $(1)/etc/pulse
  218. $(CP) \
  219. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  220. $(1)/usr/lib/
  221. $(CP) \
  222. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  223. $(1)/usr/lib/pulseaudio/
  224. $(CP) \
  225. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  226. $(1)/usr/lib/
  227. $(CP) \
  228. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  229. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  230. $(INSTALL_DATA) \
  231. $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
  232. $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  233. endef
  234. define Package/pulseaudio-tools/install
  235. $(INSTALL_DIR) \
  236. $(1)/usr/bin
  237. $(INSTALL_BIN) \
  238. $(PKG_INSTALL_DIR)/usr/bin/pa* \
  239. $(1)/usr/bin/
  240. endef
  241. define Package/pulseaudio-profiles/install
  242. $(INSTALL_DIR) \
  243. $(1)/usr/share/pulseaudio/alsa-mixer/paths \
  244. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  245. $(INSTALL_DATA) \
  246. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
  247. $(1)/usr/share/pulseaudio/alsa-mixer/paths
  248. $(INSTALL_DATA) \
  249. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
  250. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  251. endef
  252. $(eval $(call BuildPackage,pulseaudio-daemon))
  253. $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
  254. $(eval $(call BuildPackage,pulseaudio-tools))
  255. $(eval $(call BuildPackage,pulseaudio-profiles))