# $Id: Portfile,v 1.4 2006/01/25 15:13:46 markd Exp $

PortSystem      1.0

name				logrotate
version				3.7

categories			sysutils
maintainers			markd@opendarwin.org
platforms			darwin

description			Rotates, compresses, and mails system logs

long_description	        The logrotate utility simplifies the administration of log \
				files.  It provides automatic logfile rotation, compression, \
				removal, and mailing. 

distname			${name}_${version}.orig
worksrcdir                      ${name}-${version}

build.cmd			make POPT_DIR=${prefix}/include

homepage			http://packages.debian.org/stable/admin/logrotate
					
master_sites		        http://ftp.debian.org/debian/pool/main/l/logrotate
checksums			${distname}${extract.suffix} md5 bf0de3a495294300f32e71f136119c41 \
					logrotate_3.7-5.diff.gz md5 291d015a7fddd86ee2da4cb7bbb12b19

patch_sites			http://ftp.debian.org/debian/pool/main/l/logrotate/
patchfiles			logrotate_3.7-5.diff.gz

depends_build			port:popt

use_configure			no

build.args			POPT_DIR=${prefix}/include LDFLAGS="-L${prefix}/lib -lpopt"

destroot {
		xinstall -m 755 ${worksrcpath}/logrotate ${destroot}${prefix}/sbin
		xinstall -m 755 ${worksrcpath}/examples/logrotate-default ${destroot}${prefix}/etc/logrotate.conf
		xinstall -d ${destroot}${prefix}/man/man8
		xinstall -m 755 ${worksrcpath}/logrotate.8 ${destroot}${prefix}/man/man8
}
