# $Id$

PortSystem 1.0

name            mongoose
version         3.0
categories      www
maintainers     toby
description     easy to use web server
long_description \
	Easy to use web server for Windows and UNIX. Mongoose provides simple \
	and clean API for embedding it into existing programs. Targeting Web \
	application developers, embedded system developers, and people who \
	need to setup file sharing quickly.
homepage        http://code.google.com/p/mongoose/
platforms       darwin
license         MIT

master_sites    googlecode
extract.suffix  .tgz

checksums       rmd160  1e11c3d3015f316ad8e5722874035604be9e3a4c \
                sha256  018a7201e4d548e11a30b97f78ce1a02414a2f462bd12957b2247fdd7e865e22

worksrcdir      ${name}

patchfiles      patch-Makefile

post-patch {
	reinplace s|__CFLAGS__|${configure.cflags}| ${worksrcpath}/Makefile
}

use_configure   no

variant universal {}

build.target    mac
build.env       CC="${configure.cc} [get_canonical_archflags]"

destroot {
	xinstall -m 555 ${worksrcpath}/mongoose ${destroot}${prefix}/bin
	xinstall -m 444 ${worksrcpath}/mongoose.1 ${destroot}${prefix}/share/man/man1
}

test.run        yes

livecheck.distname default