packages/rygel: fix whitespaces
[packages.git] / multimedia / rygel / Makefile
1 #
2 # Copyright (C) 2006-2012 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:=rygel
11 PKG_VERSION:=0.14.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNOME/rygel/0.14/
16 PKG_SHA256SUM:=c4f79fb30bc1a062a2ffdadc7a55dd91fa58240302f152fb070d8c674bdddd67
17
18 PKG_FIXUP:=autoreconf
19 PKG_BUILD_DEPENDS:=vala/host intltool/host vala gupnp-vala
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/nls.mk
23
24 TARGET_LDFLAGS+=\
25         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
26
27 define Package/rygel/Default
28   SECTION:=multimedia
29   CATEGORY:=Multimedia
30   TITLE:=GNOME UPnP/DLNA services
31   URL:=http://live.gnome.org/Rygel
32 endef
33
34 define Package/rygel/description/Default
35  Rygel is a collection of DLNA (UPnP AV) services (devices in UPnP speak),
36  implemented through a plug-in mechanism.
37 endef
38
39 define Package/rygel
40 $(call Package/rygel/Default)
41   DEPENDS:=+libgssdp +libgupnp +libgupnp-av +libgupnp-dlna +libgee \
42     +libsoup +gstreamer +libgstvideo +libgstpbutils
43 endef
44
45 define Package/rygel/conffiles
46 /etc/config/rygel
47 endef
48
49 define Package/rygel/description
50 $(call Package/rygel/description/Default)
51  .
52  This package contains the main rygel binary.
53 endef
54
55 define RemoveValaStamps
56         find $(PKG_BUILD_DIR) -name "*_vala.stamp" | xargs rm -f
57 endef
58
59 Hooks/Configure/Pre += RemoveValaStamps
60
61 define Build/Configure
62         $(call Build/Configure/Default,--without-ui,)
63 endef
64
65 define Build/Compile
66         $(MAKE) -C $(PKG_BUILD_DIR) \
67                 DESTDIR="$(PKG_INSTALL_DIR)" \
68                 all install
69 endef
70
71 define Package/rygel/install
72         $(INSTALL_DIR) $(1)/usr/bin
73
74         $(INSTALL_BIN) \
75                 $(PKG_INSTALL_DIR)/usr/bin/rygel \
76                 $(1)/usr/bin
77
78         $(INSTALL_DIR) $(1)/usr/share/rygel/xml
79
80         $(INSTALL_DATA) \
81                 $(PKG_INSTALL_DIR)/usr/share/rygel/xml/*.xml \
82                 $(1)/usr/share/rygel/xml
83
84         $(INSTALL_DIR) $(1)/etc
85         $(INSTALL_DATA) files/etc/rygel.conf $(1)/etc
86
87         $(INSTALL_DIR) $(1)/etc/init.d
88         $(INSTALL_BIN) files/etc/init.d/rygel $(1)/etc/init.d/rygel
89
90         $(INSTALL_DIR) $(1)/etc/config
91         $(INSTALL_CONF) files/etc/config/rygel $(1)/etc/config/rygel
92
93         $(INSTALL_DIR) $(1)/usr/share/icons/hicolor/{32x32,48x48,128x128}/apps
94         $(INSTALL_DATA) \
95                 $(PKG_INSTALL_DIR)/usr/share/icons/hicolor/32x32/apps/rygel.png \
96                 $(1)/usr/share/icons/hicolor/32x32/apps/rygel.png
97         $(INSTALL_DATA) \
98                 $(PKG_INSTALL_DIR)/usr/share/icons/hicolor/48x48/apps/rygel.png \
99                 $(1)/usr/share/icons/hicolor/48x48/apps/rygel.png
100         $(INSTALL_DATA) \
101                 $(PKG_INSTALL_DIR)/usr/share/icons/hicolor/128x128/apps/rygel.png \
102                 $(1)/usr/share/icons/hicolor/128x128/apps/rygel.png
103 endef
104
105 # 1: plugin name as used in shared library filename
106 # 2: additional dependencies, if any
107 define RygelBuildPlugin
108
109   define Package/rygel-$(1)
110     $(call Package/rygel/Default)
111     TITLE+= - $(1) plugin
112     DEPENDS:=+rygel $(2)
113   endef
114
115   define Package/rygel-$(1)/install
116         $(INSTALL_DIR) $$(1)/usr/lib/rygel-1.0
117         $(CP) $(PKG_INSTALL_DIR)/usr/lib/rygel-1.0/librygel-$(1).so \
118                 $$(1)/usr/lib/rygel-1.0
119   endef
120
121   $$(eval $$(call BuildPackage,rygel-$(1)))
122 endef
123
124 define Package/rygel-external/description
125   $(call Package/rygel/description/Default)
126   .
127   This package contains the external plugin, a MediaServer plugin that exports
128   media provided by applications implementing the D-Bus MediaServer interface.
129 endef
130 $(eval $(call RygelBuildPlugin,external))
131
132 define Package/rygel-media-export/description
133   $(call Package/rygel/description/Default)
134   .
135   This package contains the media-export plugin, a MediaServer plugin that
136   recursively exports files and folders specified in the user configuration.
137 endef
138 $(eval $(call RygelBuildPlugin,media-export,+libsqlite3 +libgstapp +libgsttag))
139
140 define Package/rygel-mpris/description
141   $(call Package/rygel/description/Default)
142   .
143   This package contains the mpris plugin, a MediaServer plugin that exports
144   media provided by applications implementing the D-Bus MPRIS2 interface.
145 endef
146 $(eval $(call RygelBuildPlugin,mpris))
147
148 define Package/rygel-tracker/description
149   $(call Package/rygel/description/Default)
150   .
151   This package contains the tracker plugin, a MediaServer plugin that exports
152   media known to Tracker.
153 endef
154 $(eval $(call RygelBuildPlugin,tracker))
155
156 define Package/rygel-playbin/description
157   $(call Package/rygel/description/Default)
158   .
159   This package contains the playbin plugin, the MediaRenderer plugin.
160 endef
161 $(eval $(call RygelBuildPlugin,playbin))
162
163 define Package/rygel-playbin-gst-suggested/description
164   $(call Package/rygel/description/Default)
165   .
166   This optional metapackage installs a suggested set of gstreamer plugins to
167   support audio playback in rygel-playbin.
168 endef
169
170 define Package/rygel-playbin-gst-suggested
171   $(call Package/rygel/Default)
172   TITLE:=Suggested GStreamer plugins for rygel-playbin
173   DEPENDS:= \
174     +gst-mod-alsa \
175     +gst-mod-audioconvert \
176     +gst-mod-audioparsers \
177     +gst-mod-audioresample \
178     +gst-mod-autodetect \
179     +gst-mod-decodebin2 \
180     +gst-mod-flac \
181     +gst-mod-icydemux \
182     +gst-mod-id3demux \
183     +gst-mod-isomp4 \
184     +gst-mod-ogg \
185     +gst-mod-playbin \
186     +gst-mod-souphttpsrc \
187     +gst-mod-typefindfunctions \
188     +gst-mod-volume \
189     +gst-mod-vorbis \
190     +BUILD_PATENTED:gst-mod-faad \
191     +BUILD_PATENTED:gst-mod-mad
192 endef
193 $(eval $(call BuildPackage,rygel-playbin-gst-suggested))
194
195 $(eval $(call BuildPackage,rygel))