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