place the static version of libusb into the staging dir - fixes dfu-util 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.6.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/pupnp
17 PKG_MD5SUM:=8918dcf7428cd119d0c8275765ff2833
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libupnp/Default
22 SECTION:=libs
23 CATEGORY:=Libraries
24 URL:=http://upnp.sourceforge.net/
25 endef
26
27 define Package/libupnp
28 $(call Package/libupnp/Default)
29 DEPENDS:=+libpthread
30 TITLE:=UPnP SDK library
31 MENU:=1
32 endef
33
34 define Package/libupnp/description
35 The portable SDK for UPnP Devices (libupnp) provides developers with an
36 API and open source code for building control points, devices, and
37 bridges that are compliant with Version 1.0 of the Universal Plug and
38 Play Device Architecture Specification and support several operating
39 systems like Linux, *BSD, Solaris and others.
40 endef
41
42 define Package/libupnp-sample
43 $(call Package/libupnp/Default)
44 DEPENDS:=libupnp
45 TITLE:=UPnP sample applications
46 endef
47
48 define Package/libupnp-sample/description
49 TVcontrolpoint & tvdevice sample applications
50 run inside /etc/upnp-tvdevice/
51 endef
52
53 define Build/Configure
54 $(call Build/Configure/Default, \
55 --enable-shared \
56 --enable-static \
57 );
58 endef
59
60 TARGET_CFLAGS += $(FPIC)
61
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 CCOPT="$(TARGET_CFLAGS)" \
65 DESTDIR="$(PKG_INSTALL_DIR)" \
66 all install
67 $(MAKE) -C $(PKG_BUILD_DIR)/upnp/sample/ upnp_tv_device upnp_tv_ctrlpt
68 endef
69
70 define Build/Compile/libupnp-sample
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 CCOPT="$(TARGET_CFLAGS)" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 check
75 endef
76
77 define Build/InstallDev
78 mkdir -p $(1)/usr/include
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
80 mkdir -p $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} $(1)/usr/lib/
82 mkdir -p $(1)/usr/lib/pkgconfig
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
84 endef
85
86 define Package/libupnp/install
87 $(INSTALL_DIR) $(1)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
89 endef
90
91 define Package/libupnp-sample/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnp/sample/upnp_tv_device $(1)/usr/bin
94 $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnp/sample/upnp_tv_ctrlpt $(1)/usr/bin
95 $(INSTALL_DIR) $(1)/etc/upnp-tvdevice/web
96 $(CP) $(PKG_BUILD_DIR)/upnp/sample/web/* $(1)/etc/upnp-tvdevice
97 endef
98
99 $(eval $(call BuildPackage,libupnp))
100 $(eval $(call BuildPackage,libupnp-sample))