pkgsrc/sysutils/logrotate/Makefile
nils 05021b9d6c Update sysutils/logroate to 3.16.0.
Upstream changelog:
* fix compilation with gcc-10, which defaults to -fno-common (#288)
* reduce number of open() operations on state file (#282)
* validate user/group given to the su directive early (#276)
* add hardening options to systemd unit file in examples (#274, #291)
* fix crash of logrotate on invalid configuration with include (#271)
* fix heap buffer overflow on too long logfile extension (#270)

Pkgsrc changes:
* a systemd example service file is added to the examples;
* a btmp and wtmp example configurations files are also added, but only
btmp is copied alongside logrotate.conf: while the 2 config files were at first
present in logrotate.conf, only btmp is present on NetBSD ;
* the GITHUB_RELEASE variable is moved for pkglint compliance.
2020-04-21 17:01:43 +00:00

58 lines
1.8 KiB
Makefile

# $NetBSD: Makefile,v 1.19 2020/04/21 17:01:43 nils Exp $
GITHUB_RELEASE= ${PKGVERSION_NOREV}
DISTNAME= logrotate-3.16.0
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=logrotate/}
MAINTAINER= nils@NetBSD.org
HOMEPAGE= https://github.com/logrotate/logrotate/
COMMENT= Daemon to rotate, compress, remove and mail system log files
LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake gzip:run gunzip:run mail:run
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
NO_EXPORT_CPP= yes
CONFIGURE_ENV+= STATEFILE=\"${VARBASE}/db/logrotate.status\"
CONFIGURE_ENV+= DEFAULT_MAIL_COMMAND=\"${MAIL_CMD:Q}\"
CONFIGURE_ENV+= COMPRESS_COMMAND=\"${GZIP_CMD:[1]:Q}\"
CONFIGURE_ENV+= UNCOMPRESS_COMMAND=\"${GUNZIP_CMD:[1]:Q}\"
CONFIGURE_ARGS+= --with-state-file-path="${VARBASE}/db/logrotate.status"
BUILD_DEFS+= VARBASE
MESSAGE_SUBST+= EGDIR=${EGDIR}
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-build
SUBST_MESSAGE.paths= Substituting paths variables.
SUBST_FILES.paths= examples/logrotate.conf
SUBST_FILES.paths+= examples/logrotate.cron
SUBST_VARS.paths= PREFIX PKG_SYSCONFDIR
CONF_FILES= ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf \
${EGDIR}/btmp ${PKG_SYSCONFDIR}/logrotate.d/btmp \
${EGDIR}/wtmp \
${EGDIR}/logrotate.service
OWN_DIRS= ${PKG_SYSCONFDIR}/logrotate.d
EGDIR= share/examples/logrotate
INSTALLATION_DIRS+= ${EGDIR}
post-install:
${INSTALL_DATA} ${WRKSRC}/examples/logrotate.conf \
${DESTDIR}${PREFIX}/${EGDIR}/logrotate.conf
${INSTALL_DATA} ${WRKSRC}/examples/btmp \
${DESTDIR}${PREFIX}/${EGDIR}/btmp
${INSTALL_DATA} ${WRKSRC}/examples/wtmp \
${DESTDIR}${PREFIX}/${EGDIR}/wtmp
${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron \
${DESTDIR}${PREFIX}/${EGDIR}
${INSTALL_DATA} ${WRKSRC}/examples/logrotate.service \
${DESTDIR}${PREFIX}/${EGDIR}
.include "../../devel/popt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"