1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Update to 0.12.0 [1]

- Fix rc file [1]
- Major Makefile cleanup
- Move install to ${DATADIR}
- Fix pkg-plist (pkg_delete)
- Add pkg-message
- Take maintainership

PR:		ports/120971
Submitted by:	Salvatore Montefusco <sm@brightpebbles.org> [1]
This commit is contained in:
Beech Rintoul 2008-02-23 23:40:03 +00:00
parent a4690da273
commit 437ecf6910
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=207817
6 changed files with 1768 additions and 1247 deletions

View File

@ -6,66 +6,74 @@
#
PORTNAME= instiki
PORTVERSION= 0.11.0
PORTREVISION= 3
PORTVERSION= 0.12.0
CATEGORIES= www ruby
MASTER_SITES= ${MASTER_SITE_RUBYFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}-0.11.pl1
MASTER_SITES= RF
DISTNAME= ${PORTNAME}-0.12.0
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
MAINTAINER= beech@FreeBSD.org
COMMENT= Easy to set up wiki clone implemented in ruby
LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3
BUILD_DEPENDS= rake:${PORTSDIR}/devel/rubygem-rake
USE_RUBY= yes
USE_RUBY_FEATURES= 1.8
USE_LDCONFIG= yes
INSTIKIDIR?= instiki
INSTIKIPORT?= 2500
USE_RC_SUBR= ${PORTNAME}
PLIST_SUB= INSTIKIDIR=${INSTIKIDIR}/
SUB_LIST+= INSTIKIDIR=${INSTIKIDIR} \
INSTIKIPORT=${INSTIKIPORT} \
RUBY_WITH_SUFFIX=${RUBY_WITH_SUFFIX}
SUB_FILES+= pkg-deinstall
RUBY_SHEBANG_FILES=instiki
OPTIONS= PORT_BLUECLOTH "Use BlueCloth gem from ports" On
do-build:
( cd ${WRKSRC}/db/ && \
rake environment RAILS_ENV=production migrate )
do-install:
@${FIND} -E ${WRKSRC} -type f -iregex ".*\._.+" -exec ${RM} "{}" \;
${CP} -pR ${WRKSRC}/ ${PREFIX}/${INSTIKIDIR}
${CP} ${PREFIX}/${INSTIKIDIR}/db/production.db.sqlite3 \
${PREFIX}/${INSTIKIDIR}/db/default.db.sqlite3
${CHMOD} +x ${PREFIX}/${INSTIKIDIR}/instiki
.include <bsd.port.pre.mk>
.if defined(WITH_PORT_BLUECLOTH)
USE_RC_SUBR= ${PORTNAME}
SUB_LIST= INSTIKIPORT=${INSTIKIPORT} \
RUBY_WITH_SUFFIX=${RUBY_WITH_SUFFIX}
SUB_FILES+= pkg-deinstall pkg-message
RUBY_SHEBANG_FILES=instiki
.if defined(WITH_PORT_BLUECLOTH)
# can't include this because it redefines do-install.
# .include "${PORTSDIR}/devel/ruby-gems/Makefile.common"
# For now, copy and paste the definition of SPEC_DIR from the above
REV= 1.8
GEMS_BASE_DIR= lib/ruby/gems/${REV}
SPEC_DIR= ${GEMS_BASE_DIR}/specifications
RUN_DEPENDS+= ${LOCALBASE}/${SPEC_DIR}/BlueCloth-1.0.0.gemspec:${PORTSDIR}/www/rubygem-bluecloth
BUILD_DEPENDS+= ${LOCALBASE}/${SPEC_DIR}/BlueCloth-1.0.0.gemspec:${PORTSDIR}/www/rubygem-bluecloth
EXTRA_PATCHES+= ${FILESDIR}/bluecloth-patch-lib-chunks-engines-rb
.endif
pre-fetch:
@${ECHO_MSG} ""
@${ECHO_MSG} " ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
@${ECHO_MSG} ""
@${ECHO_MSG} " WARNING!"
@${ECHO_MSG} "If you are updating from a previous version, Hit ^c now"
@${ECHO_MSG} "and read /usr/ports/UPDATING!"
@${ECHO_MSG} ""
@${ECHO_MSG} " ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !"
post-extract:
@find -d ${WRKSRC} -type d -name .svn -exec rm -rf {} \;
post-patch:
${RM} ${WRKSRC}/lib/chunks/engines.rb.orig
.endif
do-build:
( cd ${WRKSRC}/db/ && \
rake environment RAILS_ENV=production db:migrate )
do-install:
@${FIND} -E ${WRKSRC} -type f -iregex ".*\._.+" -exec ${RM} "{}" \;
@${INSTALL} -d ${DATADIR}
@${CP} -pR ${WRKSRC}/ ${DATADIR}
@${CP} -n ${DATADIR}/db/production.db.sqlite3 ${DATADIR}/db/default.db.sqlite3
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (instiki-0.11.pl1.tgz) = 42859487777cf56199cfe8c343a9c33b
SHA256 (instiki-0.11.pl1.tgz) = 777fc053818b139b0aac7dd96d274a194b93d35dbfb70d0d8a8aa2d3e49a27d8
SIZE (instiki-0.11.pl1.tgz) = 1344168
MD5 (instiki-0.12.0.tgz) = 41a0aad7b2decddbbe5d1f28958c7119
SHA256 (instiki-0.12.0.tgz) = 152b2ed678e91ac909ed263ccdb5c82d4966e25a2e60873ce4f0c5a3553100a1
SIZE (instiki-0.12.0.tgz) = 4493156

View File

@ -14,18 +14,40 @@
name="instiki"
rcvar=${name}_enable
start_cmd="${name}_start"
status_cmd="${name}_status"
stop_cmd="${name}_stop"
#rcvar=`set_rcvar`
command="%%PREFIX%%/%%INSTIKIDIR%%/instiki"
command_interpreter="%%RUBY_WITH_SUFFIX%%"
command="%%DATADIR%%/instiki.rb"
command_interpreter="/usr/bin/env"
: ${instiki_enable="NO"}
: ${instiki_flags="--port %%INSTIKIPORT%% --daemon"}
instiki_pid=$(ps x | grep "ruby $command" | grep -v grep | awk '{ print $1 }' )
sig_stop=KILL
instiki_start()
{
unset "start_cmd"
test -n "$instiki_pid" || run_rc_command start
}
instiki_status()
{
if [ -n "$instiki_pid" ] ; then
echo "Instiki is running at pid: $instiki_pid"
else
echo "Instiki is not running."
fi
}
instiki_stop()
{
test -n "$instiki_pid" && kill -$sig_stop $instiki_pid
}
load_rc_config $name
run_rc_command "$1"

View File

@ -5,9 +5,9 @@ if [ "$2" != "DEINSTALL" ]; then
exit 0
fi
echo "comparing databases in %%PREFIX%%/%%INSTIKIDIR%%/db"
echo "comparing databases in %%DATADIR%%/db"
cd %%PREFIX%%/%%INSTIKIDIR%%/db || exit 1
cd %%DATADIR%%/db || exit 1
if ! cmp -s -z production.db.sqlite3 default.db.sqlite3; then
echo "production.db.sqlite3 changed from default, not removing"
else

View File

@ -0,0 +1,15 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
instiki has been installed in %%DATADIR%%
Please add:
instiki_enable="YES" to your /etc/rc.conf
From a terminal do:
%%LOCALBASE%%/etc/rc.d/instwiki start
Point your browser to: http://localhost:2500 for setup.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

File diff suppressed because it is too large Load Diff