summaryrefslogtreecommitdiffstats
path: root/sysutils/logrotate/Makefile
blob: 93260de7042d5d9b5bbfa018c7d41bb2d758f3db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# New ports collection makefile for:	logrotate
# Date Created:				29 Dec 1999
# Whom:					Yuan-Chen Cheng <ycheng@sinica.edu.tw>
#
# $FreeBSD$
#

PORTNAME=	logrotate
PORTVERSION=	3.3
CATEGORIES=	sysutils
MASTER_SITES=	ftp://ftp.redhat.com/pub/redhat/current/SRPMS/SRPMS/ \
		ftp://ftp.cdrom.com/pub/linux/redhat/current/SRPMS/SRPMS/
EXTRACT_SUFX=	-1.src.rpm

MAINTAINER=	ycheng@sinica.edu.tw

BUILD_DEPENDS=	${LOCALBASE}/bin/rpm2cpio:${PORTSDIR}/misc/rpm
LIB_DEPENDS=	popt.0:${PORTSDIR}/devel/popt

USE_GMAKE=	yes
MAN8=		logrotate.8
MANCOMPRESSED=	no

do-extract:
	@${RM} -rf ${WRKDIR}
	@${MKDIR} ${WRKDIR}
	@rpm2cpio ${_DISTDIR}${DISTFILES} | (cd ${WRKDIR}; cpio -i)
	@tar -xzf ${WRKDIR}/${DISTNAME}.tar.gz -C ${WRKDIR}

post-install:
	@${MKDIR} ${PREFIX}/etc/logrotate.d
	@${SED} -e 's|__PREFIX__|${PREFIX}|' \
		< ${FILESDIR}/logrotate.conf.sample > ${PREFIX}/etc/logrotate.conf.sample
	@${INSTALL_DATA} ${FILESDIR}/syslog.sample ${PREFIX}/etc/logrotate.d/

.include <bsd.port.mk>
OpenPOWER on IntegriCloud