fix avr32 compiling
[openwrt/svn-archive/archive.git] / libs / libupnp / Makefile
index 1904a60344ce5bf66b7b436d7629ca093077b498..32de1997c01829ffdd506a21359955dcd87f2d42 100644 (file)
@@ -9,13 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnp
-PKG_VERSION:=1.2.1a
+PKG_VERSION:=1.6.3
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/upnp
-PKG_MD5SUM:=e72b3550bf064eedf080f16f09688891
-PKG_CAT:=zcat
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=@SF/pupnp
+PKG_MD5SUM:=553f3491fe4da88aba1763497730e2c0
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
@@ -26,40 +25,44 @@ define Package/libupnp
   SECTION:=libs
   CATEGORY:=Libraries
   DEPENDS:=+libpthread
-  TITLE:=UPnP SDK library
-  DESCRIPTION:=\
-       The Universal Plug and Play (UPnP) SDK for Linux provides support \\\
-       for building UPnP-compliant control points, devices, and bridges \\\
-       on Linux.
-  URL:=http://upnp.sourceforge.net/
+  TITLE:=A Portable Open Source UPnP Development Kit
+  URL:=http://pupnp.sourceforge.net/
+endef
+
+define Package/libupnp/description
+        The portable SDK for UPnP Devices (libupnp) provides developers with an
+       API and open source code for building control points, devices, and
+       bridges that are compliant with Version 1.0 of the  Universal Plug and
+       Play Device Architecture Specification and support several operating
+       systems like Linux, *BSD, Solaris and others.
 endef
 
 define Build/Configure
+       $(call Build/Configure/Default, \
+               --enable-shared \
+               --enable-static \
+       );
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR)/upnp \
-               $(TARGET_CONFIGURE_OPTS) \
-               OPT_FLAGS="$(TARGET_CFLAGS)" \
-               STRIP=/bin/true
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CCOPT="$(TARGET_CFLAGS)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
 endef
 
 define Build/InstallDev
-       mkdir -p $(STAGING_DIR)/usr/include/upnp
-       $(CP) $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/
-       mkdir -p $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(STAGING_DIR)/usr/lib/
-endef
-
-define Build/UninstallDev
-       rm -rf \
-               $(STAGING_DIR)/usr/include/upnp \
-               $(STAGING_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so
+       mkdir -p $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/upnp $(1)/usr/include/
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.{a,so*} $(1)/usr/lib/
+       mkdir -p $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libupnp.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libupnp/install
-       install -d -m0755 $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/upnp/bin/lib{ixml,threadutil,upnp}.so $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ixml,threadutil,upnp}.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libupnp))