replace lots of manual install commands with INSTALL_* variables
[packages.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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/upnp
17 PKG_MD5SUM:=e72b3550bf064eedf080f16f09688891
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
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   DESCRIPTION:=\
30         The Universal Plug and Play (UPnP) SDK for Linux provides support \\\
31         for building UPnP-compliant control points, devices, and bridges \\\
32         on Linux.
33   URL:=http://upnp.sourceforge.net/
34 endef
35
36 define Build/Configure
37 endef
38
39 define Build/Compile
40         $(MAKE) -C $(PKG_BUILD_DIR)/upnp \
41                 $(TARGET_CONFIGURE_OPTS) \
42                 OPT_FLAGS="$(TARGET_CFLAGS)" \
43                 STRIP=/bin/true
44 endef
45
46 define Build/InstallDev
47         mkdir -p $(STAGING_DIR)/usr/include/upnp
48         $(CP) $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/
49         mkdir -p $(STAGING_DIR)/usr/lib
50         $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(STAGING_DIR)/usr/lib/
51 endef
52
53 define Build/UninstallDev
54         rm -rf \
55                 $(STAGING_DIR)/usr/include/upnp \
56                 $(STAGING_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so
57 endef
58
59 define Package/libupnp/install
60         $(INSTALL_DIR) $(1)/usr/lib
61         $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libupnp))