b37397eb40736f13798eda727e0cef418bfa13f7
[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                 INSTALL="install" \
59                 all install
60 endef
61
62 define Package/ushare/conffiles
63 /etc/ushare.conf
64 endef
65
66 define Package/ushare/install
67         $(INSTALL_DIR) $(1)/etc
68         $(CP) $(PKG_INSTALL_DIR)/etc/ushare.conf $(1)/etc/
69         $(INSTALL_DIR) $(1)/usr/bin
70         $(CP) $(PKG_INSTALL_DIR)/usr/bin/ushare $(1)/usr/bin/
71         $(INSTALL_DIR) $(1)/etc/config
72         $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
73         $(INSTALL_DIR) $(1)/etc/init.d
74         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
75 endef
76
77 $(eval $(call BuildPackage,ushare))