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