Move libexpat, unbound into core and introduce hnsd
[librecmc/librecmc.git] / package / 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.6
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL:=@SF/expat
14 PKG_HASH:=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
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         --without-docbook
46
47 HOST_CONFIGURE_ARGS += \
48         --without-docbook
49
50 define Host/Install
51         $(MAKE) -C $(HOST_BUILD_DIR) install
52 endef
53
54 define Build/InstallDev
55         $(INSTALL_DIR) $(1)/usr/include
56         $(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
57
58         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/expat.pc $(1)/usr/lib/pkgconfig/
60
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
63 endef
64
65 define Package/libexpat/install
66         $(INSTALL_DIR) $(1)/usr/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call HostBuild))
71 $(eval $(call BuildPackage,libexpat))