Browse Source

expat: adopt here

Signed-off-by: Steven Barth <steven@midlink.org>
Steven Barth 10 years ago
parent
commit
6f2fbb97a0
1 changed files with 69 additions and 0 deletions
  1. 69
    0
      libs/expat/Makefile

+ 69
- 0
libs/expat/Makefile View File

@@ -0,0 +1,69 @@
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:=expat
11
+PKG_VERSION:=2.1.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_MD5SUM:=dd7dab7a5fea97d2a6a43f511449b7cd
16
+PKG_SOURCE_URL:=@SF/expat
17
+PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
18
+
19
+PKG_LICENSE:=MIT
20
+PACKAGE_LICENSE_FILES:=COPYING
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_REMOVE_FILES:=conftools/libtool.m4
24
+
25
+PKG_BUILD_PARALLEL:=1
26
+
27
+include $(INCLUDE_DIR)/host-build.mk
28
+include $(INCLUDE_DIR)/package.mk
29
+
30
+define Package/libexpat
31
+  SECTION:=libs
32
+  CATEGORY:=Libraries
33
+  TITLE:=An XML parsing library
34
+  URL:=http://expat.sourceforge.net/
35
+endef
36
+
37
+define Package/libexpat/description
38
+ A fast, non-validating, stream-oriented XML parsing library.
39
+endef
40
+
41
+
42
+TARGET_CFLAGS += $(FPIC)
43
+
44
+CONFIGURE_ARGS += \
45
+	--enable-shared \
46
+	--enable-static
47
+
48
+define Build/Compile
49
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
50
+endef
51
+
52
+define Host/Install
53
+	$(MAKE) -C $(HOST_BUILD_DIR) install
54
+endef
55
+
56
+define Build/InstallDev
57
+	$(INSTALL_DIR) $(1)/usr/include
58
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
59
+	$(INSTALL_DIR) $(1)/usr/lib
60
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
61
+endef
62
+
63
+define Package/libexpat/install
64
+	$(INSTALL_DIR) $(1)/usr/lib
65
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
66
+endef
67
+
68
+$(eval $(call HostBuild))
69
+$(eval $(call BuildPackage,libexpat))