[package] add mxml library (#7396)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 6 Jun 2010 19:02:16 +0000 (19:02 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 6 Jun 2010 19:02:16 +0000 (19:02 +0000)
SVN-Revision: 21686

libs/mxml/Makefile [new file with mode: 0644]
libs/mxml/patches/001-targets.patch [new file with mode: 0644]

diff --git a/libs/mxml/Makefile b/libs/mxml/Makefile
new file mode 100644 (file)
index 0000000..1123e55
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2010 Tobias Schneider
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=mxml
+PKG_VERSION:=2.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.easysw.com/pub/mxml/$(PKG_VERSION)/
+PKG_FIXUP:=libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mxml
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=mini-xml
+  URL:=http://www.minixml.org/
+endef
+
+define Package/mxml/description
+  A small xml library.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Configure
+       $(call Build/Configure/Default, \
+               --enable-shared \
+               --enable-static \
+       )
+endef
+
+define Build/InstallDev
+       mkdir -p $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/mxml.h $(1)/usr/include/
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/libmxml.so* $(1)/usr/lib/
+       mkdir -p $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/mxml.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/mxml/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/libmxml.so*  $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,mxml))
diff --git a/libs/mxml/patches/001-targets.patch b/libs/mxml/patches/001-targets.patch
new file mode 100644 (file)
index 0000000..6d53249
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Nur mxml-2.6-orig/Makefile.in mxml-2.6/Makefile.in
+--- mxml-2.6-orig/Makefile.in  2008-12-06 05:20:38.000000000 +0100
++++ mxml-2.6/Makefile.in       2010-05-28 01:58:37.000000000 +0200
+@@ -88,7 +88,7 @@
+                       mxml-node.o mxml-search.o mxml-set.o
+ LIBOBJS               =       $(PUBLIBOBJS) mxml-private.o mxml-string.o
+ OBJS          =       mxmldoc.o testmxml.o $(LIBOBJS)
+-TARGETS               =       $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man
++TARGETS               =       $(LIBMXML)
+ #