diff options
author | Yoichi NAKAYAMA <yoichi@FreeBSD.org> | 2003-06-01 13:59:06 +0000 |
---|---|---|
committer | Yoichi NAKAYAMA <yoichi@FreeBSD.org> | 2003-06-01 13:59:06 +0000 |
commit | 0f93f77bc4f4e555f0d67e4356609e7cf2ce1b17 (patch) | |
tree | 944fff377666255f38385edfb2f58ae4bbeecc55 /www/tdiary | |
parent | 1da783e82c0d608fe15fa9f5d17e4e5adc1d9a64 (diff) | |
download | ports-0f93f77bc4f4e555f0d67e4356609e7cf2ce1b17.tar.gz ports-0f93f77bc4f4e555f0d67e4356609e7cf2ce1b17.zip |
Notes
Diffstat (limited to 'www/tdiary')
-rw-r--r-- | www/tdiary/Makefile | 69 | ||||
-rw-r--r-- | www/tdiary/distinfo | 1 | ||||
-rw-r--r-- | www/tdiary/files/tdiary-FreeBSD.sh.in | 136 | ||||
-rw-r--r-- | www/tdiary/pkg-descr | 10 | ||||
-rw-r--r-- | www/tdiary/pkg-message | 14 | ||||
-rw-r--r-- | www/tdiary/pkg-plist | 1 |
6 files changed, 231 insertions, 0 deletions
diff --git a/www/tdiary/Makefile b/www/tdiary/Makefile new file mode 100644 index 000000000000..c6a3f752fa59 --- /dev/null +++ b/www/tdiary/Makefile @@ -0,0 +1,69 @@ +# New ports collection makefile for: tdiary +# Date created: 21 May 2003 +# Whom: Fumihiko Kimura <jfkimura@yahoo.co.jp> +# +# $FreeBSD$ +# + +PORTNAME= tdiary +PORTVERSION= 1.5.4 +CATEGORIES= japanese ruby +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= sourceforge/${PORTNAME} +DISTNAME= ${PORTNAME}-full-${PORTVERSION:R}.${PORTVERSION:E} + +MAINTAINER= jfkimura@yahoo.co.jp +COMMENT= A Web-based diary system (like weblog) written in Ruby + +.if defined(WITH_TDIARY_UCONV) +RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv +.endif +.if defined(WITH_TDIARY_NORA) +RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/web/escape_ext.so:${PORTSDIR}/www/ruby-nora +.endif + +NO_BUILD= yes +USE_RUBY= yes + +TDIARYDIR= ${PREFIX}/share/examples/${PORTNAME} + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}.${PORTVERSION:E} + +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "=============================================================" + @${ECHO_MSG} "You may use the following options:" + @${ECHO_MSG} + @${ECHO_MSG} "WITH_TDIARY_UCONV=yes (with UTF-8 support : output_rdf.rb)" + @${ECHO_MSG} "WITH_TDIARY_NORA=yes (with Referer header support : disp_referrer.rb)" + @${ECHO_MSG} + @${ECHO_MSG} "=============================================================" + @${ECHO_MSG} + +do-install: + @if [ -d ${TDIARYDIR} ]; then ${RM} -rf ${TDIARYDIR}; fi + ${MKDIR} ${TDIARYDIR} + ${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \ + ${FILESDIR}/tdiary-FreeBSD.sh.in > ${TDIARYDIR}/tdiary-FreeBSD.sh + ${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh + ${CP} -pR ${WRKSRC}/ ${TDIARYDIR} +.if defined(WITH_TDIARY_UCONV) + ${INSTALL_DATA} ${WRKSRC}/misc/plugin/output_rdf.rb ${TDIARYDIR}/plugin +.endif +.if defined(WITH_TDIARY_NORA) + ${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin +.endif + @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR} + +post-install: + @cd ${WRKSRC} && ${FIND} . -type f -o -type l | ${SED} 's,^\.,share/examples/${PORTNAME},' | sort >> ${TMPPLIST} +.if defined(WITH_TDIARY_UCONV) + @cd ${WRKSRC} && ${ECHO} 'share/examples/${PORTNAME}/plugin/output_rdf.rb' >> ${TMPPLIST} +.endif +.if defined(WITH_TDIARY_NORA) + @cd ${WRKSRC} && ${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST} +.endif + @cd ${WRKSRC} && ${FIND} . -type d -depth | ${SED} 's,^\.,@dirrm share/examples/${PORTNAME},' >> ${TMPPLIST} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/www/tdiary/distinfo b/www/tdiary/distinfo new file mode 100644 index 000000000000..e26a1bd84787 --- /dev/null +++ b/www/tdiary/distinfo @@ -0,0 +1 @@ +MD5 (tdiary-full-1.5.4.tar.gz) = c2d87e40780d95d9e316db7c6774afc3 diff --git a/www/tdiary/files/tdiary-FreeBSD.sh.in b/www/tdiary/files/tdiary-FreeBSD.sh.in new file mode 100644 index 000000000000..77becc46560c --- /dev/null +++ b/www/tdiary/files/tdiary-FreeBSD.sh.in @@ -0,0 +1,136 @@ +#!/bin/sh +# +# tdiary-FreeBSD.sh - tDiary user directory copy script +# +# $FreeBSD$ +# +# usage: +# % /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh install +# or +# # /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh USERid +# + +USERNAME=$1 +DIARYDIR=diary +PUBLICHTML=public_html +PREFIX=@@@@PREFIX@@@@ +EXAMPLES=${PREFIX}/share/examples +HOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'` +HOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'` +HOMEDIR=`grep ^$1: /etc/passwd | cut -f6 -d':'` +HOSTSMTP=`hostname` + +cd ${EXAMPLES} + +if [ -z "$1" ]; then + echo "Usage: `basename $0` {username} or install" + exit 1 +else + if [ -z "${HOMEOWN}" ] ; then + if [ "$1" = "install" ] ; then + if [ $(id -u) -eq 0 ]; then + echo "root can not use 'install' parameter." + exit 1 + fi + else + echo "User unknown or no exist User Directory -> " $1 "-" ${HOMEDIR} + echo "Usage: `basename $0` {username} or install" + exit 1 + fi + fi +fi + +echo "************************************************************" +echo "" + +case "$1" in +root) + echo "You can not copy ROOT Directory" + exit 1 + ;; +install) + HOMEOWN=`grep ^$USER: /etc/passwd | cut -f3 -d':'` + HOMEGRP=`grep ^$USER: /etc/passwd | cut -f4 -d':'` + HOMEDIR=`grep ^$USER: /etc/passwd | cut -f6 -d':'` +# HOMEOWN=$USER +# HOMEGRP=$GROUP +# HOMEDIR=$HOME + echo "HOME Directory : " ${HOMEDIR} + ;; +*) + echo "HOME Directory : " ${HOMEDIR} + echo "USERNAME : " ${USERNAME} + ;; +esac + +if [ -x ${HOMEDIR} ]; then + if [ -z "$1" ]; then + echo "Usage: `basename $0` {username} or install" + exit 1 + else + echo "" + echo "************************************************************" + echo "Starting tDiary for FreeBSD user directory installation ..." + echo "" + if [ ! -e ${HOMEDIR}/${DIARYDIR} ]; then + echo "Create ..." ${HOMEDIR}/${DIARYDIR} + mkdir ${HOMEDIR}/${DIARYDIR} + echo "Done" + fi + chmod o+rwx ${HOMEDIR}/${DIARYDIR} + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${DIARYDIR} + if [ ! -e ${HOMEDIR}/${PUBLICHTML} ]; then + echo "Create ..." ${HOMEDIR}/${USERNAME}/${PUBLICHTML} + mkdir ${HOMEDIR}/${PUBLICHTML} + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML} + echo "Done" + fi + echo "Copy tDiary ..." ${EXAMPLES}/tdiary/ + echo " to " ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/ + cp -pR ${EXAMPLES}/tdiary/ ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/ + chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/ + chmod o+rwx ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR} + echo "Done" + if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then + sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \ + -e 's#smtp.example.net#'${HOSTSMTP}'#g' \ + -e "s#foo@example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \ + -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \ + < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf.orig + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf.orig + else + sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \ + -e 's#smtp.example.net#'${HOSTSMTP}'#g' \ + -e "s#foo@example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \ + -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \ + < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf + fi + if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess ]; then + sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig + else + sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess + fi + sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \ + -e 's#smtp.example.net#'${HOSTSMTP}'#g' \ + -e "s#foo@example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \ + -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \ + < ${EXAMPLES}/tdiary/misc/i18n/tdiary.conf.sample-en > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en + rm -f ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary-FreeBSD.sh + fi +else + echo "" + echo "User unknown or no exist User Directory -> " $1 "-" ${HOMEDIR} + echo "Usage: `basename $0` {username} or install" + exit 1 +fi +echo "" +echo "" +echo "Be sure to read the ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/README" +echo " file for additional information." +echo "************************************************************" +echo "" +exit 0 diff --git a/www/tdiary/pkg-descr b/www/tdiary/pkg-descr new file mode 100644 index 000000000000..cdcc8f8482cd --- /dev/null +++ b/www/tdiary/pkg-descr @@ -0,0 +1,10 @@ +tDiary is a Web-based interface system that works as a personal diary. +It is possible for diary readers to add comments to your diary. + + - require Ruby 1.6.3 or later + - currently supported: Japanese, English + + tDiary is developed on http://sourceforge.net/projects/tdiary/ . + See URL for more information. + +WWW: http://www.tdiary.org/ diff --git a/www/tdiary/pkg-message b/www/tdiary/pkg-message new file mode 100644 index 000000000000..e0641e05af55 --- /dev/null +++ b/www/tdiary/pkg-message @@ -0,0 +1,14 @@ +============================================================= +There is a script to install tDiary in a user directory. +This script should be run manually. + + # cd ${PREFIX}/share/examples/tdiary + # ./tdiary-FreeBSD.sh USERid + or + % cd ${PREFIX}/share/examples/tdiary + % ./tdiary-FreeBSD.sh install + +There is a document by English in the following directories. + See ... + ${PREFIX}/share/examples/tdiary/misc/i18n/ +============================================================= diff --git a/www/tdiary/pkg-plist b/www/tdiary/pkg-plist new file mode 100644 index 000000000000..2d28a019b5e8 --- /dev/null +++ b/www/tdiary/pkg-plist @@ -0,0 +1 @@ +share/examples/tdiary/tdiary-FreeBSD.sh |