summaryrefslogtreecommitdiff
path: root/uriparser/Makefile
blob: b1256c5eb2f46cb1204d3eece561d0227bc34540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
## Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
#
## This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# #
#
include $(TOPDIR)/rules.mk

PKG_NAME:=uriparser
PKG_VERSION:=0.9.1
PKG_RELEASE:=1

PKG_SOURCE:=uriparser-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/uriparser/uriparser/archive
PKG_HASH:=2d241d771368fb341c5d7231c2a754d4a5fa1280b958b82131dd7838900dc976
PKG_BUILD_DIR:=$(BUILD_DIR)/uriparser-uriparser-$(PKG_VERSION)
PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
PKG_URL:=https://uriparser.github.io

PKG_INSTALL:=1
PKG_FIXUP:=autoreconf

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/autotools.mk


define Package/uriparser
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=uriparser
  DEPENDS:=+liburiparser
endef

define Package/liburiparser
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=liburiparser
endef

define package/uriparser/description
  strictly rfc 3986 compliant uri parser written in c89
endef

define package/liburiparser/description
  strictly rfc 3986 compliant uri parsing and handling library written in c89
endef

CONFIGURE_ARGS += \
		--disable-test \
		--disable-doc \
		--disable-wchar_t
HOST_CONFIGURE_ARGS:=$(CONFIGURE_ARGS)

define Package/uriparser/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(CP) $(PKG_INSTALL_DIR)/usr/bin/uriparse $(1)/usr/bin/
endef

define Package/liburiparser/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liburiparser.so* $(1)/usr/lib/
endef

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
endef

define Host/Install
	$(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/lib
	$(CP) $(HOST_INSTALL_DIR)/usr/lib/* $(STAGING_DIR_HOST)/usr/lib/
	$(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/include
	$(CP) $(HOST_INSTALL_DIR)/usr/include/* $(STAGING_DIR_HOST)/usr/include/
	$(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/lib/pkgconfig
	$(CP) $(HOST_INSTALL_DIR)/usr/lib/pkgconfig/* $(STAGING_DIR_HOST)/usr/lib/pkgconfig/
endef

$(eval $(call HostBuild))
$(eval $(call BuildPackage,uriparser))
$(eval $(call BuildPackage,liburiparser))