23a8c80d14821257c2ddc7918017a2203e070a6b
[feed/packages.git] / sound / pulseaudio / Makefile
1 #
2 # Copyright (C) 2011-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pulseaudio
11 PKG_VERSION:=6.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
16 PKG_MD5SUM:=b691e83b7434c678dffacfa3a027750e
17 PKG_LICENSE:=LGPL-2.1+
18 PKG_LICENSE_FILES:=GPL LICENSE
19
20 PKG_BUILD_DEPENDS:=intltool/host
21
22 PKG_FIXUP:=autoreconf
23 PKG_USE_MIPS16:=0
24
25 PKG_INSTALL = 1
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 #TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into)
31 define Package/pulseaudio/Default
32 SECTION:=sound
33 CATEGORY:=Sound
34 DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
35 +librt +alsa-lib +libjson +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
36 TITLE:=Network sound server
37 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
38 URL:=http://www.pulseaudio.org
39 PROVIDES:=pulseaudio
40 USERID:=pulse=51:pulse=51
41 endef
42
43 define Package/pulseaudio-daemon
44 $(call Package/pulseaudio/Default)
45 DEPENDS+=+libjson-c
46 endef
47
48 define Package/pulseaudio/Default/description
49 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
50 endef
51
52 define Package/pulseaudio-daemon/description
53 $(call Package/pulseaudio/Default/description)
54 endef
55
56 define Package/pulseaudio-daemon/conffiles
57 /etc/pulse/client.conf
58 /etc/pulse/daemon.conf
59 /etc/pulse/default.pa
60 /etc/pulse/system.pa
61 endef
62
63 define Package/pulseaudio-tools
64 SECTION:=sound
65 CATEGORY:=Sound
66 DEPENDS:=+libsndfile pulseaudio
67 TITLE:=Tools for Pulseaudio
68 URL:=http://www.pulseaudio.org
69 endef
70
71 define Package/pulseaudio-profiles
72 SECTION:=sound
73 CATEGORY:=Sound
74 DEPENDS:=pulseaudio
75 TITLE:=Profiles for Pulseaudio
76 URL:=http://www.pulseaudio.org
77 endef
78
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 --disable-avahi \
103 --disable-dbus
104
105 CONFIGURE_VARS += \
106 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
107
108 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
109 TARGET_CFLAGS += -std=gnu99
110
111 define Build/InstallDev
112 $(INSTALL_DIR) \
113 $(1)/usr/lib/pkgconfig \
114 $(1)/usr/include/pulse \
115 $(1)/usr/lib \
116 $(1)/usr/lib/pulseaudio
117 $(CP) \
118 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
119 $(1)/usr/include/pulse
120 $(CP) \
121 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
122 $(1)/usr/lib/pkgconfig
123 $(CP) \
124 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
125 $(1)/usr/lib/
126 $(CP) \
127 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
128 $(1)/usr/lib/pulseaudio/
129 endef
130
131 define Package/pulseaudio-daemon/install
132 $(INSTALL_DIR) \
133 $(1)/etc/pulse \
134 $(1)/etc/init.d \
135 $(1)/usr/bin \
136 $(1)/usr/lib \
137 $(1)/usr/lib/pulseaudio \
138 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
139
140 $(INSTALL_BIN) \
141 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
142 $(1)/usr/bin/pulseaudio
143
144 $(INSTALL_BIN) \
145 ./files/pulseaudio.init \
146 $(1)/etc/init.d/pulseaudio
147
148 $(INSTALL_CONF) \
149 $(PKG_INSTALL_DIR)/etc/pulse/* \
150 $(1)/etc/pulse
151
152 $(CP) \
153 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
154 $(1)/usr/lib/
155
156 $(CP) \
157 $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
158 $(1)/usr/lib/pulseaudio/
159
160 $(CP) \
161 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
162 $(1)/usr/lib/
163
164 $(CP) \
165 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
166 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
167
168 chmod -R 0644 $(1)/etc/pulse/*
169 endef
170
171 define Package/pulseaudio-tools/install
172 $(INSTALL_DIR) \
173 $(1)/usr/bin
174
175 $(INSTALL_BIN) \
176 $(PKG_INSTALL_DIR)/usr/bin/pa* \
177 $(1)/usr/bin/
178 endef
179
180 define Package/pulseaudio-profiles/install
181 $(INSTALL_DIR) \
182 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
183 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
184
185 $(INSTALL_CONF) \
186 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
187 $(1)/usr/share/pulseaudio/alsa-mixer/paths
188
189 $(INSTALL_CONF) \
190 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
191 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
192 endef
193
194 $(eval $(call BuildPackage,pulseaudio-daemon))
195 $(eval $(call BuildPackage,pulseaudio-tools))
196 $(eval $(call BuildPackage,pulseaudio-profiles))