unixodbc: fix compilation with GCC14
[feed/packages.git] / sound / pulseaudio / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pulseaudio
11 PKG_VERSION:=17.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=https://freedesktop.org/software/pulseaudio/releases
16 PKG_HASH:=053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5
17
18 PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
19 PKG_LICENSE:=LGPL-2.1-or-later
20 PKG_LICENSE_FILES:=GPL LICENSE
21 PKG_CPE_ID:=cpe:/a:pulseaudio:pulseaudio
22
23 PKG_BUILD_FLAGS:=no-mips16
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/nls.mk
27 include $(INCLUDE_DIR)/meson.mk
28
29 define Package/pulseaudio-daemon/Default
30 SECTION:=sound
31 CATEGORY:=Sound
32 DEPENDS:=+libsndfile +libltdl +alsa-lib \
33 +libopenssl +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS)
34 TITLE:=Network sound server
35 URL:=https://www.freedesktop.org/wiki/Software/PulseAudio/
36 PROVIDES:=pulseaudio
37 USERID:=pulse=51:pulse=51
38 endef
39
40 define Package/pulseaudio-daemon
41 $(call Package/pulseaudio-daemon/Default)
42 VARIANT:=noavahi
43 CONFLICTS:=pulseaudio-daemon-avahi
44 endef
45
46 define Package/pulseaudio-daemon-avahi
47 $(call Package/pulseaudio-daemon/Default)
48 DEPENDS+=+dbus +libavahi-client +sbc +bluez-daemon
49 TITLE+= (avahi/bluez)
50 VARIANT:=avahi
51 endef
52
53 define Package/pulseaudio-daemon/description
54 PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server.
55 endef
56
57 define Package/pulseaudio-daemon-avahi/description
58 $(call Package/pulseaudio-daemon/description)
59 This package enables avahi,bluez and is compiled against dbus, sbc, and avahi.
60 endef
61
62 define Package/pulseaudio-daemon/conffiles
63 /etc/pulse/client.conf
64 /etc/pulse/daemon.conf
65 /etc/pulse/default.pa
66 /etc/pulse/system.pa
67 endef
68
69 Package/pulseaudio-daemon-avahi/conffiles = $(Package/pulseaudio-daemon/conffiles)
70
71 define Package/pulseaudio-tools
72 SECTION:=sound
73 CATEGORY:=Sound
74 DEPENDS:=+libsndfile pulseaudio
75 TITLE:=Tools for Pulseaudio
76 URL:=https://www.freedesktop.org/wiki/Software/PulseAudio/
77 VARIANT:=noavahi
78 endef
79
80 define Package/pulseaudio-profiles
81 SECTION:=sound
82 CATEGORY:=Sound
83 DEPENDS:=pulseaudio
84 TITLE:=Profiles for Pulseaudio
85 URL:=https://www.freedesktop.org/wiki/Software/PulseAudio/
86 endef
87
88 MESON_ARGS += \
89 -Db_lto=true \
90 -Dgcov=false \
91 -Dman=false \
92 -Dtests=false \
93 -Dsystem_user=pulse \
94 -Dsystem_group=pulse \
95 -Daccess_group=audio \
96 -Ddatabase=simple \
97 -Dlegacy-database-entry-format=false \
98 -Dstream-restore-clear-old-devices=true \
99 -Drunning-from-build-tree=false \
100 -Datomic-arm-linux-helpers=false \
101 -Datomic-arm-memory-barrier=false \
102 -Dalsa=enabled \
103 -Dasyncns=disabled \
104 -Dbluez5-native-headset=false \
105 -Dbluez5-ofono-headset=false \
106 -Dfftw=disabled \
107 -Dglib=disabled \
108 -Dgsettings=disabled \
109 -Dgstreamer=disabled \
110 -Dgtk=disabled \
111 -Dhal-compat=false \
112 -Dipv6=true \
113 -Djack=disabled \
114 -Dlirc=disabled \
115 -Dopenssl=enabled \
116 -Dorc=disabled \
117 -Dsamplerate=disabled \
118 -Dsoxr=disabled \
119 -Dspeex=disabled \
120 -Dsystemd=disabled \
121 -Dudev=disabled \
122 -Dx11=disabled \
123 -Dadrian-aec=true \
124 -Dwebrtc-aec=disabled \
125 -Ddoxygen=false \
126 -Dtcpwrap=disabled \
127 -Dbluez5-gstreamer=disabled
128
129 ifeq ($(BUILD_VARIANT),avahi)
130 MESON_ARGS += \
131 -Davahi=enabled \
132 -Dbluez5=enabled \
133 -Ddbus=enabled
134 endif
135
136 ifeq ($(BUILD_VARIANT),noavahi)
137 MESON_ARGS += \
138 -Davahi=disabled \
139 -Dbluez5=disabled \
140 -Ddbus=disabled
141 endif
142
143 TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
144
145 define Build/Prepare
146 $(call Build/Prepare/Default)
147 ifneq ($(findstring arm,$(CONFIG_ARCH)),)
148 ifeq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
149 $(SED) '/remap_neon\.c/d' $(PKG_BUILD_DIR)/src/pulsecore/meson.build
150 endif
151 endif
152 endef
153
154 define Build/InstallDev
155 $(INSTALL_DIR) $(1)/usr/include/pulse
156 $(CP) $(PKG_INSTALL_DIR)/usr/include/pulse/* $(1)/usr/include/pulse
157
158 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
159 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
160 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpulse.pc
161 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpulse.pc
162 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpulse-simple.pc
163 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpulse-simple.pc
164
165 $(INSTALL_DIR) $(1)/usr/lib
166 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
167
168 $(INSTALL_DIR) $(1)/usr/lib/pulseaudio
169 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* $(1)/usr/lib/pulseaudio/
170 endef
171
172 define Package/pulseaudio-daemon/install
173 $(INSTALL_DIR) $(1)/usr/bin
174 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pulseaudio $(1)/usr/bin/pulseaudio
175
176 $(INSTALL_DIR) $(1)/etc/init.d
177 $(INSTALL_BIN) ./files/pulseaudio.init $(1)/etc/init.d/pulseaudio
178
179 $(INSTALL_DIR) $(1)/etc/pulse
180 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/pulse/* $(1)/etc/pulse
181
182 $(INSTALL_DIR) $(1)/usr/lib
183 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
184
185 $(INSTALL_DIR) $(1)/usr/lib/pulseaudio
186 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* $(1)/usr/lib/pulseaudio/
187
188 $(INSTALL_DIR) $(1)/usr/lib/pulse-$(PKG_VERSION)/modules
189 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/modules/lib*.so $(1)/usr/lib/
190 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/modules/module*.so $(1)/usr/lib/pulseaudio/modules/
191 endef
192
193 define Package/pulseaudio-daemon-avahi/install
194 $(call Package/pulseaudio-daemon/install,$1)
195
196 $(INSTALL_DIR) $(1)/usr/share/dbus-1/system.d
197 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system.d/pulseaudio-system.conf $(1)/usr/share/dbus-1/system.d/pulseaudio-system.conf
198 endef
199
200 define Package/pulseaudio-tools/install
201 $(INSTALL_DIR) $(1)/usr/bin
202 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pa* $(1)/usr/bin/
203 endef
204
205 define Package/pulseaudio-profiles/install
206 $(INSTALL_DIR) $(1)/usr/share/pulseaudio/alsa-mixer/paths
207 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* $(1)/usr/share/pulseaudio/alsa-mixer/paths
208
209 $(INSTALL_DIR) $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
210 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
211 endef
212
213 $(eval $(call BuildPackage,pulseaudio-daemon))
214 $(eval $(call BuildPackage,pulseaudio-daemon-avahi))
215 $(eval $(call BuildPackage,pulseaudio-tools))
216 $(eval $(call BuildPackage,pulseaudio-profiles))