# New ports collection makefile for: tdiary-devel # Date created: 9 June 2005 # Whom: Fumihiko Kimura # # $FreeBSD$ # PORTNAME= tdiary PORTVERSION= 2.1.4 PORTREVISION= 2 CATEGORIES?= www ruby MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ http://www.tdiary.org/download/ MASTER_SITE_SUBDIR= ${PORTNAME} PKGNAMESUFFIX= -devel DISTNAME= ${PORTNAME}-full-${PORTVERSION} PATCH_SITES= http://www.tdiary.org/download/ PATCHFILES= tdiary.20061126.patch tdiary.20061210.patch MAINTAINER= tota@rtfm.jp COMMENT= A Web-based diary system (like weblog) written in Ruby FORBIDDEN= contains a vulnerability: http://www.tdiary.org/20071215.html written in Japanese NO_BUILD= yes CONFLICTS?= tdiary-[0-9]* \ ja-tdiary-[0-9]* \ ja-tdiary-devel-[0-9]* PKGMESSAGE= ${WRKDIR}/pkg-message USE_RUBY= yes RUBY_VER= 1.8 #TDIARY_LANG ja:Japanese en:English zh:Traditional-Chinese RUBY_SHEBANG_FILES= index.rb update.rb misc/convert2.rb misc/plugin/squeeze.rb \ misc/plugin/amazon/amazonimg.rb \ misc/plugin/trackback/tb.rb misc/style/etdiary/etdiary_test.rb \ misc/plugin/pingback/pb.rb misc/plugin/xmlrpc/xmlrpc.rb PLIST_FILES= ${TDIARYDIR:S|${LOCALBASE}/||}/tdiaryinst.rb TDIARYDIR= ${EXAMPLESDIR}${PKGNAMESUFFIX} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} .if !defined(TDIARY_LANG) || ${TDIARY_LANG} != ja TDIARY_LANG= en .endif .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 .include .if ${RUBY_VERSION_CODE} < 182 IGNORE= only works with Ruby 1.8.2 or later .endif post-patch: @${FIND} ${WRKSRC} -name "*.orig" -type f -exec ${RM} -f {} \; do-install: @-${MKDIR} ${TDIARYDIR} @${SED} -e 's,#!/usr/bin/env ruby,#!${RUBY},' \ -e 's,@@@@PREFIX@@@@,${PREFIX},g' \ -e 's,@@@@TDIARY@@@@,${PORTNAME}${PKGNAMESUFFIX},g' \ -e 's,@@@@LANG@@@@,${TDIARY_LANG},g' \ ${FILESDIR}/tdiaryinst.rb.in > ${TDIARYDIR}/tdiaryinst.rb @${CP} -pR ${WRKSRC}/ ${TDIARYDIR} @${RUBY} -i -pe 'sub(/%Y-%m-%d/, "%Y-%m-%d [%a]")' ${TDIARYDIR}/misc/i18n/tdiary.conf.sample-en @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TDIARYDIR} post-install: @cd ${WRKSRC} && ${FIND} . -type f -o -type l | ${SED} -e 's,^\.,${TDIARYDIR:S|${LOCALBASE}/||},' >> ${TMPPLIST} @cd ${WRKSRC} && ${FIND} . -type d -depth | ${SED} -e 's,^\.,@dirrm ${TDIARYDIR:S|${LOCALBASE}/||},' >> ${TMPPLIST} @${SED} -e 's|%%EXAMPLESDIR%%|${TDIARYDIR}|' < ${FILESDIR}/pkg-message.in > ${PKGMESSAGE} @${CAT} ${PKGMESSAGE} .include