2022-01-29 12:54:35 +00:00
|
|
|
#
|
|
|
|
# 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-common
|
2022-12-11 05:25:00 +00:00
|
|
|
PKG_VERSION:=1.0.2
|
2022-01-29 12:54:35 +00:00
|
|
|
|
|
|
|
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-common
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
TITLE:=ACME client wrapper common files
|
|
|
|
PKGARCH:=all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acme-common/description
|
|
|
|
ACME client wrapper common files.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acme-common/conffiles
|
|
|
|
/etc/config/acme
|
|
|
|
/etc/acme
|
|
|
|
/etc/ssl/acme
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acme-common/install
|
2022-12-11 05:25:00 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/acme
|
2022-10-22 13:42:10 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/ssl/acme
|
2022-01-29 12:54:35 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_CONF) ./files/acme.config $(1)/etc/config/acme
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) ./files/acme.sh $(1)/usr/bin/acme
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/acme
|
|
|
|
$(INSTALL_DATA) ./files/functions.sh $(1)/usr/lib/acme
|
2022-10-22 14:17:08 +00:00
|
|
|
$(INSTALL_BIN) ./files/acme-notify.sh $(1)/usr/lib/acme/notify
|
2022-01-29 12:54:35 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/acme.init $(1)/etc/init.d/acme
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_DATA) ./files/acme.uci-defaults $(1)/etc/uci-defaults/acme
|
2022-10-22 14:17:08 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/acme
|
2022-01-29 12:54:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acme/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
grep -q '/usr/bin/acme' /etc/crontabs/root 2>/dev/null && exit 0
|
|
|
|
echo "0 0 * * * /usr/bin/acme get" >> /etc/crontabs/root
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/acme-common/prerm
|
|
|
|
#!/bin/sh
|
|
|
|
sed -i '\|/usr/bin/acme|d' /etc/crontabs/root
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,acme-common))
|