[packages] ucl: remove missing macros patch
[packages.git] / libs / libdlna / Makefile
1 #
2 # Copyright (C) 2006-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:=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 PKG_BUILD_PARALLEL:=1
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libdlna
24  SECTION:=libs
25  CATEGORY:=Libraries
26  TITLE:= Reference DLNA implementation
27  URL:=http://libdlna.geexbox.org/
28  DEPENDS:=+libffmpeg +@FFMPEG_LIBDLNA_SUPPORT
29 endef
30
31 define Package/libdlna/description
32  libdlna aims at being the reference open-source implementation of DLNA 
33  (Digital Living Network Alliance) standards. Its primary goal is to 
34  provide DLNA support to uShare, an embedded DLNA & UPnP A/V Media Server, 
35  but it will be used to build both DLNA servers and players in the long 
36  term.
37 endef
38
39 define Build/Configure
40         # this is *NOT* GNU configure
41         ( cd $(PKG_BUILD_DIR); \
42                 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
43                 LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lpthread" \
44                 HOST_CC="$(HOSTCC)" \
45                 ./configure \
46                 --cross-compile \
47                 --cross-prefix=$(TARGET_CROSS) \
48                 --prefix=/usr \
49                 --enable-shared \
50                 --enable-static \
51                 --disable-debug \
52                 --disable-optimize \
53                 --disable-strip \
54         )
55 endef
56
57 # XXX: fix build on systems where install is not at its usual location
58 # INSTALL defaults to /usr/bin/install
59 MAKE_INSTALL_FLAGS += \
60         INSTALL="install" \
61
62 TARGET_CFLAGS += $(FPIC)
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))