Makefile 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#
# Copyright (C) 2016 CZ.NIC, z. s. p. o. (https://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:=dnssec-rootkey
11 12
PKG_VERSION:=0.0.2
PKG_RELEASE:=1
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

PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
PKG_LICENSE:=GPL-3.0

include $(INCLUDE_DIR)/package.mk

define Package/dnssec-rootkey
	SECTION:=net
	CATEGORY:=Network
	SUBMENU:=IP Addresses and Names
	TITLE:=DNSSEC rootkey
endef

define Package/$(PKG_NAME)/postinst
#!/bin/sh
set -ex
[ -n "$$IPKG_INSTROOT" ] || {
/usr/sbin/cert-backup /etc/root.keys
}
endef

define Package/$(PKG_NAME)/description
  Root key for DNSSEC resolver
endef

define Build/Compile
endef

define Package/$(PKG_NAME)/install
	$(INSTALL_DIR) $(1)/etc/
	$(INSTALL_CONF) ./files/root.keys $(1)/etc/root.keys
47 48 49 50
	$(INSTALL_DIR) $(1)/usr/bin/
	$(INSTALL_BIN) ./files/rootkeys_backup.sh $(1)/usr/bin/rootkeys_backup.sh
	$(INSTALL_DIR) $(1)/etc/cron.d/
	$(INSTALL_CONF) ./files/rootkeys_backup.cron $(1)/etc/cron.d/rootkeys_backup
51 52 53
endef

$(eval $(call BuildPackage,dnssec-rootkey))