Import mod_text2html 1.0.
Submitted by Xavier Santolaria <xavier@santolaria.net>. mod_text2html is an Apache module. It is written in C and was designed to replace Apache's internal text/plain handler.
This commit is contained in:
parent
b2055466bd
commit
7b94877361
39
www/mod_text2html/Makefile
Normal file
39
www/mod_text2html/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2003/05/29 22:45:38 naddy Exp $
|
||||
|
||||
COMMENT= "Apache module designed to replace text/plain handler"
|
||||
|
||||
# This port currently only works with archs supporting dynamic loading
|
||||
# and has Apache that supports DSO's.
|
||||
NOT_FOR_ARCHS= ${NO_SHARED_ARCHS}
|
||||
|
||||
DISTNAME= mod_text2html-1.0
|
||||
CATEGORIES= www
|
||||
|
||||
HOMEPAGE= http://software.tangent.org/projects.pl?view=mod_text2html
|
||||
MASTER_SITES= http://software.tangent.org/download/ \
|
||||
ftp://ftp.tangent.org/pub/apache/
|
||||
|
||||
MAINTAINER= Xavier Santolaria <xavier@santolaria.net>
|
||||
|
||||
# Apache Software License
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
APXS= /usr/sbin/apxs
|
||||
|
||||
do-build:
|
||||
cd ${WRKBUILD} && \
|
||||
${APXS} -c -o mod_text2html.so mod_text2html.c
|
||||
@sed 's,!!PREFIX!!,${PREFIX},' \
|
||||
< ${FILESDIR}/mod_text2html-enable \
|
||||
> ${WRKBUILD}/mod_text2html-enable
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKBUILD}/mod_text2html.so ${PREFIX}/lib
|
||||
${INSTALL_SCRIPT} ${WRKBUILD}/mod_text2html-enable ${PREFIX}/sbin
|
||||
|
||||
.include <bsd.port.mk>
|
3
www/mod_text2html/distinfo
Normal file
3
www/mod_text2html/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (mod_text2html-1.0.tar.gz) = 10b4aa407dab17d4723a15afd03922f2
|
||||
RMD160 (mod_text2html-1.0.tar.gz) = 202dde1c0a5e81c898e6891f6e9791bfd3c64ea4
|
||||
SHA1 (mod_text2html-1.0.tar.gz) = d730aaa5f5ed33021896388f10f3214ea3543f69
|
18
www/mod_text2html/files/mod_text2html-enable
Normal file
18
www/mod_text2html/files/mod_text2html-enable
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: mod_text2html-enable,v 1.1.1.1 2003/05/29 22:45:38 naddy Exp $
|
||||
|
||||
MODULE=!!PREFIX!!/lib/mod_text2html.so
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "You must be root to run this script."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f ${MODULE} ]; then
|
||||
echo "Cannot find mod_text2html module (${MODULE})"
|
||||
exit 1
|
||||
else
|
||||
echo "Enabling Layout module..."
|
||||
/usr/sbin/apxs -i -a -n text2html ${MODULE}
|
||||
fi
|
26
www/mod_text2html/pkg/DEINSTALL
Normal file
26
www/mod_text2html/pkg/DEINSTALL
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: DEINSTALL,v 1.1.1.1 2003/05/29 22:45:38 naddy Exp $
|
||||
|
||||
set -e
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONF=`apxs -q SYSCONFDIR`/httpd.conf
|
||||
MODULE=/usr/lib/apache/modules/mod_text2html.so
|
||||
|
||||
rm -f ${MODULE}
|
||||
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package you"
|
||||
echo "| need to perform these steps as root:"
|
||||
echo "|"
|
||||
echo "| edit ${CONF}"
|
||||
echo "| remove the line: LoadModule text2html_module"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| package at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
|
||||
exit 0
|
20
www/mod_text2html/pkg/DESCR
Normal file
20
www/mod_text2html/pkg/DESCR
Normal file
@ -0,0 +1,20 @@
|
||||
mod_text2html is an Apache module. It is written in C and was
|
||||
designed to replace Apache's internal text/plain handler
|
||||
(the core handler found in http_core.c). It has a couple
|
||||
of key points.
|
||||
|
||||
1) It converts newlines to <BR>.
|
||||
|
||||
2) If it finds valid URLs it turns them in <A HREF> (and does
|
||||
a good job of trying to not muddle up HTML that has
|
||||
been flagged as text).
|
||||
|
||||
3) It converts '<', '>', and '&' to HTML entities.
|
||||
|
||||
4) Using the same method as the Unix file utility it
|
||||
determines if the file is text in the first place. If it
|
||||
determines that it is not text it sends the files, but
|
||||
does so as application/octet-stream (so no nasty
|
||||
dumps of binary to the screen).
|
||||
|
||||
WWW: ${HOMEPAGE}
|
10
www/mod_text2html/pkg/MESSAGE
Normal file
10
www/mod_text2html/pkg/MESSAGE
Normal file
@ -0,0 +1,10 @@
|
||||
+---------------
|
||||
| To finish the install of mod_text2html, you need
|
||||
| to enable the module using the following command
|
||||
|
|
||||
| ${PREFIX}/sbin/mod_text2html-enable
|
||||
|
|
||||
| If you already have Apache running on your machine,
|
||||
| you should not use "apachectl restart" - instead,
|
||||
| you should fully stop and then restart the server.
|
||||
+---------------
|
3
www/mod_text2html/pkg/PLIST
Normal file
3
www/mod_text2html/pkg/PLIST
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/05/29 22:45:38 naddy Exp $
|
||||
lib/mod_text2html.so
|
||||
sbin/mod_text2html-enable
|
Loading…
Reference in New Issue
Block a user