nghttp3: fix pkgconfig file
[feed/packages.git] / libs / inih / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=inih
4 PKG_VERSION:=r58
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=https://codeload.github.com/benhoyt/inih/tar.gz/$(PKG_VERSION)?
9 PKG_HASH:=e79216260d5dffe809bda840be48ab0eec7737b2bb9f02d2275c1b46344ea7b7
10
11 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
12 PKG_LICENSE:=BSD-3-Clause
13 PKG_LICENSE_FILES:=LICENSE.txt
14
15 include $(INCLUDE_DIR)/package.mk
16 include $(INCLUDE_DIR)/meson.mk
17
18 define Package/libinih/Default
19 SECTION:=libs
20 CATEGORY:=Libraries
21 URL:=https://github.com/benhoyt/inih
22 endef
23
24 define Package/libinih
25 $(call Package/libinih/Default)
26 TITLE:=Simple .INI file parser in C
27 endef
28
29 define Package/libinireader
30 $(call Package/libinih/Default)
31 TITLE:=C++ library and API for inih
32 DEPENDS:=+libinih +libstdcpp
33 endef
34
35 define Package/libinih/description
36 inih (INI Not Invented Here) is a simple .INI file parser written
37 in C. It's only a couple of pages of code, and it was designed to
38 be small and simple, so it's good for embedded systems. It's also
39 more or less compatible with Python's ConfigParser style of .INI
40 files, including RFC 822-style multi-line syntax and name: value
41 entries.
42 endef
43
44 Package/libinireader/description = $(Package/libinih/description)
45
46 MESON_ARGS += \
47 -Ddefault_library=both \
48 -Ddistro_install=true \
49 -Dwith_INIReader=true \
50 -Dmulti-line_entries=true \
51 -Dutf-8_bom=true \
52 -Dinline_comments=true \
53 -Duse_heap=false
54
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/{ini,INIReader}.h $(1)/usr/include
58 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/{inih,INIReader}.pc $(1)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{inih,INIReader}.a $(1)/usr/lib/
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{inih,INIReader}.so* $(1)/usr/lib/
62 endef
63
64 define Package/libinih/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libinih.so* $(1)/usr/lib/
67 endef
68
69 define Package/libinireader/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libINIReader.so* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libinih))
75 $(eval $(call BuildPackage,libinireader))