# $Id: Portfile 67176 2010-04-30 18:48:54Z rmsfisher@macports.org $

PortSystem 1.0
PortGroup	archcheck 1.0

name	    	cdrtools
version		2.01.01a78
categories  	sysutils
platforms		darwin
description     ISO 9660 filesystem and CD creation tools
long_description	The cdrtools software includes programs to create \
		 	and/or extract ISO 9660 filesystems, verify their \
			integrity, and write them to a disc. \
			Note, this port conflicts with the dvdrtools port.
homepage	http://cdrecord.berlios.de/old/private/cdrecord.html
maintainers	gmail.com:bytestorm openmaintainer
master_sites    ftp://ftp.berlios.de/pub/cdrecord/alpha/ \
		ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/alpha/
checksums           md5     c6dc28ff6ad72577f4245c6ca4d5e455 \
                    sha1    39643e00a37b1a2c38e6190675251b793ca97225 \
                    rmd160  8fcaf22c1032e1cc88426804530ee6f971b6625e

use_bzip2	yes

worksrcdir	cdrtools-2.01.01

depends_build	port:smake

depends_lib	port:gettext

archcheck.files	lib/libintl.dylib

post-patch {
	reinplace "s|/opt/schily|${prefix}|g" \
		${worksrcpath}/DEFAULTS/Defaults.darwin \
		${worksrcpath}/DEFAULTS/Defaults.mac-os10 \
		${worksrcpath}/DEFAULTS_ENG/Defaults.darwin \
		${worksrcpath}/DEFAULTS_ENG/Defaults.mac-os10 \
		${worksrcpath}/libfind/find.c \
		${worksrcpath}/libfind/find_main.c \
		${worksrcpath}/librscg/scsi-remote.c \
		${worksrcpath}/TEMPLATES/Defaults.gcc
}

use_configure	no

build.cmd	smake

use_parallel_build no

destroot.args   DEFINSUSR=root DEFINSGRP=wheel INS_BASE=${prefix} MANDIR=share/man

livecheck.url   ftp://ftp.berlios.de/pub/cdrecord/alpha/
livecheck.regex "${name}-((\\d+(?:\\.\\d+)*)a(\\d+))${extract.suffix}"
