added our own pkg-config wrapper, making the sed foo on *.pc files obselete 2/2
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
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:=\
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 $(call Build/Configure/Default, \
39 --enable-shared \
40 --enable-static \
41 );
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 CCOPT="$(TARGET_CFLAGS)" \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 all install
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(STAGING_DIR)/usr/include/
54 mkdir -p $(STAGING_DIR)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} $(STAGING_DIR)/usr/lib/
56 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(STAGING_DIR)/usr/lib/pkgconfig/
58 endef
59
60 define Build/UninstallDev
61 rm -rf \
62 $(STAGING_DIR)/usr/include/upnp \
63 $(STAGING_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} \
64 $(STAGING_DIR)/usr/lib/pkgconfig/libupnp.pc
65 endef
66
67 define Package/libupnp/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,libupnp))