# $Id: Portfile,v 1.3 2005/03/15 00:08:19 mww Exp $

PortSystem 1.0

name			libpub
version			0.35
revision		2
categories		devel
platforms		darwin
maintainers		mww@opendarwin.org
description		library of C functions for various purposes.
long_description	${description}

homepage		http://liw.iki.fi/liw/programs
master_sites	http://liw.iki.fi/liw/download/
distname		publib-${version}
checksums		md5 843a8914a103d39a40219944f167c75b
patchfiles		patch-cfg.c \
				patch-lsm_check_entry.c \
				patch-Makefile.in

worksrcdir		${worksrcdir}/framework

set pre /Library/OpenDarwin/Frameworks/${name}.framework/Versions/${version}

build.args		libdir=${pre}/Libraries

destroot.destdir	prefix=${destroot}${prefix} \
				mandir=${destroot}${prefix}/share/man \
				libdir=${destroot}${pre}/Libraries \
				incdir=${destroot}${pre}/Includes

post-destroot {
	system "find ${workpath} -name \\*.3 -exec install -m 644 {} \
		${destroot}${prefix}/share/man/man3 \\;"
	file delete ${destroot}${prefix}/share/man/man3/hash.3
	system "cd ${destroot}${pre}/.. && ln -s ${version} Current"
	system "cd ${destroot}${pre}/../.. && \
		ln -s Versions/Current/Headers && \
		ln -s Versions/Current/Libraries"
}
