1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00
freebsd-ports/www/tdiary/Makefile
Yasuhiro Kimura b6cd87641b www/tdiary: Update to 5.1.7
ChangeLog: https://tdiary.org/20210829.html

PR:	258165
Reported by:	yasu@utahime.org (maintainer)
2021-09-01 08:07:07 +02:00

104 lines
3.1 KiB
Makefile

# Created by: Fumihiko Kimura <jfkimura@yahoo.co.jp>
PORTNAME= tdiary
PORTVERSION= 5.1.7
CATEGORIES?= www ruby
MASTER_SITES= https://github.com/tdiary/tdiary-core/releases/download/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-full-v${PORTVERSION}
MAINTAINER= yasu@utahime.org
COMMENT= Web-based diary system (like weblog) written in Ruby
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= rubygem-bundler>=2.0.2:sysutils/rubygem-bundler \
rubygem-emot>=0.0.4:textproc/rubygem-emot \
rubygem-fastimage>=2.1.7:graphics/rubygem-fastimage \
rubygem-hikidoc>=0.1.0:textproc/rubygem-hikidoc \
rubygem-mail>=2.7.1:mail/rubygem-mail \
rubygem-rack>=2.2.3,3:www/rubygem-rack \
rubygem-rake>=12.3.3:devel/rubygem-rake
USES= cpe shebangfix
USE_RUBY= yes
SHEBANG_FILES= bin/tdiary index.fcgi index.rb misc/convert2.rb misc/migrate.rb \
misc/plugin/xmlrpc/xmlrpc.rb update.fcgi update.rb
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
WWWDIR= ${PREFIX}/www/${PKGBASE}
REINPLACE_ARGS= -i ''
NO_ARCH= yes
NO_BUILD= yes
SUB_FILES= pkg-message tdiaryinst.rb
SUB_LIST+= TDIARY_LANG=${TDIARY_LANG} \
TDIARY_SCRIPT=${TDIARY_SCRIPT}
WRKSRC= ${WRKDIR}/${PORTNAME}-v${PORTVERSION}
PLIST_SUB= TDIARY_SCRIPT=${TDIARY_SCRIPT} \
WWWGRP=${WWWGRP} \
WWWOWN=${WWWOWN}
PORTDOCS= ${HTML} ${MD} ChangeLog doc.css
OPTIONS_DEFINE= DOCS
DOCFILES= HOWTO-authenticate-in-rack HOWTO-make-io HOWTO-make-plugin \
HOWTO-make-theme HOWTO-testing-tDiary HOWTO-use-plugin \
HOWTO-write-tDiary.en HOWTO-write-tDiary INSTALL-paas INSTALL \
README.en README UPGRADE
HTML= ${DOCFILES:S/$/.html/}
MD= ${DOCFILES:S/$/.md/}
#TDIARY_LANG ja:Japanese en:English
.if !defined(TDIARY_LANG) || ( defined(TDIARY_LANG) && ${TDIARY_LANG} != ja )
TDIARY_LANG= en
.endif
TDIARY_SCRIPT= ${PKGBASE}-inst.rb
pre-patch:
@${RM} ${WRKSRC}/.coveralls.yml
@${RM} ${WRKSRC}/.dockerignore
@${RM} ${WRKSRC}/.editorconfig
@${RM} ${WRKSRC}/.gitignore
@${RM} ${WRKSRC}/.travis.yml
@${RM} ${WRKSRC}/Dockerfile
@${RM} ${WRKSRC}/Gemfile.lock
@${RM} ${WRKSRC}/Procfile
@${RM} ${WRKSRC}/Rakefile
@${RM} ${WRKSRC}/config.ru
@${RM} ${WRKSRC}/tdiary.gemspec
@${RM} ${WRKSRC}/tmp/.gitkeep
@${RM} -r ${WRKSRC}/.bundle
@${RM} -r ${WRKSRC}/.devcontainer
@${RM} -r ${WRKSRC}/.github
@${RM} -r ${WRKSRC}/.vscode
@${RM} -r ${WRKSRC}/misc/lib/bundler-2.2.18
@${RM} -r ${WRKSRC}/public
@${RM} -r ${WRKSRC}/spec
@${RM} -r ${WRKSRC}/test
@${RM} -r ${WRKSRC}/vendor
@${MV} ${WRKSRC}/ChangeLog ${WRKSRC}/doc
@${MV} ${WRKSRC}/README.md ${WRKSRC}/doc
pre-install:
@${SED} -e 's,#!/usr/bin/env ruby,#!${RUBY},' \
${WRKDIR}/tdiaryinst.rb > ${WRKDIR}/${TDIARY_SCRIPT}
@${REINPLACE_CMD} 's!%%LOCALBASE%%!${LOCALBASE}!g' \
${WRKSRC}/misc/convert2.rb \
${WRKSRC}/misc/migrate.rb
@${FIND} ${WRKSRC} -name "*.orig" -delete
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/${TDIARY_SCRIPT} ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${WWWDIR}
${TAR} --exclude doc --exclude LICENSE -C ${WRKSRC} -cf - . | ${TAR} --unlink -C ${STAGEDIR}${WWWDIR} -xf -
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>