[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[packages.git] / multimedia / ushare / Makefile
1 #
2 # Copyright (C) 2008-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:=ushare
11 PKG_VERSION:=1.1a
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://ushare.geexbox.org/releases/
16 PKG_MD5SUM:=5bbcdbf1ff85a9710fa3d4e82ccaa251
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ushare
21  SECTION:=multimedia
22  CATEGORY:=Multimedia
23  TITLE:= UPnP A/V & DLNA Media Server
24  URL:=http://ushare.geexbox.org/
25  DEPENDS:=+libdlna +libupnp
26 endef
27
28 define Package/ushare/description
29  uShare is a UPnP (TM) A/V & DLNA Media Server. It implements the server 
30  component that provides UPnP media devices with information on available 
31  multimedia files.
32 endef
33
34 define Build/Configure
35         # this is *NOT* GNU configure
36         ( cd $(PKG_BUILD_DIR); \
37                 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
38                 LDFLAGS="$(TARGET_LDFLAGS) -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \
39                 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
40                 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
41                 ./configure \
42                 --cross-compile \
43                 --cross-prefix="$(TARGET_CROSS)" \
44                 --prefix="/usr" \
45                 --sysconfdir="/etc" \
46                 --enable-dlna \
47                 --disable-nls \
48                 --disable-debug \
49                 --disable-optimize \
50                 --disable-strip \
51         )
52 endef
53
54 define Build/Compile
55         $(MAKE) -C $(PKG_BUILD_DIR) \
56                 DESTDIR="$(PKG_INSTALL_DIR)" \
57                 INSTALL="install" \
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         $(INSTALL_DIR) $(1)/etc/config
71         $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
72         $(INSTALL_DIR) $(1)/etc/init.d
73         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
74 endef
75
76 $(eval $(call BuildPackage,ushare))