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.

270 lines
6.3 KiB

  1. #
  2. # Copyright (C) 2011 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:=5.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
  13. PKG_MD5SUM:=c43749838612f4860465e83ed62ca38e
  14. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_BUILD_DEPENDS:=intltool/host
  16. PKG_FIXUP:=autoreconf
  17. PKG_USE_MIPS16:=0
  18. PKG_INSTALL = 1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. #TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into)
  22. define Package/pulseaudio/Default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
  26. +librt +alsa-lib +libjson +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
  27. TITLE:=Network sound server
  28. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  29. URL:=http://www.pulseaudio.org
  30. PROVIDES:=pulseaudio
  31. endef
  32. define Package/pulseaudio-daemon
  33. $(call Package/pulseaudio/Default)
  34. VARIANT:=noavahi
  35. endef
  36. define Package/pulseaudio-daemon-avahi
  37. $(call Package/pulseaudio/Default)
  38. DEPENDS+=+dbus +libavahi-client +avahi-daemon
  39. TITLE+= (avahi)
  40. VARIANT:=avahi
  41. endef
  42. define Package/pulseaudio/Default/description
  43. PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
  44. endef
  45. define Package/pulseaudio-daemon/description
  46. $(call Package/pulseaudio/Default/description)
  47. endef
  48. define Package/pulseaudio-daemon-avahi/description
  49. $(call Package/pulseaudio/Default/description)
  50. This package is compiled against dbus and avahi.
  51. endef
  52. define Package/pulseaudio-daemon/conffiles
  53. /etc/pulse/client.conf
  54. /etc/pulse/daemon.conf
  55. /etc/pulse/default.pa
  56. /etc/pulse/system.pa
  57. endef
  58. define Package/pulseaudio-daemon-avahi/conffiles
  59. /etc/pulse/client.conf
  60. /etc/pulse/daemon.conf
  61. /etc/pulse/default.pa
  62. /etc/pulse/system.pa
  63. endef
  64. define Package/pulseaudio-tools
  65. SECTION:=sound
  66. CATEGORY:=Sound
  67. DEPENDS:=+libsndfile pulseaudio
  68. TITLE:=Tools for Pulseaudio
  69. URL:=http://www.pulseaudio.org
  70. VARIANT:=noavahi
  71. endef
  72. define Package/pulseaudio-profiles
  73. SECTION:=sound
  74. CATEGORY:=Sound
  75. DEPENDS:=pulseaudio
  76. TITLE:=Profiles for Pulseaudio
  77. URL:=http://www.pulseaudio.org
  78. endef
  79. CONFIGURE_ARGS += \
  80. --with-system-user=pulse \
  81. --with-system-group=pulse \
  82. --with-access-group=audio \
  83. --with-database=simple \
  84. --enable-alsa \
  85. --disable-hal \
  86. --disable-gconf \
  87. --disable-nls \
  88. --disable-manpages \
  89. --enable-oss-output \
  90. --disable-oss-wrapper \
  91. --disable-samplerate \
  92. --disable-per-user-esound-socket \
  93. --disable-solaris \
  94. --disable-gtk2 \
  95. --disable-glib2 \
  96. --disable-jack \
  97. --disable-asyncns \
  98. --disable-lirc \
  99. --disable-bluez \
  100. --disable-udev \
  101. --without-fftw
  102. ifeq ($(BUILD_VARIANT),avahi)
  103. CONFIGURE_ARGS += \
  104. --enable-avahi \
  105. --enable-dbus
  106. endif
  107. ifeq ($(BUILD_VARIANT),noavahi)
  108. CONFIGURE_ARGS += \
  109. --disable-avahi \
  110. --disable-dbus
  111. endif
  112. CONFIGURE_VARS += \
  113. PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
  114. #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
  115. TARGET_CFLAGS += -std=gnu99
  116. define Build/InstallDev
  117. $(INSTALL_DIR) \
  118. $(1)/usr/lib/pkgconfig \
  119. $(1)/usr/include/pulse \
  120. $(1)/usr/lib \
  121. $(1)/usr/lib/pulseaudio
  122. $(CP) \
  123. $(PKG_INSTALL_DIR)/usr/include/pulse/* \
  124. $(1)/usr/include/pulse
  125. $(CP) \
  126. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  127. $(1)/usr/lib/pkgconfig
  128. $(CP) \
  129. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  130. $(1)/usr/lib/
  131. $(CP) \
  132. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  133. $(1)/usr/lib/pulseaudio/
  134. endef
  135. define Package/pulseaudio-daemon/install
  136. $(INSTALL_DIR) \
  137. $(1)/etc/pulse \
  138. $(1)/etc/init.d \
  139. $(1)/usr/bin \
  140. $(1)/usr/lib \
  141. $(1)/usr/lib/pulseaudio \
  142. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
  143. $(INSTALL_BIN) \
  144. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  145. $(1)/usr/bin/pulseaudio
  146. $(INSTALL_BIN) \
  147. ./files/pulseaudio.init \
  148. $(1)/etc/init.d/pulseaudio
  149. $(INSTALL_CONF) \
  150. $(PKG_INSTALL_DIR)/etc/pulse/* \
  151. $(1)/etc/pulse
  152. $(CP) \
  153. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  154. $(1)/usr/lib/
  155. $(CP) \
  156. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  157. $(1)/usr/lib/pulseaudio/
  158. $(CP) \
  159. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  160. $(1)/usr/lib/
  161. $(CP) \
  162. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  163. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  164. chmod -R 0644 $(1)/etc/pulse/*
  165. endef
  166. define Package/pulseaudio-daemon-avahi/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. $(1)/etc/dbus-1/system.d
  175. $(INSTALL_BIN) \
  176. $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
  177. $(1)/usr/bin/pulseaudio
  178. $(INSTALL_BIN) \
  179. ./files/pulseaudio.init \
  180. $(1)/etc/init.d/pulseaudio
  181. $(INSTALL_CONF) \
  182. $(PKG_INSTALL_DIR)/etc/pulse/* \
  183. $(1)/etc/pulse
  184. $(CP) \
  185. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  186. $(1)/usr/lib/
  187. $(CP) \
  188. $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
  189. $(1)/usr/lib/pulseaudio/
  190. $(CP) \
  191. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
  192. $(1)/usr/lib/
  193. $(CP) \
  194. $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
  195. $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
  196. $(INSTALL_CONF) \
  197. $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/pulseaudio-system.conf \
  198. $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  199. chmod -R 0644 $(1)/etc/pulse/* $(1)/etc/dbus-1/system.d/pulseaudio-system.conf
  200. endef
  201. define Package/pulseaudio-tools/install
  202. $(INSTALL_DIR) \
  203. $(1)/usr/bin
  204. $(INSTALL_BIN) \
  205. $(PKG_INSTALL_DIR)/usr/bin/pa* \
  206. $(1)/usr/bin/
  207. endef
  208. define Package/pulseaudio-profiles/install
  209. $(INSTALL_DIR) \
  210. $(1)/usr/share/pulseaudio/alsa-mixer/paths \
  211. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  212. $(INSTALL_CONF) \
  213. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
  214. $(1)/usr/share/pulseaudio/alsa-mixer/paths
  215. $(INSTALL_CONF) \
  216. $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
  217. $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
  218. endef
  219. $(eval $(call BuildPackage,pulseaudio-daemon))
  220. $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
  221. $(eval $(call BuildPackage,pulseaudio-tools))
  222. $(eval $(call BuildPackage,pulseaudio-profiles))