blob: c78a73bf540c0902caf71df7a4108f7be35c3de0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# New ports collection makefile for: MT
# Date created: 7 Oct 2003
# Whom: Shen Chuan-Hsing <statue@freebsd.sincia.edu.tw>
#
# $FreeBSD$
#
PORTNAME= MT
PORTVERSION= 2.661
PORTREVISION= 3
CATEGORIES= chinese
MASTER_SITES= http://mtbook.net/download/
DISTFILES= MT-${PORTVERSION}-full-lib.new.tar.gz mt.diff mt.no-htmlarea.diff
EXTRACT_ONLY= MT-${PORTVERSION}-full-lib.new.tar.gz
MAINTAINER= ports@FreeBSD.org
COMMENT= Web-based personal publishing system like weblogs
RUN_DEPENDS= ${LOCALBASE}/${CGIDIR}/mt.cgi:${PORTSDIR}/www/MT
NO_BUILD= yes
NO_WRKSUBDIR= yes
DATADIR= www/data/mt
CGIDIR= www/cgi-bin/mt
PLIST_SUB+= DATADIR=${DATADIR} CGIDIR=${CGIDIR}
PATCH_MT_ARGS= -d ${PREFIX}/${CGIDIR} --forward --quiet -E -p1
USE_REINPLACE= yes
PKGDEINSTALL= ${PKGINSTALL}
.if defined(WITH_HTMLAREA)
MT_DIFF= mt.diff
.else
MT_DIFF= mt.no-htmlarea.diff
.endif
post-extract:
@${MKDIR} ${WRKDIR}/${DATADIR} ${WRKDIR}/${CGIDIR}
@${MV} ${WRKDIR}/MT-${PORTVERSION}-full-lib/lib ${WRKDIR}/${CGIDIR}
@${MV} ${WRKDIR}/MT-${PORTVERSION}-full-lib/extlib ${WRKDIR}/${CGIDIR}
@${MV} ${WRKDIR}/MT-${PORTVERSION}-full-lib/*cgi ${WRKDIR}/${CGIDIR}
@${MV} ${WRKDIR}/MT-${PORTVERSION}-full-lib/mt-rebuild.pl ${WRKDIR}/MT-${PORTVERSION}-full-lib/plugins/mt-rebuild.pl
@${MV} ${WRKDIR}/MT-${PORTVERSION}-full-lib/* ${WRKDIR}/${DATADIR}
@${RMDIR} ${WRKDIR}/MT-${PORTVERSION}-full-lib
@${CHMOD} ${BINMODE} ${WRKDIR}/${CGIDIR}/*cgi
do-install:
@${REINPLACE_CMD} -e 's/# PublishCharset Shift_JIS/PublishCharset UTF-8/g' \
${LOCALBASE}/${CGIDIR}/mt.cgi
@cd ${WRKDIR} && ${CP} -R www ${PREFIX}
@${ECHO} "===> Patching www/MT for ${PKGNAME}"
@${CAT} ${DISTDIR}/${MT_DIFF} | \
${SED} -e 's#$$MT_DIR, .schemas.#"${PREFIX}/${DATADIR}/schemas"#' > \
${PREFIX}/${DATADIR}/mt.diff
@${FIND} ${PREFIX}/${CGIDIR} \( -name "*.orig" -o -name "*.bak" -o -name "*.rej" \) -delete
@${CHOWN} -R www:www ${PREFIX}/${CGIDIR} ${PREFIX}/${DATADIR}
post-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
|