View | Details | Raw Unified | Return to bug 58549
Collapse All | Expand All

(-)/usr/ports/www/tdiary-stable/Makefile (-37 / +45 lines)
Lines 2-14 Link Here
2
# Date created:                 21 May 2003
2
# Date created:                 21 May 2003
3
# Whom:                         Fumihiko Kimura <jfkimura@yahoo.co.jp>
3
# Whom:                         Fumihiko Kimura <jfkimura@yahoo.co.jp>
4
#
4
#
5
# $FreeBSD: ports/www/tdiary/Makefile,v 1.5 2003/08/10 01:45:07 leeym Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	tdiary
8
PORTNAME=	tdiary
9
PORTVERSION=	1.5.5
9
PORTVERSION=	1.5.5
10
#PORTREVISION=	0
10
PORTREVISION=	1
11
CATEGORIES=	www ruby
11
CATEGORIES?=	www ruby
12
MASTER_SITES=	\
12
MASTER_SITES=	\
13
		${MASTER_SITE_SOURCEFORGE} \
13
		${MASTER_SITE_SOURCEFORGE} \
14
		http://www.tdiary.org/download/
14
		http://www.tdiary.org/download/
Lines 18-56 Link Here
18
MAINTAINER=	jfkimura@yahoo.co.jp
18
MAINTAINER=	jfkimura@yahoo.co.jp
19
COMMENT=	A Web-based diary system (like weblog) written in Ruby
19
COMMENT=	A Web-based diary system (like weblog) written in Ruby
20
20
21
.if defined(WITH_TDIARY_UCONV)
21
NO_BUILD=		yes
22
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv
22
USE_RUBY=		yes
23
.endif
23
.if  !defined(WITHOUT_RUBY_FEATURES)
24
.if defined(WITH_TDIARY_NORA)
24
USE_RUBY_FEATURES=	fileutils
25
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/web/escape_ext.so:${PORTSDIR}/www/ruby-nora
26
.endif
25
.endif
27
26
28
NO_BUILD=	yes
29
USE_RUBY=	yes
30
RUBY_SHEBANG_FILES=	index.rb update.rb misc/convert2.rb misc/posttdiary.rb misc/plugin/squeeze.rb misc/plugin/weather.rb \
27
RUBY_SHEBANG_FILES=	index.rb update.rb misc/convert2.rb misc/posttdiary.rb misc/plugin/squeeze.rb misc/plugin/weather.rb \
31
misc/plugin/windex.rb misc/plugin/a/a_conf.rb misc/plugin/todo/todo.rb misc/plugin/trackback/tb.rb
28
misc/plugin/windex.rb misc/plugin/a/a_conf.rb misc/plugin/todo/todo.rb misc/plugin/trackback/tb.rb
32
29
33
TDIARYDIR=	${EXAMPLESDIR}
30
TDIARYDIR=	${EXAMPLESDIR}
34
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
31
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
35
36
.if  !defined(TDIARY_LANG)
32
.if  !defined(TDIARY_LANG)
37
TDIARY_LANG=	tdiary.conf-en
33
TDIARY_LANG=	tdiary.conf-en
38
.endif
34
.endif
39
35
36
.if defined(WITH_TDIARY_UCONV)
37
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/uconv.so:${PORTSDIR}/japanese/ruby-uconv
38
.endif
39
.if defined(WITH_TDIARY_NORA)
40
RUN_DEPENDS+=	${RUBY_SITEARCHLIBDIR}/web/escape_ext.so:${PORTSDIR}/www/ruby-nora
41
.endif
42
40
pre-everything::
43
pre-everything::
44
.if ! ${TDIARY_LANG} == "tdiary.conf-en"
41
	@${ECHO_MSG}
45
	@${ECHO_MSG}
42
	@${ECHO_MSG} "============================================================="
46
	@${ECHO_MSG} "============================================================================="
43
	@${ECHO_MSG} "You may use the following options:"
47
	@${ECHO_MSG} "You may use the following options:"
48
	@${ECHO_MSG} "  WITH_TDIARY_UCONV=yes	(RDF file creates  with UTF-8 : output_rdf.rb)"
