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.

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