port libupnp to buildroot-ng
[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.2.1a
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/upnp
18 PKG_MD5SUM:=e72b3550bf064eedf080f16f09688891
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libupnp
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libpthread
29 TITLE:=UPnP SDK library
30 DESCRIPTION:=UPnP (Universal Plug and Play) SDK library.\\\
31 The Universal Plug and Play (UPnP) SDK for Linux provides support \\\
32 for building UPnP-compliant control points, devices, and bridges \\\
33 on Linux.
34 URL:=http://upnp.sourceforge.net/
35 endef
36
37 define Build/Configure
38 endef
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR)/upnp \
42 $(TARGET_CONFIGURE_OPTS) \
43 OPT_FLAGS="$(TARGET_CFLAGS)" \
44 STRIP=/bin/true
45 endef
46
47 define Package/libupnp/install
48 install -m0755 -d $(1)/usr/lib
49 $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(1)/usr/lib/
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(STAGING_DIR)/usr/include/upnp
54 $(CP) $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/
55 mkdir -p $(STAGING_DIR)/usr/lib
56 $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(STAGING_DIR)/usr/lib/
57 endef
58
59 define Build/UninstallDev
60 rm -rf \
61 $(STAGING_DIR)/usr/include/upnp \
62 $(STAGING_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so
63 endef
64
65 $(eval $(call BuildPackage,libupnp))