diff options
-rw-r--r-- | japanese/tdiary/Makefile | 65 | ||||
-rw-r--r-- | japanese/tdiary/distinfo | 1 | ||||
-rw-r--r-- | japanese/tdiary/files/tdiary-FreeBSD.sh.in | 142 | ||||
-rw-r--r-- | japanese/tdiary/pkg-descr | 10 | ||||
-rw-r--r-- | japanese/tdiary/pkg-message | 14 | ||||
-rw-r--r-- | japanese/tdiary/pkg-plist | 1 | ||||
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/tdiary-devel/Makefile | 18 | ||||
-rw-r--r-- | www/tdiary-devel/files/tdiary-FreeBSD.sh.in | 34 | ||||
-rw-r--r-- | www/tdiary-devel/pkg-message | 14 | ||||
-rw-r--r-- | www/tdiary/Makefile | 18 | ||||
-rw-r--r-- | www/tdiary/files/tdiary-FreeBSD.sh.in | 34 | ||||
-rw-r--r-- | www/tdiary/pkg-message | 14 |
13 files changed, 91 insertions, 275 deletions
diff --git a/japanese/tdiary/Makefile b/japanese/tdiary/Makefile index ade269e999f2..2aad64ec4a90 100644 --- a/japanese/tdiary/Makefile +++ b/japanese/tdiary/Makefile @@ -5,68 +5,11 @@ # $FreeBSD$ # -PORTNAME= tdiary -PORTVERSION= 1.5.4 -PORTREVISION= 1 -CATEGORIES= japanese ruby www -MASTER_SITES= \ - ${MASTER_SITE_SOURCEFORGE} \ - http://www.tdiary.org/download/ -MASTER_SITE_SUBDIR= sourceforge/${PORTNAME} -DISTNAME= ${PORTNAME}-full-${PORTVERSION} +CATEGORIES= japanese www ruby 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 +TDIARY_LANG= tdiary.conf-ja +MASTERDIR?= ${.CURDIR}/../../www/tdiary -NO_BUILD= yes -USE_RUBY= yes - -TDIARYDIR= ${PREFIX}/share/examples/${PORTNAME} - -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} - -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} -e 's,^\.,share/examples/${PORTNAME},' >> ${TMPPLIST} -.if defined(WITH_TDIARY_UCONV) - @${ECHO} 'share/examples/${PORTNAME}/plugin/output_rdf.rb' >> ${TMPPLIST} -.endif -.if defined(WITH_TDIARY_NORA) - @${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST} -.endif - @cd ${WRKSRC} && ${FIND} . -type d -depth | ${SED} -e 's,^\.,@dirrm share/examples/${PORTNAME},' >> ${TMPPLIST} - @${SED} -e "s,@@@@PREFIX@@@@,${PREFIX},g" ${PKGMESSAGE} - -.include <bsd.port.mk> +.include "${MASTERDIR}/Makefile" diff --git a/japanese/tdiary/distinfo b/japanese/tdiary/distinfo deleted file mode 100644 index e26a1bd84787..000000000000 --- a/japanese/tdiary/distinfo +++ /dev/null @@ -1 +0,0 @@ -MD5 (tdiary-full-1.5.4.tar.gz) = c2d87e40780d95d9e316db7c6774afc3 diff --git a/japanese/tdiary/files/tdiary-FreeBSD.sh.in b/japanese/tdiary/files/tdiary-FreeBSD.sh.in deleted file mode 100644 index 7b936942b22c..000000000000 --- a/japanese/tdiary/files/tdiary-FreeBSD.sh.in +++ /dev/null @@ -1,142 +0,0 @@ -#!/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} - USERNAME=$USER - ;; -*) - echo "HOME Directory : " ${HOMEDIR} - echo "USERNAME : " ${USERNAME} - USERNAME=$USER - ;; -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}/${DIARYDIR}/ - 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 "***" -echo "You have to execute the following commands:" -echo " % /usr/local/sbin/htpasswd -c" ${HOMEDIR}/.htpasswd ${USERNAME} -echo "" -echo "Be sure to read the ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/README" -echo " file for additional information." -echo "************************************************************" -echo "" -exit 0 diff --git a/japanese/tdiary/pkg-descr b/japanese/tdiary/pkg-descr deleted file mode 100644 index cdcc8f8482cd..000000000000 --- a/japanese/tdiary/pkg-descr +++ /dev/null @@ -1,10 +0,0 @@ -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/japanese/tdiary/pkg-message b/japanese/tdiary/pkg-message deleted file mode 100644 index b2f9c9eb0d2b..000000000000 --- a/japanese/tdiary/pkg-message +++ /dev/null @@ -1,14 +0,0 @@ - -============================================================= -There is a script to install tDiary in a user directory. -This script should be run manually. - - # @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh USERid - or - % @@@@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/japanese/tdiary/pkg-plist b/japanese/tdiary/pkg-plist deleted file mode 100644 index 2d28a019b5e8..000000000000 --- a/japanese/tdiary/pkg-plist +++ /dev/null @@ -1 +0,0 @@ -share/examples/tdiary/tdiary-FreeBSD.sh diff --git a/www/Makefile b/www/Makefile index 2f4b9759017a..e91b553098bd 100644 --- a/www/Makefile +++ b/www/Makefile @@ -463,6 +463,7 @@ SUBDIR += swish++ SUBDIR += swish-e SUBDIR += tclhttpd + SUBDIR += tdiary SUBDIR += thttpd SUBDIR += thumbnail_index SUBDIR += tidy diff --git a/www/tdiary-devel/Makefile b/www/tdiary-devel/Makefile index ade269e999f2..c960f4cedec8 100644 --- a/www/tdiary-devel/Makefile +++ b/www/tdiary-devel/Makefile @@ -7,8 +7,8 @@ PORTNAME= tdiary PORTVERSION= 1.5.4 -PORTREVISION= 1 -CATEGORIES= japanese ruby www +PORTREVISION= 2 +CATEGORIES= www ruby MASTER_SITES= \ ${MASTER_SITE_SOURCEFORGE} \ http://www.tdiary.org/download/ @@ -29,9 +29,12 @@ NO_BUILD= yes USE_RUBY= yes TDIARYDIR= ${PREFIX}/share/examples/${PORTNAME} - WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +.if !defined(TDIARY_LANG) +TDIARY_LANG= tdiary.conf-en +.endif + pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "=============================================================" @@ -47,6 +50,7 @@ do-install: @if [ -d ${TDIARYDIR} ]; then ${RM} -rf ${TDIARYDIR}; fi ${MKDIR} ${TDIARYDIR} @${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \ + -e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \ ${FILESDIR}/tdiary-FreeBSD.sh.in > ${TDIARYDIR}/tdiary-FreeBSD.sh @${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh ${CP} -pR ${WRKSRC}/ ${TDIARYDIR} @@ -56,6 +60,10 @@ do-install: .if defined(WITH_TDIARY_NORA) ${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin .endif + ${INSTALL_DATA} ${WRKSRC}/misc/plugin/comment_mail-sendmail.rb ${TDIARYDIR}/plugin +.if ${TDIARY_LANG} == tdiary.conf-en + ${INSTALL_DATA} ${WRKSRC}/misc/i18n/00lang.en.rb ${TDIARYDIR}/plugin +.endif @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR} post-install: @@ -66,6 +74,10 @@ post-install: .if defined(WITH_TDIARY_NORA) @${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST} .endif + @${ECHO} 'share/examples/${PORTNAME}/plugin/comment_mail-sendmail.rb' >> ${TMPPLIST} +.if ${TDIARY_LANG} == tdiary.conf-en + @${ECHO} 'share/examples/${PORTNAME}/plugin/00lang.en.rb' >> ${TMPPLIST} +.endif @cd ${WRKSRC} && ${FIND} . -type d -depth | ${SED} -e 's,^\.,@dirrm share/examples/${PORTNAME},' >> ${TMPPLIST} @${SED} -e "s,@@@@PREFIX@@@@,${PREFIX},g" ${PKGMESSAGE} diff --git a/www/tdiary-devel/files/tdiary-FreeBSD.sh.in b/www/tdiary-devel/files/tdiary-FreeBSD.sh.in index 7b936942b22c..09c92d0abf77 100644 --- a/www/tdiary-devel/files/tdiary-FreeBSD.sh.in +++ b/www/tdiary-devel/files/tdiary-FreeBSD.sh.in @@ -14,9 +14,11 @@ USERNAME=$1 DIARYDIR=diary PUBLICHTML=public_html PREFIX=@@@@PREFIX@@@@ +TDCONFIG=@@@@LANG@@@@ EXAMPLES=${PREFIX}/share/examples HOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'` HOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'` +AUTHORN=`grep ^$1: /etc/passwd | cut -f5 -d':'` HOMEDIR=`grep ^$1: /etc/passwd | cut -f6 -d':'` HOSTSMTP=`hostname` @@ -93,21 +95,14 @@ if [ -x ${HOMEDIR} ]; then chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/ 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 + 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#Your name#${AUTHORN}#g" \ + -e "s#hogehoge diary#${AUTHORN} Diary#g" \ + -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \ + < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja 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 @@ -118,10 +113,19 @@ if [ -x ${HOMEDIR} ]; 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#Your name#${AUTHORN}#g" \ + -e "s#foobar diary#${AUTHORN} Diary#g" \ + -e "s#Foo\'s diary#${AUTHORN}\'s Diary#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 + if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then + echo "" + else + echo "Install ${TDCONFIG} ... Done" + mv ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/${TDCONFIG} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf + fi fi else echo "" diff --git a/www/tdiary-devel/pkg-message b/www/tdiary-devel/pkg-message index b2f9c9eb0d2b..2832b58c9abd 100644 --- a/www/tdiary-devel/pkg-message +++ b/www/tdiary-devel/pkg-message @@ -1,14 +1,18 @@ -============================================================= +============================================================================= There is a script to install tDiary in a user directory. -This script should be run manually. +You can run the script manually as # @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh USERid or % @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh install -There is a document by English in the following directories. - See ... +There is a document in English under the following directory. + @@@@PREFIX@@@@/share/examples/tdiary/misc/i18n/ -============================================================= + +And, you can find information on the tdiary system at : + + http://tdiary-users.sourceforge.jp/cgi-bin/wiki.cgi?FrontPage_en +============================================================================= diff --git a/www/tdiary/Makefile b/www/tdiary/Makefile index ade269e999f2..c960f4cedec8 100644 --- a/www/tdiary/Makefile +++ b/www/tdiary/Makefile @@ -7,8 +7,8 @@ PORTNAME= tdiary PORTVERSION= 1.5.4 -PORTREVISION= 1 -CATEGORIES= japanese ruby www +PORTREVISION= 2 +CATEGORIES= www ruby MASTER_SITES= \ ${MASTER_SITE_SOURCEFORGE} \ http://www.tdiary.org/download/ @@ -29,9 +29,12 @@ NO_BUILD= yes USE_RUBY= yes TDIARYDIR= ${PREFIX}/share/examples/${PORTNAME} - WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +.if !defined(TDIARY_LANG) +TDIARY_LANG= tdiary.conf-en +.endif + pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "=============================================================" @@ -47,6 +50,7 @@ do-install: @if [ -d ${TDIARYDIR} ]; then ${RM} -rf ${TDIARYDIR}; fi ${MKDIR} ${TDIARYDIR} @${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \ + -e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \ ${FILESDIR}/tdiary-FreeBSD.sh.in > ${TDIARYDIR}/tdiary-FreeBSD.sh @${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh ${CP} -pR ${WRKSRC}/ ${TDIARYDIR} @@ -56,6 +60,10 @@ do-install: .if defined(WITH_TDIARY_NORA) ${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin .endif + ${INSTALL_DATA} ${WRKSRC}/misc/plugin/comment_mail-sendmail.rb ${TDIARYDIR}/plugin +.if ${TDIARY_LANG} == tdiary.conf-en + ${INSTALL_DATA} ${WRKSRC}/misc/i18n/00lang.en.rb ${TDIARYDIR}/plugin +.endif @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR} post-install: @@ -66,6 +74,10 @@ post-install: .if defined(WITH_TDIARY_NORA) @${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST} .endif + @${ECHO} 'share/examples/${PORTNAME}/plugin/comment_mail-sendmail.rb' >> ${TMPPLIST} +.if ${TDIARY_LANG} == tdiary.conf-en + @${ECHO} 'share/examples/${PORTNAME}/plugin/00lang.en.rb' >> ${TMPPLIST} +.endif @cd ${WRKSRC} && ${FIND} . -type d -depth | ${SED} -e 's,^\.,@dirrm share/examples/${PORTNAME},' >> ${TMPPLIST} @${SED} -e "s,@@@@PREFIX@@@@,${PREFIX},g" ${PKGMESSAGE} diff --git a/www/tdiary/files/tdiary-FreeBSD.sh.in b/www/tdiary/files/tdiary-FreeBSD.sh.in index 7b936942b22c..09c92d0abf77 100644 --- a/www/tdiary/files/tdiary-FreeBSD.sh.in +++ b/www/tdiary/files/tdiary-FreeBSD.sh.in @@ -14,9 +14,11 @@ USERNAME=$1 DIARYDIR=diary PUBLICHTML=public_html PREFIX=@@@@PREFIX@@@@ +TDCONFIG=@@@@LANG@@@@ EXAMPLES=${PREFIX}/share/examples HOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'` HOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'` +AUTHORN=`grep ^$1: /etc/passwd | cut -f5 -d':'` HOMEDIR=`grep ^$1: /etc/passwd | cut -f6 -d':'` HOSTSMTP=`hostname` @@ -93,21 +95,14 @@ if [ -x ${HOMEDIR} ]; then chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/ 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 + 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#Your name#${AUTHORN}#g" \ + -e "s#hogehoge diary#${AUTHORN} Diary#g" \ + -e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \ + < ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja + chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja 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 @@ -118,10 +113,19 @@ if [ -x ${HOMEDIR} ]; 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#Your name#${AUTHORN}#g" \ + -e "s#foobar diary#${AUTHORN} Diary#g" \ + -e "s#Foo\'s diary#${AUTHORN}\'s Diary#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 + if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then + echo "" + else + echo "Install ${TDCONFIG} ... Done" + mv ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/${TDCONFIG} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf + fi fi else echo "" diff --git a/www/tdiary/pkg-message b/www/tdiary/pkg-message index b2f9c9eb0d2b..2832b58c9abd 100644 --- a/www/tdiary/pkg-message +++ b/www/tdiary/pkg-message @@ -1,14 +1,18 @@ -============================================================= +============================================================================= There is a script to install tDiary in a user directory. -This script should be run manually. +You can run the script manually as # @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh USERid or % @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh install -There is a document by English in the following directories. - See ... +There is a document in English under the following directory. + @@@@PREFIX@@@@/share/examples/tdiary/misc/i18n/ -============================================================= + +And, you can find information on the tdiary system at : + + http://tdiary-users.sourceforge.jp/cgi-bin/wiki.cgi?FrontPage_en +============================================================================= |