Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / libs / expat / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=expat
9 PKG_VERSION:=2.2.4
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL:=@SF/expat
14 PKG_HASH:=03ad85db965f8ab2d27328abcf0bc5571af6ec0a414874b2066ee3fdd372019e
15 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>, \
16 Ted Hess <thess@kitschensync.net>
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_FIXUP:=autoreconf
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libexpat
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=An XML parsing library
33 URL:=https://libexpat.github.io/
34 endef
35
36 define Package/libexpat/description
37 A fast, non-validating, stream-oriented XML parsing library.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static
45
46 define Host/Install
47 $(MAKE) -C $(HOST_BUILD_DIR) install
48 endef
49
50 define Build/InstallDev
51 $(INSTALL_DIR) $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
53
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
55 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/expat.pc $(1)/usr/lib/pkgconfig/
56
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
59 endef
60
61 define Package/libexpat/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call HostBuild))
67 $(eval $(call BuildPackage,libexpat))