Commit based upon d6442850bde61f0c3e7e2ae3247b4a856073c5e0
[librecmc/package-feed.git] / sound / pulseaudio / Makefile
1 #
2 # Copyright (C) 2011-2016 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:=9.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:=da7162541b3a9bc20576dbd0d7d1489a
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 define Package/pulseaudio/Default
31   SECTION:=sound
32   CATEGORY:=Sound
33   DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \
34         +librt +alsa-lib +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
35   TITLE:=Network sound server
36   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
37   URL:=http://www.pulseaudio.org
38   PROVIDES:=pulseaudio
39   USERID:=pulse=51:pulse=51
40 endef
41
42 define Package/pulseaudio-daemon
43   $(call Package/pulseaudio/Default)
44   DEPENDS+= +libjson-c
45 endef
46
47 define Package/pulseaudio/Default/description
48   PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
49 endef
50
51 define Package/pulseaudio-daemon/description
52   $(call Package/pulseaudio/Default/description)
53 endef
54
55 define Package/pulseaudio-daemon/conffiles
56 /etc/pulse/client.conf
57 /etc/pulse/daemon.conf
58 /etc/pulse/default.pa
59 /etc/pulse/system.pa
60 endef
61
62 define Package/pulseaudio-tools
63   SECTION:=sound
64   CATEGORY:=Sound
65   DEPENDS:=+libsndfile +pulseaudio
66   TITLE:=Tools for Pulseaudio
67   URL:=http://www.pulseaudio.org
68 endef
69
70 define Package/pulseaudio-profiles
71   SECTION:=sound
72   CATEGORY:=Sound
73   DEPENDS:=+pulseaudio
74   TITLE:=Profiles for Pulseaudio
75   URL:=http://www.pulseaudio.org
76 endef
77
78 CONFIGURE_ARGS += \
79         --with-system-user=pulse \
80         --with-system-group=pulse \
81         --with-access-group=audio \
82         --with-database=simple \
83         --enable-alsa \
84         --disable-hal \
85         --disable-gconf \
86         --disable-nls \
87         --disable-manpages \
88         --enable-oss-output \
89         --disable-oss-wrapper \
90         --disable-samplerate \
91         --disable-per-user-esound-socket \
92         --disable-solaris \
93         --disable-gtk2 \
94         --disable-glib2 \
95         --disable-jack \
96         --disable-asyncns \
97         --disable-lirc \
98         --disable-bluez \
99         --disable-udev \
100         --without-fftw \
101         --disable-avahi \
102         --disable-dbus \
103         --without-soxr
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_DATA) \
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 endef
169
170 define Package/pulseaudio-tools/install
171         $(INSTALL_DIR) \
172                 $(1)/usr/bin
173
174         $(INSTALL_BIN) \
175                 $(PKG_INSTALL_DIR)/usr/bin/pa* \
176                 $(1)/usr/bin/
177 endef
178
179 define Package/pulseaudio-profiles/install
180         $(INSTALL_DIR) \
181                 $(1)/usr/share/pulseaudio/alsa-mixer/paths \
182                 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
183
184         $(INSTALL_DATA) \
185                 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
186                 $(1)/usr/share/pulseaudio/alsa-mixer/paths
187
188         $(INSTALL_DATA) \
189                 $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
190                 $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
191 endef
192
193 $(eval $(call BuildPackage,pulseaudio-daemon))
194 $(eval $(call BuildPackage,pulseaudio-tools))
195 $(eval $(call BuildPackage,pulseaudio-profiles))