# $Id: Portfile,v 1.1 2004/08/13 15:01:52 olegb Exp $

PortSystem 1.0
name		arj
version		3.10.21
categories	archivers sysutils
description	create and extract files from dos .arj archives
maintainers	jc@crazic.ru
long_description ${description}
homepage	http://arj.sourceforge.net/
master_sites	http://cesnet.dl.sourceforge.net/sourceforge/arj
checksums	md5 887d400ca6048516d4d447e1649af396
depends_build	bin:gmake:gmake bin:autoconf:autoconf

patchfiles	patch-arjcrypt.c patch-conifgure.in patch-environ.c patch-makefile.in patch-uxspec.c

pre-configure {
	system "cd ${build.dir}/gnu; autoconf"
}

configure {
	system "cd ${build.dir}/gnu; ./configure --prefix=${prefix}"
}

pre-build {
	system "gmake prepare"
}

destroot	{
	xinstall -m 755 -d ${destroot}/${prefix}/bin
	xinstall -m 755 -d ${destroot}/${prefix}/share/man/man1
	xinstall -m 755 -d ${destroot}/${prefix}/share/doc/arj

	file copy ${build.dir}/en/rs/arj/arj ${build.dir}/en/rs/arjdisp/arjdisp ${build.dir}/en/rs/arjsfx/arjsfx ${build.dir}/en/rs/arjsfxjr/arjsfxjr ${build.dir}/en/rs/arjsfxv/arjsfxv ${build.dir}/en/rs/rearj/rearj ${build.dir}/en/rs/register/arj-register ${build.dir}/en/rs/sfxstub/sfxstub ${destroot}/${prefix}/bin

	file copy ${build.dir}/resource/en/arj-register.1 ${build.dir}/resource/en/arj.1 ${build.dir}/resource/en/arjdisp.1 ${build.dir}/resource/en/rearj.1 ${destroot}/${prefix}/share/man/man1
	file copy ${build.dir}/resource/en/arjl.txt ${build.dir}/resource/en/arjs.txt ${build.dir}/resource/en/file_id.diz ${build.dir}/resource/en/history.txt ${build.dir}/resource/en/readme.txt ${build.dir}/resource/en/unix.txt ${destroot}/${prefix}/share/doc/arj

}
