head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2026.10.14.03.34.55;	author riastradh;	state Exp;
branches;
next	;
commitid	pBJxy9uuz6KYwoZG;


desc
@@


1.1
log
@Import dkim-rotate-1.1 as mail/dkim-rotate.

dkim-rotate is a tool that rotates DKIM keys and publishes them in
order to invalidate them so that they do not become an incentive for
authenticating leaked private email over time.

The dkim-rotate program is just a Perl script that can be invoked
from a cron job to update an MTA's DKIM configuration and a
corresponding zone file.  The documentation is built with pandoc,
which is a much heavier build dependency, so I've split it into three
packages:

- dkim-rotate-base having the main program and an example config,
- dkim-rotate-doc having the man pages and other documentation, and
- a meta-package dkim-rotate depending on both of those.
@
text
@#	$NetBSD$
#

.include "../../mail/dkim-rotate/Makefile.common"

PKGNAME=	${DISTNAME:C/^dkim-rotate-dkim-rotate-/dkim-rotate-base-/}

COMMENT=	Tool for rotation and revocation of DKIM keys

USE_LANGUAGES=	# none

USE_TOOLS+=	perl:run

DEPENDS+=	p5-Getopt-Long-Descriptive>=0:../../devel/p5-Getopt-Long-Descriptive

REPLACE_PERL+=	dkim-rotate

EGDIR=			${PREFIX}/share/examples/dkim-rotate
INSTALLATION_DIRS+=	bin
INSTALLATION_DIRS+=	${EGDIR}

NO_BUILD=	yes

do-install:
	${INSTALL_SCRIPT} ${WRKSRC:Q}/dkim-rotate ${DESTDIR:Q}${PREFIX:Q}/bin/
	${INSTALL_DATA} ${WRKSRC:Q}/example.zone ${WRKSRC:Q}/crontab \
	    ${DESTDIR:Q}${EGDIR:Q}/

USE_TOOLS+=		bash:test date:test ggrep:test gmake:test realpath:test

TOOL_DEPENDS+=		coreutils>=0:../../sysutils/coreutils

TOOLS_PATH.date=	${TOOLBASE}/gnu/bin/date
TOOLS_PATH.grep=	${TOOLBASE}/gnu/bin/grep

TOOLS_CREATE+=		md5sum
TOOLS_PATH.md5sum=	${TOOLBASE}/gnu/bin/md5sum

TOOLS_CREATE+=		base64
TOOLS_SCRIPT.base64=	exec openssl base64 "$$@@"

REPLACE_BASH+=		debian/tests/*
REPLACE_BASH+=		tests/*

TEST_TARGET+=		check
TEST_MAKE_FLAGS+=	SHELL=${SHELL:Q}

.include "../../mk/bsd.pkg.mk"
@
