[packages] fix libdlna & ushare build on systems where the 'install' command is not...
[openwrt/svn-archive/archive.git] / libs / libdlna / Makefile
1 #
2 # Copyright (C) 2006-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:=libdlna
12 PKG_VERSION:=0.2.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://libdlna.geexbox.org/releases/
17 PKG_MD5SUM:=2c974f95b711e5fd07f78fc4ebfcca66
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libdlna
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:= Reference DLNA implementation
25 URL:=http://libdlna.geexbox.org/
26 DEPENDS:=+libffmpeg
27 endef
28
29 define Package/libdlna/description
30 libdlna aims at being the reference open-source implementation of DLNA
31 (Digital Living Network Alliance) standards. Its primary goal is to
32 provide DLNA support to uShare, an embedded DLNA & UPnP A/V Media Server,
33 but it will be used to build both DLNA servers and players in the long
34 term.
35 endef
36
37 define Build/Configure
38 # this is *NOT* GNU configure
39 ( cd $(PKG_BUILD_DIR); \
40 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
41 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lz" \
42 HOST_CC="$(HOSTCC)" \
43 ./configure \
44 --cross-compile \
45 --cross-prefix=$(TARGET_CROSS) \
46 --prefix=/usr \
47 --enable-shared \
48 --enable-static \
49 --disable-debug \
50 --disable-optimize \
51 --disable-strip \
52 )
53 endef
54
55 TARGET_CFLAGS += $(FPIC)
56
57 define Build/Compile
58 $(MAKE) -C $(PKG_BUILD_DIR) \
59 DESTDIR="$(PKG_INSTALL_DIR)" \
60 INSTALL="install" \
61 all install
62 endef
63
64 define Build/InstallDev
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/dlna.h $(1)/usr/include/
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.{a,so*} $(1)/usr/lib/
69 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdlna.pc $(1)/usr/lib/pkgconfig/
71 endef
72
73 define Package/libdlna/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdlna.so.* $(1)/usr/lib/
76 endef
77
78 $(eval $(call BuildPackage,libdlna))