--- shttpd-1.35.ebuild 2007-07-20 20:17:33.000000000 +0100 +++ shttpd-1.38.ebuild 2007-07-20 20:18:12.000000000 +0100 @@ -11,7 +11,7 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" -IUSE="ssl cgi threads dmalloc" +IUSE="ssl cgi threads dmalloc auth debug" DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) dmalloc? ( >=dev-libs/dmalloc-5.3.0 )" @@ -24,7 +24,14 @@ if use ssl ; then libs="${libs} -lcrypto -lssl" - append-flags -DWITH_SSL + else + append-flags -DNO_SSL + fi + + if use debug ; then + append-flags -D_DEBUG + else + append-flags -DNDEBUG fi if use dmalloc ; then @@ -33,20 +40,23 @@ fi use cgi || append-flags -DNO_CGI + use auth || append-flags -DNO_AUTH use threads && append-flags -DMT - append-flags -DCONFIG=\"/etc/${PN}/${PN}.conf\" -DWITH_PUT_AND_DELETE - echo "${CC} ${CFLAGS} ${PN}.c -o ${PN} ${LDFLAGS} ${libs}" - ${CC} ${CFLAGS} ${PN}.c -o ${PN} ${LDFLAGS} ${libs} || die "compile failure" + cd src + append-flags -ldl -DCONFIG=\"\\\"/etc/${PN}/${PN}.conf\\\"\" -DWITH_PUT_AND_DELETE + make unix } src_install() { + cd src keepdir /var/log/${PN} dosbin ${PN} || die doman ${PN}.1 || die insinto /etc/${PN} - doins ${FILESDIR}/${PN}.conf ${PN}.pem || die +# doins ${FILESDIR}/${PN}.conf ${PN}.pem || die + doins ${FILESDIR}/${PN}.conf || die # generate your own .pem file now insinto /etc/xinetd.d newins ${FILESDIR}/${PN}.xinetd ${PN} || die