[pulseaudio] install header-files, fix modules installation, remove @BROKEN
[packages.git] / sound / pulseaudio / Makefile
1 #
2 # Copyright (C) 2007-2009 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:=0.9.22
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/pulseaudio/
16 PKG_MD5SUM:=ca85ab470669b05e100861654cf5eb3c
17
18 PKG_BUILD_DEPENDS:=intltool/host
19
20 PKG_FIXUP = libtool
21
22 PKG_INSTALL = 1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/nls.mk
26
27 #TODO: split pulse into executable and library (or even better into several libraries since they're used as loadable modules, so not linked into)
28 define Package/pulseaudio
29   SECTION:=sound
30   CATEGORY:=Sound
31   DEPENDS:=+libspeexdsp +libgdbm +libsndfile \
32         +libltdl +libpthread +librt +dbus \
33         +alsa-lib $(ICONV_DEPENDS) $(INTL_DEPENDS)
34   TITLE:=Network sound server
35   URL:=http://www.pulseaudio.org
36 endef
37
38 define Package/pa-tools
39   SECTION:=sound
40   CATEGORY:=Sound
41   DEPENDS:=+libgdbm +libsndfile +pulseaudio #+libpulse
42   TITLE:=Tools for Pulseaudio
43   URL:=http://www.pulseaudio.org
44 endef
45
46 CONFIGURE_ARGS += \
47         --with-system-user=root \
48         --with-system-group=root \
49         --with-access-group=root \
50         --enable-alsa \
51         --disable-hal \
52         --disable-gconf \
53         --disable-tcpwrap \
54         --disable-nls \
55         --disable-solaris \
56         --disable-glib2 \
57         --disable-jack \
58         --disable-asyncns \
59         --disable-lirc \
60         --disable-bluez \
61         --without-caps
62
63
64 CONFIGURE_VARS += \
65         PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
66
67 #SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib
68 TARGET_CFLAGS += -std=gnu99
69
70 define Build/InstallDev
71         $(INSTALL_DIR) \
72                 $(1)/usr/lib/pkgconfig \
73                 $(1)/usr/include/pulse \
74                 $(1)/usr/lib
75         $(CP) \
76                 $(PKG_INSTALL_DIR)/usr/include/pulse/* \
77                 $(1)/usr/include/pulse
78         $(CP) \
79                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
80                 $(1)/usr/lib/pkgconfig
81         $(CP) \
82                 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
83                 $(1)/usr/lib/
84 endef
85
86 define Package/pulseaudio/install
87         $(INSTALL_DIR) \
88                 $(1)/usr/bin \
89                 $(1)/usr/lib \
90                 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
91                 $(1)/etc/pulse
92
93         $(INSTALL_BIN) \
94                 $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
95                 $(1)/usr/bin/pulseaudio
96
97         $(INSTALL_CONF) \
98                 $(PKG_INSTALL_DIR)/etc/pulse/* \
99                 $(1)/etc/pulse
100
101         $(CP) \
102                 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
103                 $(1)/usr/lib/
104
105         $(CP) \
106                 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \
107                 $(1)/usr/lib/
108         $(CP) \
109                 $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
110                 $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
111 endef
112
113 define Package/pa-tools/install
114         $(INSTALL_DIR) \
115                 $(1)/usr/bin
116
117         $(INSTALL_BIN) \
118                 $(PKG_INSTALL_DIR)/usr/bin/pa* \
119                 $(1)/usr/bin/
120 endef
121
122 $(eval $(call BuildPackage,pulseaudio))
123 $(eval $(call BuildPackage,pa-tools))