49
	@${ECHO_MSG} "  WITH_TDIARY_NORA=yes	(with Referer header support  : disp_referrer.rb)"
50
	@${ECHO_MSG} "============================================================================="
44
	@${ECHO_MSG}
51
	@${ECHO_MSG}
45
	@${ECHO_MSG} "WITH_TDIARY_UCONV=yes	(with UTF-8 support : output_rdf.rb)"
52
.endif
46
	@${ECHO_MSG} "WITH_TDIARY_NORA=yes	(with Referer header support : disp_referrer.rb)"
47
	@${ECHO_MSG}
48
	@${ECHO_MSG} "============================================================="
49
	@${ECHO_MSG}
50
53
51
do-install:
54
do-install:
52
#	@if [ -d ${TDIARYDIR} ]; then ${RM} -rf ${TDIARYDIR}; fi
55
	@-${MKDIR} ${TDIARYDIR}
53
	-${MKDIR} ${TDIARYDIR}
54
	@${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \
56
	@${SED} -e 's,@@@@PREFIX@@@@,${PREFIX},g' \
55
		-e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \
57
		-e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \
56
		${FILESDIR}/tdiaryinst.rb.in > ${TDIARYDIR}/tdiaryinst.rb
58
		${FILESDIR}/tdiaryinst.rb.in > ${TDIARYDIR}/tdiaryinst.rb
Lines 58-89 Link Here
58
		-e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \
60
		-e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \
59
		${FILESDIR}/tdiary-FreeBSD.sh.in > ${TDIARYDIR}/tdiary-FreeBSD.sh
61
		${FILESDIR}/tdiary-FreeBSD.sh.in > ${TDIARYDIR}/tdiary-FreeBSD.sh
60
	@${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh
62
	@${CHMOD} ugo=rx ${TDIARYDIR}/tdiary-FreeBSD.sh
61
	${CP} -pR ${WRKSRC}/ ${TDIARYDIR}
63
	@${CP} -pR ${WRKSRC}/ ${TDIARYDIR}
62
.if defined(WITH_TDIARY_UCONV)
64
.if defined(WITH_TDIARY_UCONV)
63
	${INSTALL_DATA} ${WRKSRC}/misc/plugin/output_rdf.rb ${TDIARYDIR}/plugin
65
	@${ECHO_MSG} "===>  Option : WITH_TDIARY_UCONV .. Done."
66
	@${INSTALL_DATA} ${WRKSRC}/misc/plugin/output_rdf.rb ${TDIARYDIR}/plugin
67
	@${TOUCH} ${TDIARYDIR}/t.rdf
68
	@${CHMOD} 706 ${TDIARYDIR}/t.rdf
69
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/plugin/output_rdf.rb' >> ${TMPPLIST}
70
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/t.rdf' >> ${TMPPLIST}
64
.endif
71
.endif
65
.if defined(WITH_TDIARY_NORA)
72
.if defined(WITH_TDIARY_NORA)
66
	${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin
73
	@${ECHO_MSG} "===>  Option : WITH_TDIARY_NORA  .. Done."
74
	@${INSTALL_DATA} ${WRKSRC}/misc/plugin/disp_referrer.rb ${TDIARYDIR}/plugin
75
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/plugin/disp_referrer.rb' >> ${TMPPLIST}
67
.endif
76
.endif
68
	${INSTALL_DATA} ${WRKSRC}/misc/plugin/comment_mail-sendmail.rb ${TDIARYDIR}/plugin
77
	@${INSTALL_DATA} ${WRKSRC}/misc/plugin/comment_mail-sendmail.rb ${TDIARYDIR}/plugin
78
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/plugin/comment_mail-sendmail.rb' >> ${TMPPLIST}
69
.if ${TDIARY_LANG} == tdiary.conf-en
79
.if ${TDIARY_LANG} == tdiary.conf-en
70
	${INSTALL_DATA} ${WRKSRC}/misc/i18n/00lang.en.rb ${TDIARYDIR}/plugin
80
	@${ECHO_MSG} "===>  TDIARY : English Language messages support"
81
	@${INSTALL_DATA} ${WRKSRC}/misc/i18n/00lang.en.rb ${TDIARYDIR}/plugin
82
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/plugin/00lang.en.rb' >> ${TMPPLIST}
83
	@${RUBY} -i -pe 'sub(/%Y-%m-%d/, "%Y-%m-%d [%a]")' ${TDIARYDIR}/misc/i18n/tdiary.conf.sample-en
84
.else
85
	@${ECHO_MSG} "===>  TDIARY : Japanese Language messages support"
86
	@${INSTALL_DATA} ${WRKSRC}/misc/plugin/jdate.rb ${TDIARYDIR}/plugin
87
	@${ECHO_CMD} '${TDIARYDIR:S|${LOCALBASE}/||}/plugin/jdate.rb' >> ${TMPPLIST}
88
	@${RUBY} -i -pe 'sub(/%Y-%m-%d/, "%Y-%m-%d [%J]")' ${TDIARYDIR}/tdiary.conf.sample
71
.endif
89
.endif
72
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR}
90
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR}
73
91
74
post-install:
92
post-install:
75
	@cd ${WRKSRC} && ${FIND} . -type f -o -type l | ${SED} -e 's,^\.,share/examples/${PORTNAME},' >> ${TMPPLIST}
93
	@cd ${WRKSRC} && ${FIND} . -type f -o -type l | ${SED} -e 's,^\.,${TDIARYDIR:S|${LOCALBASE}/||},' >> ${TMPPLIST}
76
.if defined(WITH_TDIARY_UCONV)
94
	@cd ${WRKSRC} && ${FIND} . -type d -depth  | ${SED} -e 's,^\.,@dirrm ${TDIARYDIR:S|${LOCALBASE}/||},' >> ${TMPPLIST}
77
	@${ECHO} 'share/examples/${PORTNAME}/plugin/output_rdf.rb' >> ${TMPPLIST}
95
	@${SED} -e "s,%%EXAMPLESDIR%%,${EXAMPLESDIR},g" ${PKGMESSAGE}
78
.endif
79
.if defined(WITH_TDIARY_NORA)
80
	@${ECHO} 'share/examples/${PORTNAME}/plugin/disp_referrer.rb' >> ${TMPPLIST}
81
.endif
82
	@${ECHO} 'share/examples/${PORTNAME}/plugin/comment_mail-sendmail.rb' >> ${TMPPLIST}
83
.if ${TDIARY_LANG} == tdiary.conf-en
84
	@${ECHO} 'share/examples/${PORTNAME}/plugin/00lang.en.rb' >> ${TMPPLIST}
85
.endif
86
	@cd ${WRKSRC} && ${FIND} . -type d -depth  | ${SED} -e 's,^\.,@dirrm share/examples/${PORTNAME},' >> ${TMPPLIST}
87
	@${SED} -e "s,@@@@PREFIX@@@@,${PREFIX},g" ${PKGMESSAGE}
88
96
89
.include <bsd.port.mk>
97
.include <bsd.port.mk>
(-)/usr/ports/www/tdiary-stable/files/tdiary-FreeBSD.sh.in (-3 lines)
Lines 54-62 Link Here
54
	HOMEOWN=`grep ^$USER: /etc/passwd | cut -f3 -d':'`
54
	HOMEOWN=`grep ^$USER: /etc/passwd | cut -f3 -d':'`
55
	HOMEGRP=`grep ^$USER: /etc/passwd | cut -f4 -d':'`
55
	HOMEGRP=`grep ^$USER: /etc/passwd | cut -f4 -d':'`
56
	HOMEDIR=`grep ^$USER: /etc/passwd | cut -f6 -d':'`	
56
	HOMEDIR=`grep ^$USER: /etc/passwd | cut -f6 -d':'`	
57
#	HOMEOWN=$USER
58
#	HOMEGRP=$GROUP
59
#	HOMEDIR=$HOME
60
	echo "HOME Directory : " ${HOMEDIR}
57
	echo "HOME Directory : " ${HOMEDIR}
61
	USERNAME=$USER
58
	USERNAME=$USER
62
	;;
59
	;;
(-)/usr/ports/www/tdiary-stable/files/tdiaryinst.rb.in (-28 / +85 lines)
Lines 1-10 Link Here
1
#!/usr/local/bin/ruby
1
#!/usr/bin/env ruby
2
#
2
#
3
# tdiaryinstall.rb - tDiary user directory copy script
3
# tdiaryinstall.rb - tDiary user directory copy script
4
# Date created:			13 July 2003
4
# Date created:                        13 July 2003
5
# Whom:				KAMIYA Satosi  <mimoriso@anet.ne.jp>
5
# Whom:                                KAMIYA Satosi  <mimoriso@anet.ne.jp>
6
#
6
#
7
# $FreeBSD: ports/www/tdiary/files/tdiaryinst.rb.in,v 1.1 2003/07/29 05:53:24 daichi Exp $
7
# $FreeBSD$
8
#
8
#
9
9
10
require 'getoptlong'
10
require 'getoptlong'
Lines 17-22 Link Here
17
$OPT_TDIARYMASTER = "@@@@PREFIX@@@@/share/examples/tdiary"
17
$OPT_TDIARYMASTER = "@@@@PREFIX@@@@/share/examples/tdiary"
18
$OPT_LANG         = '@@@@LANG@@@@'
18
$OPT_LANG         = '@@@@LANG@@@@'
19
19
20
module FileUtils16
21
  def FileUtils16.mkdir_p(dir, *options)
22
    begin
23
      FileUtils.mkdir_p(dir, *options)
24
    rescue TypeError
25
      optionhash = {}
26
      options.each { |o| optionhash[o] = true }
27
      FileUtils.mkdir_p(dir, optionhash)
28
    end
29
  end
30
  def FileUtils16.cp(src, dest, *options)
31
    begin
32
      FileUtils.cp(src, dest, *options)
33
    rescue TypeError
34
      optionhash = {}
35
      options.each { |o| optionhash[o] = true }
36
      FileUtils.cp(src, dest, optionhash)
37
    end
38
  end
39
  def FileUtils16.cp_r(src, dest, *options)
40
    begin
41
      FileUtils.cp_r(src, dest, *options)
42
    rescue TypeError
43
      optionhash = {}
44
      options.each { |o| optionhash[o] = true }
45
      FileUtils.cp_r(src, dest, optionhash)
46
    end
47
  end
48
  def FileUtils16.rm(list, *options)
49
    begin
50
      FileUtils.rm(list, *options)
51
    rescue TypeError
52
      optionhash = {}
53
      options.each { |o| optionhash[o] = true }
54
      FileUtils.rm(list, optionhash)
55
    end
56
  end
57
  def FileUtils16.ln_s(list, destdir, *options)
58
    begin
59
      FileUtils.ln_s(list, destdir, *options)
60
    rescue TypeError
61
      optionhash = {}
62
      options.each { |o| optionhash[o] = true }
63
      FileUtils.ln_s(list, destdir, optionhash)
64
    end
65
  end
66
  def FileUtils16.chmod(mode, list, *options)
67
    begin
68
      FileUtils.chmod(mode, list, *options)
69
    rescue TypeError
70
      optionhash = {}
71
      options.each { |o| optionhash[o] = true }
72
      FileUtils.chmod(mode, list, optionhash)
73
    end
74
  end
75
end
76
20
def usage
77
def usage
21
  STDERR.print "Usage: #{File.basename($0)} [options]\n"
78
  STDERR.print "Usage: #{File.basename($0)} [options]\n"
22
  STDERR.print "Options:\n"
79
  STDERR.print "Options:\n"
Lines 73-89 Link Here
73
  attr_accessor :fileutilOptions
130
  attr_accessor :fileutilOptions
74
  attr_accessor :author_name
131
  attr_accessor :author_name
75
  attr_accessor :author_mail
132
  attr_accessor :author_mail
76
  attr_accessor :author_host
133
  attr_reader   :author_host #FK
77
  def initialize # ½é´üÃͤÎÀßÄê
134
  def initialize # ½é´üÃͤÎÀßÄê
78
    @passwd   = Etc.getpwuid() # ½é´üÃÍ¤Ï¥í¥°¥¤¥ó¥æ¡¼¥¶
135
    @passwd   = Etc.getpwuid() # ½é´üÃÍ¤Ï¥í¥°¥¤¥ó¥æ¡¼¥¶
79
    @euid     = @passwd.uid
136
    @euid     = @passwd.uid
80
    @username = (@passwd.name) # username=(value) ¥á¥½¥Ã¥É¤ÇºÆÄêµÁ¤·¤Æ¤¤¤ë
137
    @username =(@passwd.name) # username=(value) ¥á¥½¥Ã¥É¤ÇºÆÄêµÁ¤·¤Æ¤¤¤ë #FK
81
    @diarydir = 'diary'
138
    @diarydir = 'diary'
82
    @httpdir  = 'public_html'
139
    @httpdir  = 'public_html'
83
    @fileutilOptions = []
140
    @fileutilOptions = []
84
    @author_name = @passwd.gecos # F.Kimura
141
    @author_name = @passwd.gecos #FK
85
    @author_host = "#{`hostname`.chomp}" # F.Kimura
142
    @author_host = "#{`hostname`.chomp}" #FK
86
    @author_mail = "#{@username}@#{`hostname`.chomp}"
143
    @author_mail = "#{@username}@#{`hostname`.chomp}" #FK
87
  end
144
  end
88
145
89
  def username=(value) # username ¤òÂåÆþ¤¹¤ëºÝ¤Ë passwd¥á¥ó¥ÐÊÑ¿ô¤â¹¹¿·¤¹¤ë
146
  def username=(value) # username ¤òÂåÆþ¤¹¤ëºÝ¤Ë passwd¥á¥ó¥ÐÊÑ¿ô¤â¹¹¿·¤¹¤ë
Lines 135-165 Link Here
135
  def prepareDirs
192
  def prepareDirs
136
    # ¥¤¥ó¥¹¥È¡¼¥ëÀè¥Ç¥£¥ì¥¯¥È¥ê¤ÎÍÑ°Õ
193
    # ¥¤¥ó¥¹¥È¡¼¥ëÀè¥Ç¥£¥ì¥¯¥È¥ê¤ÎÍÑ°Õ
137
    if ! FileTest.exist?("#{@passwd.dir}/#{@diarydir}")
194
    if ! FileTest.exist?("#{@passwd.dir}/#{@diarydir}")
138
      FileUtils.mkdir_p("#{@passwd.dir}/#{@diarydir}", *@fileutilOptions)
195
      FileUtils16.mkdir_p("#{@passwd.dir}/#{@diarydir}", *@fileutilOptions)
139
    end
196
    end
140
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}")
197
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}")
141
      FileUtils.mkdir_p("#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
198
      FileUtils16.mkdir_p("#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
142
    end
199
    end
143
  end
200
  end
144
201
145
  def linkBaseFile # tDiary¤ÎÇÛÉÛ¥Õ¥¡¥¤¥ë¤Ï¥³¥Ô¡¼¤·¤Ê¤¤
202
  def linkBaseFile # tDiary¤ÎÇÛÉÛ¥Õ¥¡¥¤¥ë¤Ï¥³¥Ô¡¼¤·¤Ê¤¤
146
    FileUtils.cp_r("#{@tdiarymaster}/plugin", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", :preserve, *@fileutilOptions)
203
    FileUtils16.cp_r("#{@tdiarymaster}/plugin", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", :preserve, *@fileutilOptions)
147
    FileUtils.ln_s("#{@tdiarymaster}/theme", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
204
    FileUtils16.ln_s("#{@tdiarymaster}/theme", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
148
    FileUtils.ln_s("#{@tdiarymaster}/doc", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
205
    FileUtils16.ln_s("#{@tdiarymaster}/doc", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions)
149
    tempfile = Tempfile.new("index.rb")
206
    tempfile = Tempfile.new("index.rb")
150
    tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/index'\n"
207
    tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/index'\n"
151
    tempfile.close
208
    tempfile.close
152
    FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", *@fileutilOptions)
209
    FileUtils16.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", *@fileutilOptions)
153
    FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", *@fileutilOptions)
210
    FileUtils16.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", *@fileutilOptions)
154
    tempfile = Tempfile.new("update.rb")
211
    tempfile = Tempfile.new("update.rb")
155
    tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/update'\n"
212
    tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/update'\n"
156
    tempfile.close
213
    tempfile.close
157
    FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", *@fileutilOptions)
214
    FileUtils16.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", *@fileutilOptions)
158
    FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", *@fileutilOptions)
215
    FileUtils16.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", *@fileutilOptions)
159
  end
216
  end
160
217
161
  def copyBaseFile # tDiary¤ÎÇÛÉÛ¥Õ¥¡¥¤¥ë¤ò¤¹¤Ù¤Æ¥³¥Ô¡¼
218
  def copyBaseFile # tDiary¤ÎÇÛÉÛ¥Õ¥¡¥¤¥ë¤ò¤¹¤Ù¤Æ¥³¥Ô¡¼
162
    FileUtils.cp_r("#{@tdiarymaster}/", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", :preserve, *@fileutilOptions)
219
    FileUtils16.cp_r("#{@tdiarymaster}/", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", :preserve, *@fileutilOptions)
163
  end
220
  end
164
221
165
  def installConfig
222
  def installConfig
Lines 167-197 Link Here
167
    tempfile = Tempfile.new("tdiary.conf-ja") # ÆüËܸì´Ä¶­¥µ¥ó¥×¥ë
224
    tempfile = Tempfile.new("tdiary.conf-ja") # ÆüËܸì´Ä¶­¥µ¥ó¥×¥ë
168
    tempfile.write tdiaryConfReplace("#{@tdiarymaster}/tdiary.conf.sample")
225
    tempfile.write tdiaryConfReplace("#{@tdiarymaster}/tdiary.conf.sample")
169
    tempfile.close
226
    tempfile.close
170
    FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf-ja", *@fileutilOptions)
227
    FileUtils16.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf-ja", *@fileutilOptions)
171
228
172
    tempfile = Tempfile.new("tdiary.conf-en") # sample configuration for English Environment
229
    tempfile = Tempfile.new("tdiary.conf-en") # sample configuration for English Environment
173
    tempfile.write tdiaryConfReplace("#{@tdiarymaster}/misc/i18n/tdiary.conf.sample-en")
230
    tempfile.write tdiaryConfReplace("#{@tdiarymaster}/misc/i18n/tdiary.conf.sample-en")
174
    tempfile.close
231
    tempfile.close
175
    FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf-en", *@fileutilOptions)
232
    FileUtils16.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf-en", *@fileutilOptions)
176
233
177
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf") # tdiary.conf ¤¬¤Ê¤±¤ì¤ÐÀßÃÖ
234
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf") # tdiary.conf ¤¬¤Ê¤±¤ì¤ÐÀßÃÖ
178
      FileUtils.cp("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/#{@tdconfig}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf", *@fileutilOptions)
235
      FileUtils16.cp("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/#{@tdconfig}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.conf", *@fileutilOptions)
179
    end
236
    end
180
    # TODO: @lang¤ÎÃͤˤè¤Ã¤Æ plugin/00lang.en.rb ¥³¥Ô¡¼/ºï½ü¤ÎÀ©¸æ¤â¤·¤¿¤¤
237
    # TODO: @lang¤ÎÃͤˤè¤Ã¤Æ plugin/00lang.en.rb ¥³¥Ô¡¼/ºï½ü¤ÎÀ©¸æ¤â¤·¤¿¤¤
181
238
182
    tempfile = Tempfile.new("dot.htaccess")
239
    tempfile = Tempfile.new("dot.htaccess")
183
    tempfile.write dothtaccessReplace("#{@tdiarymaster}/dot.htaccess")
240
    tempfile.write dothtaccessReplace("#{@tdiarymaster}/dot.htaccess")
184
    tempfile.close
241
    tempfile.close
185
    FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/dot.htaccess", *@fileutilOptions)
242
    FileUtils16.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/dot.htaccess", *@fileutilOptions)
186
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess")
243
    if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess")
187
      FileUtils.cp("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/dot.htaccess", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess", *@fileutilOptions)
244
      FileUtils16.cp("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/dot.htaccess", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess", *@fileutilOptions)
188
    end
245
    end
189
  end
246
  end
190
247
191
  def setPermissions # ¥Õ¥¡¥¤¥ë¥³¥Ô¡¼¡¦À¸À®°Ê³°¤Î½èÍý
248
  def setPermissions # ¥Õ¥¡¥¤¥ë¥³¥Ô¡¼¡¦À¸À®°Ê³°¤Î½èÍý
192
    FileUtils.chmod(0777, "#{@passwd.dir}/#{@diarydir}", *@fileutilOptions) if ! defined?($OPT_SUEXEC)
249
    FileUtils16.chmod(0777, "#{@passwd.dir}/#{@diarydir}", *@fileutilOptions) if ! defined?($OPT_SUEXEC)
193
    FileUtils.chmod(0777, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions) if ! defined?($OPT_SUEXEC)
250
    FileUtils16.chmod(0777, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", *@fileutilOptions) if ! defined?($OPT_SUEXEC)
194
    FileUtils.rm("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary-FreeBSD.sh", :force, *@fileutilOptions)
251
    FileUtils16.rm("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary-FreeBSD.sh", :force, *@fileutilOptions)
195
252
196
    if @euid == 0 then # superuser ¸¢¸Â¤Ç¤³¤Î¥¤¥ó¥¹¥È¡¼¥é¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¾ì¹ç
253
    if @euid == 0 then # superuser ¸¢¸Â¤Ç¤³¤Î¥¤¥ó¥¹¥È¡¼¥é¤ò¼Â¹Ô¤·¤Æ¤¤¤ë¾ì¹ç
197
      # ¤¹¤Ù¤Æ¤Î¥Ç¥£¥ì¥¯¥È¥ê¡¦¥Õ¥¡¥¤¥ë¤Ë chown ¤Ç½êÍ­¼ÔÊѹ¹
254
      # ¤¹¤Ù¤Æ¤Î¥Ç¥£¥ì¥¯¥È¥ê¡¦¥Õ¥¡¥¤¥ë¤Ë chown ¤Ç½êÍ­¼ÔÊѹ¹
Lines 216-222 Link Here
216
        line = "@author_name = '#{@author_name}'\n" if line =~ /^\@author_name\s/
273
        line = "@author_name = '#{@author_name}'\n" if line =~ /^\@author_name\s/
217
        line = "@author_mail = '#{@author_mail}'\n" if line =~ /^\@author_mail\s/
274
        line = "@author_mail = '#{@author_mail}'\n" if line =~ /^\@author_mail\s/
218
        line = "@html_title = '#{@author_name} diary'\n" if line =~ /^\@html_title\s/
275
        line = "@html_title = '#{@author_name} diary'\n" if line =~ /^\@html_title\s/
219
        line = "@index_page = 'http://#{@author_host}/~#{@username}\/'" if line =~ /^\@index_page\s/ # F.Kimura
276
        line = "@index_page = 'http://#{@author_host}/~#{@username}\/'" if line =~ /^\@index_page\s/ #FK
220
        s += line
277
        s += line
221
      }
278
      }
222
    }
279
    }
(-)/usr/ports/www/tdiary-stable/pkg-message (-4 / +4 lines)
Lines 3-18 Link Here
3
There is a script to install tDiary in a user directory.
3
There is a script to install tDiary in a user directory.
4
This script should be run manually.
4
This script should be run manually.
5
5
6
  # ruby @@@@PREFIX@@@@/share/examples/tdiary/tdiaryinst.rb --user=hoge
6
  # ruby %%EXAMPLESDIR%%/tdiaryinst.rb --user=hoge
7
   or
7
   or
8
  % ruby @@@@PREFIX@@@@/share/examples/tdiary/tdiaryinst.rb
8
  % ruby %%EXAMPLESDIR%%/tdiaryinst.rb
9
9
10
same as script :
10
same as script :
11
    @@@@PREFIX@@@@/share/examples/tdiary/tdiary-FreeBSD.sh
11
    %%EXAMPLESDIR%%/tdiary-FreeBSD.sh
12
12
13
There is a document by English in the following directories.
13
There is a document by English in the following directories.
14
  See ...
14
  See ...
15
  @@@@PREFIX@@@@/share/examples/tdiary/misc/i18n/
15
  %%EXAMPLESDIR%%/misc/i18n/
16
   and
16
   and
17
  Explanation by English of a tDiary system can refer to the following page :
17
  Explanation by English of a tDiary system can refer to the following page :

Return to bug 58549