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.2
  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:=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. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. include $(INCLUDE_DIR)/meson.mk
  23. define Package/pulseaudio/Default
  24. SECTION:=sound
  25. CATEGORY:=Sound
  26. DEPENDS:=+libsndfile +libltdl +libpthread +librt +alsa-lib \
  27. +libopenssl +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
  28. TITLE:=Network sound server
  29. URL:=https://www.pulseaudio.org
  30. PROVIDES:=pulseaudio
  31. USERID:=pulse=51:pulse=51
  32. endef
  33. define Package/pulseaudio-daemon
  34. $(call Package/pulseaudio/Default)
  35. VARIANT:=noavahi
  36. endef
  37. define Package/pulseaudio-daemon-avahi
  38. $(call Package/pulseaudio/Default)
  39. DEPENDS+=+dbus +libavahi-client +sbc
  40. TITLE+= (avahi/bluez)
  41. VARIANT:=avahi
  42. endef
  43. define Package/pulseaudio/Default/description
  44. PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
  45. endef
  46. define Package/pulseaudio-daemon/description
  47. $(call Package/pulseaudio/Default/description)
  48. endef
  49. define Package/pulseaudio-daemon-avahi/description
  50. $(call Package/pulseaudio/Default/description)
  51. This package enables avahi,bluez and is compiled against dbus, sbc, and avahi.
  52. endef
  53. define Package/pulseaudio-daemon/conffiles
  54. /etc/pulse/client.conf
  55. /etc/pulse/daemon.conf
  56. /etc/pulse/default.pa
  57. /etc/pulse/system.pa
  58. endef
  59. define Package/pulseaudio-daemon-avahi/conffiles
  60. /etc/pulse/client.conf
  61. /etc/pulse/daemon.conf
  62. /etc/pulse/default.pa
  63. /etc/pulse/system.pa
  64. endef
  65. define Package/pulseaudio-tools
  66. SECTION:=sound
  67. CATEGORY:=Sound
  68. DEPENDS:=+libsndfile pulseaudio
  69. TITLE:=Tools for Pulseaudio
  70. URL:=http://www.pulseaudio.org
  71. VARIANT:=noavahi
  72. endef
  73. define Package/pulseaudio-profiles
  74. SECTION:=sound
  75. CATEGORY:=Sound
  76. DEPENDS:=pulseaudio
  77. TITLE:=Profiles for Pulseaudio
  78. URL:=http://www.pulseaudio.org
  79. endef
  80. MESON_ARGS += \
  81. -Db_lto=true \
  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. -Dstream-restore-clear-old-devices=true \
  91. -Drunning-from-build-tree=false \
  92. -Datomic-arm-linux-helpers=false \
  93. -Datomic-arm-memory-barrier=false \
  94. -Dalsa=enabled \
  95. -Dasyncns=disabled \
  96. -Dbluez5-native-headset=false \
  97. -Dbluez5-ofono-headset=false \
  98. -Dfftw=disabled \
  99. -Dglib=disabled \
  100. -Dgsettings=disabled \
  101. -Dgstreamer=disabled \
  102. -Dgtk=disabled \
  103. -Dhal-compat=false \
  104. -Dipv6=true \
  105. -Djack=disabled \
  106. -Dlirc=disabled \
  107. -Dopenssl=enabled \
  108. -Dorc=disabled \
  109. -Dsamplerate=disabled \
  110. -Dsoxr=disabled \
  111. -Dspeex=disabled \
  112. -Dsystemd=disabled \
  113. -Dudev=disabled \
  114. -Dx11=disabled \
  115. -Dadrian-aec=true \
  116. -Dwebrtc-aec=disabled
  117. ifeq ($(BUILD_VARIANT),avahi)
  118. MESON_ARGS += \
  119. -Davahi=enabled \
  120. -Dbluez5=true \
  121. -Ddbus=enabled
  122. endif
  123. ifeq ($(BUILD_VARIANT),noavahi)
  124. MESON_ARGS += \
  125. -Davahi=disabled \
  126. -Dbluez5=false \
  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))