add ushare package
[packages.git] / multimedia / ushare / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ushare
12 PKG_VERSION:=1.1a
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ushare.geexbox.org/releases/
17 PKG_MD5SUM:=5bbcdbf1ff85a9710fa3d4e82ccaa251
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ushare
22  SECTION:=multimedia
23  CATEGORY:=Multimedia
24  TITLE:= UPnP A/V & DLNA Media Server
25  URL:=http://ushare.geexbox.org/
26  DEPENDS:=+libdlna +libupnp
27 endef
28
29 define Package/ushare/description
30  uShare is a UPnP (TM) A/V & DLNA Media Server. It implements the server 
31  component that provides UPnP media devices with information on available 
32  multimedia files.
33 endef
34
35 define Build/Configure
36         # this is *NOT* GNU configure
37         ( cd $(PKG_BUILD_DIR); \
38                 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
39                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \
40                 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
41                 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
42                 ./configure \
43                 --cross-compile \
44                 --cross-prefix="$(TARGET_CROSS)" \
45                 --prefix="/usr" \
46                 --sysconfdir="/etc" \
47                 --enable-dlna \
48                 --disable-nls \
49                 --disable-debug \
50                 --disable-optimize \
51                 --disable-strip \
52         )
53 endef
54
55 define Build/Compile
56         $(MAKE) -C $(PKG_BUILD_DIR) \
57                 DESTDIR="$(PKG_INSTALL_DIR)" \
58                 all install
59 endef
60
61 define Package/ushare/conffiles
62 /etc/ushare.conf
63 endef
64
65 define Package/ushare/install
66         $(INSTALL_DIR) $(1)/etc
67         $(CP) $(PKG_INSTALL_DIR)/etc/ushare.conf $(1)/etc/
68         $(INSTALL_DIR) $(1)/usr/bin
69         $(CP) $(PKG_INSTALL_DIR)/usr/bin/ushare $(1)/usr/bin/
70 endef
71
72 $(eval $(call BuildPackage,ushare))