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