ports/54306: Update ports: japanese/tdiary www/tdiary

F.Kimura jfkimura at yahoo.co.jp
Thu Jul 10 07:00:36 UTC 2003


>Number:         54306
>Category:       ports
>Synopsis:       Update ports: japanese/tdiary www/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:   Thu Jul 10 00:00:34 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:
		Update ports: japanese/tdiary www/tdiary  to 1.5.4_2
			Because tDiary is not a thing done localize of only by Japanese, I want to move to boil a category of www.			With that in mind, I want to have port of setting to do by default localize in Japanese for the following in a category of japanese.

>How-To-Repeat:
		port of a tDiary system works by English
>Fix:

--- www/tdiary (New) ---

# 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/files
#	./tdiary/files/tdiary-FreeBSD.sh.in
#	./tdiary/Makefile
#	./tdiary/distinfo
#	./tdiary/pkg-message
#	./tdiary/pkg-plist
#	./tdiary/pkg-descr
#
echo c - ./tdiary/
mkdir -p ./tdiary/ > /dev/null 2>&1
echo c - ./tdiary/files
mkdir -p ./tdiary/files > /dev/null 2>&1
echo x - ./tdiary/files/tdiary-FreeBSD.sh.in
sed 's/^X//' >./tdiary/files/tdiary-FreeBSD.sh.in << 'END-of-./tdiary/files/tdiary-FreeBSD.sh.in'
X#!/bin/sh
X#
X# tdiary-FreeBSD.sh - tDiary user directory copy script
X#
X# $FreeBSD$
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
XDIARYDIR=diary
XPUBLICHTML=public_html
XPREFIX=@@@@PREFIX@@@@
XTDCONFIG=@@@@LANG@@@@
XEXAMPLES=${PREFIX}/share/examples
XHOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'`
XHOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'`
XAUTHORN=`grep ^$1: /etc/passwd | cut -f5 -d':'`
XHOMEDIR=`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 "-" ${HOMEDIR}
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	HOMEDIR=`grep ^$USER: /etc/passwd | cut -f6 -d':'`	
X#	HOMEOWN=$USER
X#	HOMEGRP=$GROUP
X#	HOMEDIR=$HOME
X	echo "HOME Directory : " ${HOMEDIR}
X	USERNAME=$USER
X	;;
X*)
X	echo "HOME Directory : " ${HOMEDIR}	
X	echo "USERNAME       : " ${USERNAME}
X	USERNAME=$USER
X	;;
Xesac
X
Xif [ -x ${HOMEDIR} ]; 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 ${HOMEDIR}/${DIARYDIR} ]; then
X			echo "Create ..." ${HOMEDIR}/${DIARYDIR} 
X			mkdir ${HOMEDIR}/${DIARYDIR}
X			echo "Done"
X		fi
X		chmod o+rwx ${HOMEDIR}/${DIARYDIR}
X		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${DIARYDIR}
X		if [ ! -e ${HOMEDIR}/${PUBLICHTML} ]; then
X			echo "Create ..." ${HOMEDIR}/${USERNAME}/${PUBLICHTML}
X			mkdir ${HOMEDIR}/${PUBLICHTML}
X			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}
X			echo "Done"
X		fi
X		echo "Copy tDiary ..." ${EXAMPLES}/tdiary/
X		echo "            to " ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
X		cp -pR ${EXAMPLES}/tdiary/ ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
X		chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
X		chmod o+rwx ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}
X		echo "Done"
X		sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \
X			-e 's#smtp.example.net#'${HOSTSMTP}'#g' \
X			-e "s#foo at example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
X			-e "s#Your name#${AUTHORN}#g" \
X			-e "s#hogehoge diary#${AUTHORN} Diary#g" \
X			-e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
X			< ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja
X		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja
X		if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess ]; then
X			sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
X			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
X		else
X			sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess
X			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess
X		fi
X		sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \
X			-e 's#smtp.example.net#'${HOSTSMTP}'#g' \
X			-e "s#foo at example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
X			-e "s#Your name#${AUTHORN}#g" \
X			-e "s#foobar diary#${AUTHORN} Diary#g" \
X			-e "s#Foo\'s diary#${AUTHORN}\'s Diary#g" \
X			-e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
X			< ${EXAMPLES}/tdiary/misc/i18n/tdiary.conf.sample-en > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
X		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
X		rm -f ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary-FreeBSD.sh
X		if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then
X			echo ""
X		else
X			echo "Install ${TDCONFIG} ... Done"
X			mv ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/${TDCONFIG} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf
X		fi
X	fi
Xelse
X	echo ""
X	echo "User unknown  or  no exist  User Directory -> " $1 "-" ${HOMEDIR}
X	echo "Usage: `basename $0` {username}  or  install"
X	exit 1 
Xfi
Xecho ""
Xecho ""
Xecho "***"
Xecho "You have to execute the following commands:"
Xecho "      % /usr/local/sbin/htpasswd -c" ${HOMEDIR}/.htpasswd ${USERNAME}
Xecho "" 
Xecho "Be sure to read the ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/README"
Xecho "    file for additional information."
Xecho "************************************************************"
Xecho ""
Xexit 0
END-of-./tdiary/files/tdiary-FreeBSD.sh.in
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
XPORTREVISION=	2
XCATEGORIES=	www ruby
XMASTER_SITES=	\
X		${MASTER_SITE_SOURCEFORGE} \
X		http://www.tdiary.org/download/
XMASTER_SITE_SUBDIR=	sourceforge/${PORTNAME}
XDISTNAME=	${PORTNAME}-full-${PORTVERSION}
X
XMAINTAINER=	jfkimura at yahoo.co.jp
XCOMMENT=	A Web-based diary system (like weblog) written in Ruby
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
XNO_BUILD=	yes
XUSE_RUBY=	yes
X
XTDIARYDIR=	${PREFIX}/share/examples/${PORTNAME}
XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
X.if  !defined(TDIARY_LANG)
XTDIARY_LANG=	tdiary.conf-en
X.endif
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		-e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \
X		${FILESDIR}/tdiary-FreeBSD.sh.in > ${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	${INSTALL_DATA} ${WRKSRC}/misc/plugin/comment_mail-sendmail.rb ${TDIARYDIR}/plugin
X.if ${TDIARY_LANG} == tdiary.conf-en
X	${INSTALL_DATA} ${WRKSRC}/misc/i18n/00lang.en.rb ${TDIARYDIR}/plugin
X.endif
X	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR}
X
Xpost-install:
X	@cd ${WRKSRC} && ${FIND} . -type f -o -type l | ${SED} -e 's,^\.,share/examples/${PORTNAME},' >> ${TMPPLIST}
X.if defined(WITH_TDIARY_UCONV)
X	@${ECHO} 'share/examples/${PORTNAME}/plugin/output_rdf.rb' >> ${TMPPLIST}
X.endif
X.if defined(WITH_TDIARY_NORA)
X	@${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST}
X.endif
X	@${ECHO} 'share/examples/${PORTNAME}/plugin/comment_mail-sendmail.rb' >> ${TMPPLIST}
X.if ${TDIARY_LANG} == tdiary.conf-en	
X	@${ECHO} 'share/examples/${PORTNAME}/plugin/00lang.en.rb' >> ${TMPPLIST}
X.endif
X	@cd ${WRKSRC} && ${FIND} . -type d -depth  | ${SED} -e 's,^\., at dirrm share/examples/${PORTNAME},' >> ${TMPPLIST}
X	@${SED} -e "s,@@@@PREFIX@@@@,${PREFIX},g" ${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 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  # @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh USERid
X    or
X  % @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh install
X
XThere is a document by English in the following directories.
X  See ...
X  @@@@PREFIX@@@@/share/examples/tdiary/misc/i18n/
X   and
X  Explanation by English of a tdiary system can refer to the following page :
X
X  http://tdiary-users.sourceforge.jp/cgi-bin/wiki.cgi?FrontPage_en
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
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
exit

--- ended ---

--- japanese/tdiary (Update) ---

# 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
#
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
XCATEGORIES=	japanese ruby
XPKGNAMEPREFIX?=	ja-
X
XMAINTAINER=	jfkimura at yahoo.co.jp
X
XTDIARY_LANG=	tdiary.conf-ja
XMASTERDIR?=	${.CURDIR}/../../www/tdiary
X
X.include "${MASTERDIR}/Makefile"
END-of-./tdiary/Makefile
exit

--- ended ---

Fumihiko Kimura <jfkimura at yahoo.co.jp>
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list