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.

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