1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-18 05:13:56 +02:00
openwrt-packages/net/acme-acmesh/Makefile
Toke Høiland-Jørgensen 17691a5a52 acme-acmesh: Provide a 'combined' certificate bundle as well
The haproxy hotplug script creates a 'combined' certificate bundle that
contains both the certificate chain and the private key. However, having a
daemon hotplug script write into CERT_DIR is not great; so let's provide
the bundle as part of the main acme framework, keeping it in $domain_dir
and just linking it into CERT_DIR. That way we can keep CERT_DIR as just a
collection of links for everything, that no consumers should need to write
into.

Also make sure to set the umask correctly so the combined file is not
world-readable (since it contains the private key).

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2022-12-14 16:43:45 +01:00

70 lines
1.8 KiB
Makefile

#
# Copyright (C) 2016 Toke Høiland-Jørgensen
#
# This is free software, licensed under the GNU General Public License v3 or
# later.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=acme-acmesh
PKG_VERSION:=3.0.1
PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/acmesh-official/acme.sh/tar.gz/$(PKG_VERSION)?
PKG_HASH:=6212cc0c2bca99a7dd6cbb4236b4c7dd5d1113dab0841e66dae4d307d902a8e6
PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE.md
include $(INCLUDE_DIR)/package.mk
define Package/acme-acmesh
SECTION:=net
CATEGORY:=Network
DEPENDS:=+acme-common +wget-ssl +ca-bundle +openssl-util +socat
TITLE:=ACME client acme.sh wrapper script
URL:=https://acme.sh
PKGARCH:=all
PROVIDES:=acme-client
endef
define Package/acme-acmesh/description
A client for issuing ACME (e.g, Letsencrypt) certificates.
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/acme-acmesh/install
$(INSTALL_DIR) $(1)/usr/lib/acme/client
$(INSTALL_BIN) $(PKG_BUILD_DIR)/acme.sh $(1)/usr/lib/acme/client
$(INSTALL_BIN) ./files/hook.sh $(1)/usr/lib/acme/hook
endef
define Package/acme-acmesh-dnsapi
SECTION:=net
CATEGORY:=Network
DEPENDS:=+acme-acmesh
TITLE:=DNS API integration for ACME (Letsencrypt) client
PKGARCH:=all
endef
define Package/acme-acmesh-dnsapi/description
This package provides DNS API integration for ACME (Letsencrypt) client.
endef
define Package/acme-acmesh-dnsapi/install
$(INSTALL_DIR) $(1)/usr/lib/acme/client/dnsapi
$(INSTALL_DATA) $(PKG_BUILD_DIR)/dnsapi/*.sh $(1)/usr/lib/acme/client/dnsapi
endef
$(eval $(call BuildPackage,acme-acmesh))
$(eval $(call BuildPackage,acme-acmesh-dnsapi))