summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--updater-ng/Makefile20
-rw-r--r--uriparser/Makefile86
-rw-r--r--uthash/Makefile38
3 files changed, 140 insertions, 4 deletions
diff --git a/updater-ng/Makefile b/updater-ng/Makefile
index b8dfb83..95af6eb 100644
--- a/updater-ng/Makefile
+++ b/updater-ng/Makefile
@@ -12,16 +12,28 @@ PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater/updater.git
PKG_SOURCE_BRANCH:=uri
PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
-HOST_BUILD_DEPENDS:=curl/host libevent2/host lua/host
-PKG_BUILD_DEPENDS:=busybox
+HOST_BUILD_DEPENDS:= \
+ curl/host \
+ libevent2/host \
+ lua/host \
+ uriparser/host \
+ uthash/host
+PKG_BUILD_DEPENDS:=busybox uthash
include $(INCLUDE_DIR)/autopkg-branch.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
- TITLE:=The next generation updater
- DEPENDS:=+liblua +libuci-lua +libevent2 +usign +libcurl +ca-certificates
+ TITLE:=The next generation updater
+ DEPENDS:=\
+ +liblua \
+ +libuci-lua \
+ +libevent2 \
+ +libcurl \
+ +liburiparser \
+ +usign \
+ +ca-certificates
endef
define Package/$(PKG_NAME)/install
diff --git a/uriparser/Makefile b/uriparser/Makefile
new file mode 100644
index 0000000..b1256c5
--- /dev/null
+++ b/uriparser/Makefile
@@ -0,0 +1,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))
diff --git a/uthash/Makefile b/uthash/Makefile
new file mode 100644
index 0000000..4c32e76
--- /dev/null
+++ b/uthash/Makefile
@@ -0,0 +1,38 @@
+#
+## 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:=uthash
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/troydhanson/uthash/archive
+PKG_HASH:=152ccd8e64d0f495377232e3964d06c7ec8bb8c3fbd3217f8a5702614f9a669e
+PKG_BUILD_DIR:=$(BUILD_DIR)/uthash-$(PKG_VERSION)
+PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+Build/Compile:=:
+Host/Compile:=:
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/usr/include
+ $(CP) $(HOST_BUILD_DIR)/include/* $(STAGING_DIR_HOST)/usr/include/
+endef
+
+
+$(eval $(call HostBuild))
+$(eval $(call Build/DefaultTargets))