diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-04-22 19:15:12 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-04-22 19:15:12 +0000 |
commit | ed2d2be3dbcac3bde000f4d89f3ae5836cd53b93 (patch) | |
tree | ea35ca7703e69b2f955232964f66c73b9338e847 /net-proxy/middleman | |
parent | Adding pcmcia flag. Closes #90025, Cheers Georgi (diff) | |
download | gentoo-2-ed2d2be3dbcac3bde000f4d89f3ae5836cd53b93.tar.gz gentoo-2-ed2d2be3dbcac3bde000f4d89f3ae5836cd53b93.tar.bz2 gentoo-2-ed2d2be3dbcac3bde000f4d89f3ae5836cd53b93.zip |
www-proxy -> net-proxy
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-proxy/middleman')
-rw-r--r-- | net-proxy/middleman/ChangeLog | 115 | ||||
-rw-r--r-- | net-proxy/middleman/Manifest | 10 | ||||
-rw-r--r-- | net-proxy/middleman/files/conf.d/mman | 7 | ||||
-rw-r--r-- | net-proxy/middleman/files/digest-middleman-2.0.1 | 1 | ||||
-rw-r--r-- | net-proxy/middleman/files/digest-middleman-2.0.1-r2 | 1 | ||||
-rwxr-xr-x | net-proxy/middleman/files/init.d/mman | 38 | ||||
-rw-r--r-- | net-proxy/middleman/files/middleman-2.0.1-gcc-34.patch | 33 | ||||
-rw-r--r-- | net-proxy/middleman/files/middleman-2.0.1-putlog-fix.patch | 155 | ||||
-rw-r--r-- | net-proxy/middleman/metadata.xml | 22 | ||||
-rw-r--r-- | net-proxy/middleman/middleman-2.0.1-r2.ebuild | 78 | ||||
-rw-r--r-- | net-proxy/middleman/middleman-2.0.1.ebuild | 73 |
11 files changed, 533 insertions, 0 deletions
diff --git a/net-proxy/middleman/ChangeLog b/net-proxy/middleman/ChangeLog new file mode 100644 index 000000000000..c48f91a7c5ad --- /dev/null +++ b/net-proxy/middleman/ChangeLog @@ -0,0 +1,115 @@ +# ChangeLog for www-proxy/middleman +# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/middleman/ChangeLog,v 1.1 2005/04/22 19:15:11 mrness Exp $ + + 22 Apr 2005; Alin Nastac <mrness@gentoo.org> : + Rename category & herd www-proxy to net-proxy + + 06 Apr 2005; Alin Nastac <mrness@gentoo.org> + -files/middleman-1.9.1-makefile.patch, + +files/middleman-2.0.1-gcc-34.patch, -middleman-1.9.1-r1.ebuild, + -middleman-2.0.1-r1.ebuild, middleman-2.0.1-r2.ebuild: + Fix compilation on gcc-3.4 and mark stable on x86. Remove obsolete versions. + + 05 Sep 2004; Sven Wegener <swegener@gentoo.org> : + Fixed ChangeLog header. + + 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org> + middleman-2.0.1-r1.ebuild, middleman-2.0.1-r2.ebuild: + Masked middleman-2.0.1-r2.ebuild stable for ppc + + 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org> + middleman-2.0.1-r1.ebuild: + Masked middleman-2.0.1-r1.ebuild stable for ppc + +*middleman-1.9.1-r1 (15 Aug 2004) + + 15 Aug 2004; Stuart Herbert <stuart@gentoo.org> +metadata.xml, + +files/middleman-1.9.1-makefile.patch, + +files/middleman-2.0.1-putlog-fix.patch, +files/conf.d/mman, + +files/init.d/mman, +middleman-1.9.1-r1.ebuild, +middleman-2.0.1-r1.ebuild, + +middleman-2.0.1-r2.ebuild, +middleman-2.0.1.ebuild: + Moved from net-www/middleman to www-proxy/middleman. + +*middleman-2.0.1-r2 (28 Jul 2004) + + 28 Jul 2004; <solar@gentoo.org> middleman-2.0.1-r2.ebuild, + files/middleman-2.0.1-putlog-fix.patch: + patched putlog() function which would cause segfaults on really long url's. + patch source comes from battousai@gentoo + + 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org> + middleman-1.9.1-r1.ebuild, middleman-2.0.1-r1.ebuild, + middleman-2.0.1.ebuild: + virtual/glibc -> virtual/libc + + 25 Apr 2004; David Holm <dholm@gentoo.org> middleman-2.0.1-r1.ebuild: + Added to ~ppc. + + 23 Apr 2004; Stuart Herbert <stuart@gentoo.org> files/conf.d/mman: + Added missing SECTION to conf.d file + + 23 Apr 2004; Stuart Herbert <stuart@gentoo.org> files/init.d/mman: + Added missing start up options to the init.d file + +*middleman-2.0.1-r1 (23 Apr 2004) + + 23 Apr 2004; Stuart Herbert <stuart@gentoo.org> middleman-2.0.1-r1.ebuild: + Config files now go into /etc/mman, and not /etc/mman/mman ;-) Fix for bug + #47376; thanks to Malte S. Stretz <gentoo-contrib@msquadrat.de> + +*middleman-2.0.1 (29 Mar 2004) + + 29 Mar 2004; <solar@gentoo.org> middleman-1.9.1-r1.ebuild, + middleman-1.9.1.ebuild, middleman-2.0.1.ebuild: + version bump 2.0.1... removed old 1.9.1 from portage tree + +*middleman-1.9.1-r1 (28 Nov 2003) + + 28 Nov 2003; <solar@gentoo.org> middleman-1.9.1-r1.ebuild, + middleman-1.9.ebuild, files/middleman-1.9.1-makefile.patch, + files/init.d/mman: + updated initscripts and added a small patch to its makefile so it would + install into the correct /etc/mman dir + +*middleman-1.9.1 (11 Nov 2003) + + 11 Nov 2003; <solar@gentoo.org> middleman-1.8.1.ebuild, + middleman-1.8.2.ebuild, middleman-1.9.1.ebuild: + version bump + + 09 Nov 2003; zhen <zhen@gentoo.org> middleman-1.9.ebuild: + changed sanbox to sandbox in patch msg + + 25 Oct 2003; <solar@gentoo.org> middleman-1.9.ebuild: + bumping to stable + +*middleman-1.9 (11 Sep 2003) + + 11 Sep 2003; <solar@gentoo.org> middleman-1.9.ebuild: + version bumpage, The changes in this release are as follows: + Support for ICP (Internet cache protocol) was added, making it + possible to arrange several proxies in a hierarchy and share cached + objects. It is now possible to specify multiple directories for + cached objects to be stored. The 'Host' and 'File' options in most + configuration sections were removed in favor of enabling/ disable + profiles based on the URL requested. A workaround was added for a + bug triggered by improper headers sent by Apache 1.3 when a tar.gz + file was requested by a client that doesn't support gzip + compression. + +*middleman-1.8.2 (11 Aug 2003) + + 11 Aug 2003; <solar@gentoo.org> middleman-1.8.2.ebuild: + version bump + + 26 Jul 2003; <solar@gentoo.org> middleman-1.8.1.ebuild: + Added missing support for pam and zlib, next version will have better + sysloging features + +*middleman-1.8.1 (25 Jul 2003) + + 25 Jul 2003; <solar@gentoo.org> metadata.xml, middleman-1.8.1.ebuild, + files/conf.d/mman, files/init.d/mman: + Initial import of middle-man filtering proxy to gentoo + diff --git a/net-proxy/middleman/Manifest b/net-proxy/middleman/Manifest new file mode 100644 index 000000000000..b63d4ac18bd9 --- /dev/null +++ b/net-proxy/middleman/Manifest @@ -0,0 +1,10 @@ +MD5 09a107b85bc5676b9d532807cdff8647 middleman-2.0.1-r2.ebuild 2012 +MD5 8c493d7fe8efde573c25dcdee34b0711 middleman-2.0.1.ebuild 1831 +MD5 c4f44329733723815da6abc01f959236 ChangeLog 4390 +MD5 b3089a22f33a39676bb267f8d3d59c07 metadata.xml 1012 +MD5 900b7f67e15e2549a495775afebed6b9 files/digest-middleman-2.0.1-r2 67 +MD5 22c116e20fcb12dbd46cbb38125f2e68 files/middleman-2.0.1-putlog-fix.patch 3671 +MD5 900b7f67e15e2549a495775afebed6b9 files/digest-middleman-2.0.1 67 +MD5 bb883e451ed1555f5171f3b196874712 files/middleman-2.0.1-gcc-34.patch 1091 +MD5 cca46008c83644944b263535a7d2ead1 files/conf.d/mman 138 +MD5 9505c222e2602ecc27c6e9ecdd1c08f5 files/init.d/mman 968 diff --git a/net-proxy/middleman/files/conf.d/mman b/net-proxy/middleman/files/conf.d/mman new file mode 100644 index 000000000000..3ed0e52c7b8e --- /dev/null +++ b/net-proxy/middleman/files/conf.d/mman @@ -0,0 +1,7 @@ +# +# MiddleMan filtering proxy server +# +LOGFILE=/var/log/mman.log +CONFIG=/etc/mman/config.xml +LOGLEVEL=32767 +SECTION=/etc/mman/section.xml diff --git a/net-proxy/middleman/files/digest-middleman-2.0.1 b/net-proxy/middleman/files/digest-middleman-2.0.1 new file mode 100644 index 000000000000..05e783e77584 --- /dev/null +++ b/net-proxy/middleman/files/digest-middleman-2.0.1 @@ -0,0 +1 @@ +MD5 8bf596a4810184c8f7534d63b1e94cf1 middleman-2.0.1.tar.gz 743404 diff --git a/net-proxy/middleman/files/digest-middleman-2.0.1-r2 b/net-proxy/middleman/files/digest-middleman-2.0.1-r2 new file mode 100644 index 000000000000..05e783e77584 --- /dev/null +++ b/net-proxy/middleman/files/digest-middleman-2.0.1-r2 @@ -0,0 +1 @@ +MD5 8bf596a4810184c8f7534d63b1e94cf1 middleman-2.0.1.tar.gz 743404 diff --git a/net-proxy/middleman/files/init.d/mman b/net-proxy/middleman/files/init.d/mman new file mode 100755 index 000000000000..9412c0ed869a --- /dev/null +++ b/net-proxy/middleman/files/init.d/mman @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/middleman/files/init.d/mman,v 1.1 2005/04/22 19:15:11 mrness Exp $ + + +opts="depend checkconfig stop start" + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/mman/config.xml ]; then + eerror "You need to create a /etc/mman/config.xml first." + return 1 + fi +} + +stop() { + ebegin "Stopping mman" + start-stop-daemon --stop --quiet --pidfile /var/run/mman.pid + result=$? + eend $result +} + +start() { + local myopts="-p /var/run/mman.pid" + [ "${CONFIG}" != "" ] && myopts="${myopts} -c ${CONFIG}" + [ "${LOGFILE}" != "" ] && myopts="${myopts} -l ${LOGFILE}" + [ "${LOGLEVEL}" != "" ] && myopts="${myopts} -d ${LOGLEVEL}" + [ "${SECTION}" != "" ] && myopts="${myopts} -s ${SECTION}" + + ebegin "Starting mman" + start-stop-daemon --start --quiet --exec /usr/bin/mman -- ${myopts} + result=$? + eend $result +} diff --git a/net-proxy/middleman/files/middleman-2.0.1-gcc-34.patch b/net-proxy/middleman/files/middleman-2.0.1-gcc-34.patch new file mode 100644 index 000000000000..0e046b043413 --- /dev/null +++ b/net-proxy/middleman/files/middleman-2.0.1-gcc-34.patch @@ -0,0 +1,33 @@ +diff -Nru middleman-2.0.1.orig/src/main.c middleman-2.0.1/src/main.c +--- middleman-2.0.1.orig/src/main.c 2004-03-12 00:28:57.000000000 +0200 ++++ middleman-2.0.1/src/main.c 2005-04-06 21:12:10.580927424 +0300 +@@ -407,7 +407,7 @@ + #else + pcre_free = xfree; + // grr... argument to malloc is int on some systems, and long on others +- (void *) pcre_malloc = (void *) xmalloc; ++ (void *&) pcre_malloc = (void *) xmalloc; + #endif + + global->dns_cache = hash_create(DNS_HASH_SIZE); +diff -Nru middleman-2.0.1.orig/src/stats.c middleman-2.0.1/src/stats.c +--- middleman-2.0.1.orig/src/stats.c 2004-03-12 00:27:16.000000000 +0200 ++++ middleman-2.0.1/src/stats.c 2005-04-06 21:11:29.636151976 +0300 +@@ -175,7 +175,7 @@ + + sc.name = stat; + sc.type = type | StatCounter::CALLBACK; +- (void *)sc.value.callback = (void *)cb; ++ (void *&)sc.value.callback = (void *)cb; + + counter_list.push_back(sc); + +@@ -193,7 +193,7 @@ + + sc.name = stat; + sc.type = type | StatCounter::CALLBACK; +- (void *)sc.value.callback = (void *)cb; ++ (void *&)sc.value.callback = (void *)cb; + + counter_list.push_back(sc); + diff --git a/net-proxy/middleman/files/middleman-2.0.1-putlog-fix.patch b/net-proxy/middleman/files/middleman-2.0.1-putlog-fix.patch new file mode 100644 index 000000000000..27f5931378a8 --- /dev/null +++ b/net-proxy/middleman/files/middleman-2.0.1-putlog-fix.patch @@ -0,0 +1,155 @@ +--- middleman-2.0.1/src/log.c.orig 2004-07-28 15:42:46.389571608 -0400 ++++ middleman-2.0.1/src/log.c 2004-07-28 15:43:11.422765984 -0400 +@@ -30,6 +30,8 @@ + #include <syslog.h> + #endif /* USE_SYSLOG */ + ++#define LINELEN 512 ++ + int logfd = -1; + extern int loglevel; + extern int daemonize; +@@ -46,105 +48,99 @@ + time_t tt; + struct tm *tv; + #endif +- int ret; + va_list valist; +- char buf[1024], *ptr; ++ char ptr[LINELEN], tmp[LINELEN]; + + pthread_mutex_lock(&logfile_lock); + +- ptr = buf; +- + #ifndef USE_SYSLOG + time(&tt); + tv = localtime(&tt); + +- ptr += strftime(ptr, 24, TIMEFORMAT, tv); ++ strftime(ptr, 24, TIMEFORMAT, tv); ++ sprintf(tmp, " [%u] ", (unsigned int) getpid()); ++ strcat(ptr, tmp); + +- ptr += sprintf(ptr, " [%u] ", (unsigned int) getpid()); + #endif + + switch (level) { + case MMLOG_REQUEST: +- ptr += sprintf(ptr, "request: "); ++ strcat(ptr, "request: "); + break; + case MMLOG_NETWORK: +- ptr += sprintf(ptr, "network: "); ++ strcat(ptr, "network: "); + break; + case MMLOG_FILTER: +- ptr += sprintf(ptr, "url filter: "); ++ strcat(ptr, "url filter: "); + break; + case MMLOG_HEADER: +- ptr += sprintf(ptr, "header: "); ++ strcat(ptr, "header: "); + break; + case MMLOG_MIME: +- ptr += sprintf(ptr, "mime filter: "); ++ strcat(ptr, "mime filter: "); + break; + case MMLOG_COOKIE: +- ptr += sprintf(ptr, "cooke filter: "); ++ strcat(ptr, "cooke filter: "); + break; + case MMLOG_REDIRECT: +- ptr += sprintf(ptr, "redirect: "); ++ strcat(ptr, "redirect: "); + break; + case MMLOG_TEMPLATE: +- ptr += sprintf(ptr, "template: "); ++ strcat(ptr, "template: "); + break; + case MMLOG_KEYWORDS: +- ptr += sprintf(ptr, "keyword filter: "); ++ strcat(ptr, "keyword filter: "); + break; + case MMLOG_REWRITE: +- ptr += sprintf(ptr, "rewriting: "); ++ strcat(ptr, "rewriting: "); + break; + case MMLOG_LIMITS: +- ptr += sprintf(ptr, "limits: "); ++ strcat(ptr, "limits: "); + break; + case MMLOG_PREFETCH: +- ptr += sprintf(ptr, "prefetch: "); ++ strcat(ptr, "prefetch: "); + break; + case MMLOG_CACHE: +- ptr += sprintf(ptr, "cache: "); ++ strcat(ptr, "cache: "); + break; + case MMLOG_ICP: +- ptr += sprintf(ptr, "ICP: "); ++ strcat(ptr, "ICP: "); + break; + case MMLOG_FORWARD: +- ptr += sprintf(ptr, "forwarding: "); ++ strcat(ptr, "forwarding: "); + break; + case MMLOG_SECURITY: +- ptr += sprintf(ptr, "security: "); ++ strcat(ptr, "security: "); + break; + case MMLOG_WARN: +- ptr += sprintf(ptr, "warning: "); ++ strcat(ptr, "warning: "); + break; + case MMLOG_ERROR: +- ptr += sprintf(ptr, "error: "); ++ strcat(ptr, "error: "); + break; + case MMLOG_DEBUG: +- ptr += sprintf(ptr, "debug: "); ++ strcat(ptr, "debug: "); + break; + } + + va_start(valist, fmt); +- ret = vsnprintf(ptr, sizeof(buf) - (ptr - buf), fmt, valist); ++ vsnprintf(tmp, LINELEN - strlen(ptr) - 1, fmt, valist); + va_end(valist); ++ s_strncat(ptr, tmp, LINELEN - strlen(ptr) - 1); ++ strcat(ptr, "\n"); + +- ptr += (ret > sizeof(buf) || ret == -1) ? sizeof(buf) - (ptr - buf) : ret; + + if (level != MMLOG_DEBUG) +- logbuffer_add(global->logbuffer, buf); +- +- if (*(ptr - 1) != '\n') { +- *(ptr++) = '\n'; +- *ptr = '\0'; +- } ++ logbuffer_add(global->logbuffer, ptr); + + if ((loglevel & level) && daemonize == FALSE) +- printf("%s", buf); ++ printf("%s", ptr); + + if (!*logfile || !(loglevel & level)) + goto out; + + #ifdef USE_SYSLOG +- syslog(LOG_INFO, "%s", buf); ++ syslog(LOG_INFO, "%s", ptr); + #else + if (logfd == -1) { + logfd = open(logfile, O_RDWR | O_CREAT, 0640); +@@ -154,7 +150,7 @@ + lseek(logfd, 0, SEEK_END); + } + +- write(logfd, buf, strlen(buf)); ++ write(logfd, ptr, strlen(ptr)); + #endif + out: + pthread_mutex_unlock(&logfile_lock); diff --git a/net-proxy/middleman/metadata.xml b/net-proxy/middleman/metadata.xml new file mode 100644 index 000000000000..5a66385e992a --- /dev/null +++ b/net-proxy/middleman/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>hardened</herd> + <maintainer> + <email>solar@gentoo.org</email> + <description>Primary Maintainer</description> + </maintainer> +<longdescription> +Middleman is a robust proxy server with many features designed to +remove unwanted content, increase privacy, and to simply make surfing +the Web a more pleasant experience. Some of the highlights include +banner and popup blocking, HTTP and FTP content caching, NTLM and +Basic authentication when forwarding through another proxy server, +regular expression substitution in downloaded files and HTTP headers, +regular expression substitution on requested URLs, many URL commands +to temporarily change the proxy settings or to view information about +a requested file, complete support for HTTP/1.1 including persistent +connections and gzip encoding, and an intutive Web interface for +configuring the proxy. +</longdescription> +</pkgmetadata> diff --git a/net-proxy/middleman/middleman-2.0.1-r2.ebuild b/net-proxy/middleman/middleman-2.0.1-r2.ebuild new file mode 100644 index 000000000000..b076fba3e467 --- /dev/null +++ b/net-proxy/middleman/middleman-2.0.1-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/middleman/middleman-2.0.1-r2.ebuild,v 1.1 2005/04/22 19:15:11 mrness Exp $ + +inherit eutils + +DESCRIPTION="Advanced HTTP/1.1 proxy server with features designed to increase privacy and remove unwanted content" +SRC_URI="mirror://sourceforge/middle-man/${P}.tar.gz" +HOMEPAGE="http://sourceforge.net/projects/middle-man" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ppc" +IUSE="${IUSE} pam zlib" + +DEPEND="virtual/libc + dev-libs/libpcre + pam? ( sys-libs/pam ) + zlib? ( sys-libs/zlib ) +" + +src_unpack() { + unpack ${A} + [ -f ${FILESDIR}/${P}-gentoo.diff ] && epatch ${FILESDIR}/${P}-gentoo.diff + cd ${S} + epatch ${FILESDIR}/${P}-putlog-fix.patch + epatch ${FILESDIR}/${P}-gcc-34.patch +} + +src_compile() { + local myconf="" + MAKEOPTS="-j1" + + cd ${S} + for opt in ${IUSE}; do + use ${opt} && + myconf="${myconf} --enable-${opt}" || + myconf="$myconf --disable-${opt}" + done + + econf --sysconfdir=/etc ${myconf} || die "econf failed: ${myconf}" + emake || die "emake failed" +} + +src_install() { + cd ${S} + # mkdir -p ${D}/usr/share/man/man8/ + make DESTDIR="${D}" install || die "einstall failed" + + dodoc CHANGELOG COPYING + dohtml README.html + + insinto /etc/conf.d + newins ${FILESDIR}/conf.d/mman mman + exeinto /etc/init.d + newexe ${FILESDIR}/init.d/mman mman +} + +#pkg_preinst() { +# enewgroup mman 8080 +# enewuser mman 8080 +#} + +pkg_postinst() { + #einfo "A mman user has been added to your system if one did not already exist" + einfo "-" + einfo "Note: init/conf scripts and a sample config has been provided for you." + einfo "They can be found at or in /etc/conf.d/mman /etc/init.d/mman /etc/mman/" + + if [ -d /etc/mman/mman ]; then + ewarn "A previous version of this ebuild installed the config scripts into" + ewarn + ewarn " /etc/mman/mman/" + ewarn + ewarn "by mistake. Please move these files into /etc/mman instead, and remove" + ewarn "your /etc/mman/mman/ directory." + fi +} diff --git a/net-proxy/middleman/middleman-2.0.1.ebuild b/net-proxy/middleman/middleman-2.0.1.ebuild new file mode 100644 index 000000000000..44dfa096577f --- /dev/null +++ b/net-proxy/middleman/middleman-2.0.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/middleman/middleman-2.0.1.ebuild,v 1.1 2005/04/22 19:15:11 mrness Exp $ + +inherit eutils + +DESCRIPTION="Advanced HTTP/1.1 proxy server with features designed to increase privacy and remove unwanted content" +SRC_URI="mirror://sourceforge/middle-man/${P}.tar.gz" +HOMEPAGE="http://sourceforge.net/projects/middle-man" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" +IUSE="${IUSE} pam zlib" + +#S=${WORKDIR}/ + +DEPEND="virtual/libc + dev-libs/libpcre + pam? ( sys-libs/pam ) + zlib? ( sys-libs/zlib ) +" + +src_unpack() { + unpack ${A} + [ -f ${FILESDIR}/${P}-gentoo.diff ] && epatch ${FILESDIR}/${P}-gentoo.diff + cd ${S} + #if [ "$PV" = "1.9" ]; then + # einfo "Patching Makefile.in to avoid sandbox problems" + # sed -i -e s:"INSTALL) -d /var":"INSTALL) -d \$(DESTDIR)/var":g Makefile.in + #fi +} + +src_compile() { + local myconf="" + MAKEOPTS="-j1" + + cd ${S} + for opt in ${IUSE}; do + use ${opt} && + myconf="${myconf} --enable-${opt}" || + myconf="$myconf --disable-${opt}" + done + + econf --sysconfdir=/etc/mman ${myconf} || die "econf failed: ${myconf}" + emake || die "emake failed" +} + +src_install() { + cd ${S} + # mkdir -p ${D}/usr/share/man/man8/ + make DESTDIR="${D}" install || die "einstall failed" + + dodoc CHANGELOG COPYING + dohtml README.html + + insinto /etc/conf.d + newins ${FILESDIR}/conf.d/mman mman + exeinto /etc/init.d + newexe ${FILESDIR}/init.d/mman mman +} + +#pkg_preinst() { +# enewgroup mman 8080 +# enewuser mman 8080 +#} + +pkg_postinst() { + #einfo "A mman user has been added to your system if one did not already exist" + einfo "-" + einfo "Note: init/conf scripts and a sample config has been provided for you." + einfo "They can be found at or in /etc/conf.d/mman /etc/init.d/mman /etc/mman/" +} |