fix serdisplib compile
[openwrt/svn-archive/archive.git] / libs / libupnp / Makefile
1 #
2 # Copyright (C) 2006 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:=libupnp
12 PKG_VERSION:=1.3.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/upnp
17 PKG_MD5SUM:=6646be5e31e58188e8f47c6ce64faa4c
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libupnp
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libpthread
28 TITLE:=UPnP SDK library
29 URL:=http://upnp.sourceforge.net/
30 endef
31
32 define Package/libupnp/description
33 The Universal Plug and Play (UPnP) SDK for Linux provides support
34 for building UPnP-compliant control points, devices, and bridges
35 on Linux.
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default, \
40 --enable-shared \
41 --enable-static \
42 );
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 CCOPT="$(TARGET_CFLAGS)" \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
55 mkdir -p $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} $(1)/usr/lib/
57 mkdir -p $(1)/usr/lib/pkgconfig
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
59 endef
60
61 define Package/libupnp/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libupnp))