summaryrefslogtreecommitdiff
path: root/www/tdiary
diff options
context:
space:
mode:
authorYoichi NAKAYAMA <yoichi@FreeBSD.org>2003-07-21 04:04:01 +0000
committerYoichi NAKAYAMA <yoichi@FreeBSD.org>2003-07-21 04:04:01 +0000
commit566334553923ec23d4ed566a5013d6e213048f15 (patch)
treec6c075e16762535c9988b5c1ad76d3d2e37ed74b /www/tdiary
parentghostscriopt/Samsung-SmartGDI-all-GS.tar.gz has been changed, (diff)
Copy japanese/tdiary to www/tdiary
www/tdiary installs setup script to set default language to English japanese/tdiary installs one to set default language to Japanese PR: ports/54306 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=85267
Diffstat (limited to 'www/tdiary')
-rw-r--r--www/tdiary/Makefile18
-rw-r--r--www/tdiary/files/tdiary-FreeBSD.sh.in34
-rw-r--r--www/tdiary/pkg-message14
3 files changed, 43 insertions, 23 deletions
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
+=============================================================================