ports/52613: New port: japanese/tDiary
Fumihiko Kimura
jfkimura at yahoo.co.jp
Fri May 23 15:50:15 UTC 2003
>Number: 52613
>Category: ports
>Synopsis: New port: japanese/tDiary
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri May 23 08:50:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Fumihiko Kimura
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
System: FreeBSD sh0.radio.gr.jp 4.8-RELEASE FreeBSD 4.8-RELEASE #16: Tue May 6 14:49:35 JST 2003 jfkimura at sh0.radio.gr.jp:/usr/obj/usr/src/sys/popposh0 i386
>Description:
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.
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# ./tdiary/
# ./tdiary/Makefile
# ./tdiary/distinfo
# ./tdiary/files
# ./tdiary/files/tdiary-FreeBSD.sh
# ./tdiary/pkg-descr
# ./tdiary/pkg-message
# ./tdiary/pkg-plist
#
echo c - ./tdiary/
mkdir -p ./tdiary/ > /dev/null 2>&1
echo x - ./tdiary/Makefile
sed 's/^X//' >./tdiary/Makefile << 'END-of-./tdiary/Makefile'
X# New ports collection makefile for: tdiary
X# Date created: 21 May 2003
X# Whom: Fumihiko Kimura <jfkimura at yahoo.co.jp>
X#
X# $FreeBSD$
X#
X
XPORTNAME= tdiary
XPORTVERSION= 1.5.4
XCATEGORIES= japanese ruby
XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= sourceforge/${PORTNAME}
XDISTNAME= ${PORTNAME}-full-${PORTVERSION:R}.${PORTVERSION:E}
X
XMAINTAINER= jfkimura at yahoo.co.jp
XCOMMENT= A Web-based diary system (like weblog) written in Ruby
X
XNO_BUILD= yes
XUSE_RUBY= yes
X
X.if defined(WITH_TDIARY_UCONV)
XRUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv
X.endif
X.if defined(WITH_TDIARY_NORA)
XRUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/web/escape_ext.so:${PORTSDIR}/www/ruby-nora
X.endif
X
XTDIARYDIR= ${PREFIX}/share/examples/${PORTNAME}
X
XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}.${PORTVERSION:E}
X
Xpre-everything::
X @${ECHO_MSG}
X @${ECHO_MSG} "============================================================="
X @${ECHO_MSG} "You may use the following options:"
X @${ECHO_MSG}
X @${ECHO_MSG} "WITH_TDIARY_UCONV=yes (with UTF-8 support : output_rdf.rb)"
X @${ECHO_MSG} "WITH_TDIARY_NORA=yes (with Referer header support : disp_referrer.rb)"
X @${ECHO_MSG}
X @${ECHO_MSG} "============================================================="
X @${ECHO_MSG}
X
Xdo-install:
X @if [ -d ${TDIARYDIR} ]; then ${RM} -rf ${TDIARYDIR}; fi
X ${MKDIR} ${TDIARYDIR}
X ${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \
X ${FILESDIR}/tdiary-FreeBSD.sh > ${TDIARYDIR}/tdiary-FreeBSD.sh
X ${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh
X ${CP} -pR ${WRKSRC}/ ${TDIARYDIR}
X.if defined(WITH_TDIARY_UCONV)
X ${INSTALL_DATA} ${WRKSRC}/misc/plugin/output_rdf.rb ${TDIARYDIR}/plugin
X.endif
X.if defined(WITH_TDIARY_NORA)
X ${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin
X.endif
X @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR}
X
Xpost-install:
X @cd ${WRKSRC} && find . -type f -o -type l | ${SED} 's,^\.,share/examples/${PORTNAME},' | sort >> ${TMPPLIST}
X.if defined(WITH_TDIARY_UCONV)
X @cd ${WRKSRC} && ${ECHO} 'share/examples/${PORTNAME}/plugin/output_rdf.rb' >> ${TMPPLIST}
X.endif
X.if defined(WITH_TDIARY_NORA)
X @cd ${WRKSRC} && ${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST}
X.endif
X @cd ${WRKSRC} && find . -type d | ${SED} 's,^\., at dirrm share/examples/${PORTNAME},' | sort -r >> ${TMPPLIST}
X @${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-./tdiary/Makefile
echo x - ./tdiary/distinfo
sed 's/^X//' >./tdiary/distinfo << 'END-of-./tdiary/distinfo'
XMD5 (tdiary-full-1.5.4.tar.gz) = c2d87e40780d95d9e316db7c6774afc3
END-of-./tdiary/distinfo
echo c - ./tdiary/files
mkdir -p ./tdiary/files > /dev/null 2>&1
echo x - ./tdiary/files/tdiary-FreeBSD.sh
sed 's/^X//' >./tdiary/files/tdiary-FreeBSD.sh << 'END-of-./tdiary/files/tdiary-FreeBSD.sh'
X#!/bin/sh
X#
X# tdiary-FreeBSD.sh - tDiary user directory copy script
X#
X# $FreeBSD: /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh,v 1.34 2003/05/21 23:30:00 fkimura Exp $
X#
X# usage:
X# % /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh install
X# or
X# # /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh USERid
X#
X
XUSERNAME=$1
XHOMEDIRS=
XDIARYDIR=diary
XPUBLICHTML=public_html
XPREFIX=@@@@PREFIX@@@@
XEXAMPLES=${PREFIX}/share/examples
XHOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'`
XHOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'`
XHOMEDIRC=`grep ^$1: /etc/passwd | cut -f6 -d':'`
XHOSTSMTP=`hostname`
X
Xcd ${EXAMPLES}
X
Xif [ -z "$1" ]; then
X echo "Usage: `basename $0` {username} or install"
X exit 1
Xelse
X if [ -z "${HOMEOWN}" ] ; then
X if [ "$1" = "install" ] ; then
X if [ $(id -u) -eq 0 ]; then
X echo "root can not use 'install' parameter."
X exit 1
X fi
X else
X echo "User unknown or no exist User Directory -> " $1 "-" ${HOMEDIRS}
X echo "Usage: `basename $0` {username} or install"
X exit 1
X fi
X fi
Xfi
X
Xecho "************************************************************"
Xecho ""
X
Xcase "$1" in
Xroot)
X echo "You can not copy ROOT Directory"
X exit 1
X ;;
Xinstall)
X HOMEOWN=`grep ^$USER: /etc/passwd | cut -f3 -d':'`
X HOMEGRP=`grep ^$USER: /etc/passwd | cut -f4 -d':'`
X HOMEDIRC=`grep ^$USER: /etc/passwd | cut -f6 -d':'`
X# HOMEDIRS=$HOME
X# HOMEOWN=$USER
X# HOMEGRP=$GROUP
X HOMEDIRS=${HOMEDIRC}
X echo "HOME Directory : " ${HOMEDIRS}
X ;;
X*)
X# HOMEDIRS=/usr/home/${USERNAME}
X HOMEDIRS=${HOMEDIRC}
X echo "HOME Directory : " ${HOMEDIRS}
X echo "USERNAME : " ${USERNAME}
X ;;
Xesac
X
Xif [ -x ${HOMEDIRS} ]; then
X if [ -z "$1" ]; then
X echo "Usage: `basename $0` {username} or install"
X exit 1
X else
X echo ""
X echo "************************************************************"
X echo "Starting tDiary for FreeBSD user directory installation ..."
X echo ""
X if [ ! -e ${HOMEDIRS}/${DIARYDIR} ]; then
X echo "Create ..." ${HOMEDIRS}/${DIARYDIR}
X mkdir ${HOMEDIRS}/${DIARYDIR}
X echo "Done"
X fi
X chmod o+rwx ${HOMEDIRS}/${DIARYDIR}
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${DIARYDIR}
X if [ ! -e ${HOMEDIRS}/${PUBLICHTML} ]; then
X echo "Create ..." ${HOMEDIRS}/${USERNAME}/${PUBLICHTML}
X mkdir ${HOMEDIRS}/${PUBLICHTML}
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}
X echo "Done"
X fi
X echo "Copy tDiary ..." ${EXAMPLES}/tdiary/
X echo " to " ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/
X cp -pR ${EXAMPLES}/tdiary/ ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/
X chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/
X chmod o+rwx ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}
X echo "Done"
X if [ -e ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then
X sed -e 's#'/home/foo/diary'#'${HOMEDIRS}'/'${DIARYDIR}'#g' \
X -e 's#smtp.example.net#'${HOSTSMTP}'#g' \
X -e "s#foo at example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
X -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
X < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf.orig
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf.orig
X else
X sed -e 's#'/home/foo/diary'#'${HOMEDIRS}'/'${DIARYDIR}'#g' \
X -e 's#smtp.example.net#'${HOSTSMTP}'#g' \
X -e "s#foo at example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
X -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
X < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf
X fi
X if [ -e ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/.htaccess ]; then
X sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
X else
X sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/.htaccess
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/.htaccess
X fi
X sed -e 's#'/home/foo/diary'#'${HOMEDIRS}'/'${DIARYDIR}'#g' \
X -e 's#smtp.example.net#'${HOSTSMTP}'#g' \
X -e "s#foo at example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
X -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
X < ${EXAMPLES}/tdiary/misc/i18n/tdiary.conf.sample-en > ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
X chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
X rm -f ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/tdiary-FreeBSD.sh
X fi
Xelse
X echo ""
X echo "User unknown or no exist User Directory -> " $1 "-" ${HOMEDIRS}
X echo "Usage: `basename $0` {username} or install"
X exit 1
Xfi
Xecho ""
Xecho ""
Xecho "Be sure to read the ${HOMEDIRS}/${PUBLICHTML}/${DIARYDIR}/README"
Xecho " file for additional information."
Xecho "************************************************************"
Xecho ""
Xexit 0
END-of-./tdiary/files/tdiary-FreeBSD.sh
echo x - ./tdiary/pkg-descr
sed 's/^X//' >./tdiary/pkg-descr << 'END-of-./tdiary/pkg-descr'
XtDiary is a Web-based interface system that works as a personal diary.
XIt is possible for diary readers to add comments to your diary.
X
X - require Ruby 1.6.3 or later
X - currently supported: Japanese, English
X
X tDiary is developed on http://sourceforge.net/projects/tdiary/ .
X See URL for more information.
X
XWWW: http://www.tdiary.org/
END-of-./tdiary/pkg-descr
echo x - ./tdiary/pkg-message
sed 's/^X//' >./tdiary/pkg-message << 'END-of-./tdiary/pkg-message'
X
X=============================================================
XThere is a script to install tDiary in a user directory.
XThis script should be run manually.
X
X # cd /usr/local/share/examples/tdiary
X # ./tdiary-FreeBSD.sh USERid
X or
X % cd /usr/local/share/examples/tdiary
X % ./tdiary-FreeBSD.sh install
X
XThere is a document by English in the following directories.
X See ...
X /usr/local/share/examples/tdiary/misc/i18n/
X=============================================================
X
END-of-./tdiary/pkg-message
echo x - ./tdiary/pkg-plist
sed 's/^X//' >./tdiary/pkg-plist << 'END-of-./tdiary/pkg-plist'
Xshare/examples/tdiary/tdiary-FreeBSD.sh
END-of-./tdiary/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list