summaryrefslogtreecommitdiff
path: root/www/punbb/Makefile
blob: e9aafa8bfe5a2bd8ef55f6d17cc921f14a8ee9b1 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Created by: Gea-Suan Lin <gslin@gslin.org>
# $FreeBSD$

PORTNAME=	punbb
PORTVERSION=	1.2.23
CATEGORIES=	www
MASTER_SITES=	http://punbb.informer.com/download/ \
		http://punbb.informer.com/download/plugins/:plugins \
		http://punbb.informer.com/download/lang_packs-1.2/:lang \
		http://freebsd.csie.nctu.edu.tw/~gslin/files/punbb-${PORTVERSION}/:lang
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
		${LANGFILES:S/$/:lang/} \
		${PLUGINS:S/$/:plugins/}
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Fast and lightweight PHP-powered discussion board

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS+=	${UNZIP_CMD}:${PORTSDIR}/archivers/unzip

PORTEXAMPLES=	12_to_1222_update.php example_config.php \
		turn_off_maintenance_mode.php
SUB_FILES=	pkg-message

NO_BUILD=	yes
USE_PHP=	yes
USES=		tar:bzip2

OPTIONS_DEFINE=		LANGUAGE_PACK EXTRAS
OPTIONS_DEFAULT=	LANGUAGE_PACK EXTRAS
LANGUAGE_PACK_DESC=	Install language packs
EXTRAS_DESC=		Install all plugins available

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MLANGUAGE_PACK}
LANGFILES+=	Arabic.zip \
		Bangla_UTF8.zip \
		Belarusian.zip \
		Bosnian.zip \
		Brazilian_Portuguese.zip \
		Bulgarian.zip \
		Bulgarian_UTF8.zip \
		Catalan.zip \
		Czech.zip \
		Czech_UTF8.zip \
		Danish.zip \
		Dutch.zip \
		Estonian.zip \
		Farsi.zip \
		Finnish.zip \
		French.zip \
		Galician.zip \
		German.zip \
		Greek.zip \
		Hebrew.zip \
		Hindi.zip \
		Hrvatski.zip \
		Hungarian.zip \
		Icelandic.zip \
		Indonesian.zip \
		Italian.zip \
		Japanese.zip \
		Korean.zip \
		Kurdish.zip \
		Latvian.zip \
		Lithuanian.zip \
		Norwegian.zip \
		Polish.zip \
		Polish_UTF8.zip \
		Portuguese.zip \
		Romanian.zip \
		Russian.zip \
		Serbian.zip \
		Simplified_Chinese.zip \
		Slovak.zip \
		Slovak_UTF8.zip \
		Slovenian.zip \
		Spanish.zip \
		Swedish.zip \
		Traditional_Chinese.zip \
		Turkish.zip \
		Ukrainian.zip \
		Ukrainian_UTF8.zip \
		Urdu.zip \
		Vietnamese.zip
PLIST_SUB+=	LANGUAGE_PACK=""
.else
PLIST_SUB+=	LANGUAGE_PACK="@comment "
.endif

.if ${PORT_OPTIONS:MEXTRAS}
PLUGINS+=	AP_User_Merge.zip \
		AP_Author_Update.zip \
		AP_PunBB_Shell.zip \
		AP_Backup.zip \
		AP_Forum_cleanup.zip \
		AP_Clear_Cache.zip \
		AP_Merge_Forums.zip \
		AMP_Global_topic.zip \
		AP_Languages_and_styles.zip \
		AP_Broadcast_Email.zip \
		AP_DB_management.zip \
		AP_User_management.zip \
		AP_News_Generator.zip \
		AP_Version_Changer.zip
PLIST_SUB+=	PLUGINS=""
.else
PLIST_SUB+=	PLUGINS="@comment "
.endif

do-install:
	@cd ${WRKSRC}/upload && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}

.for i in ${LANGFILES}
	${UNZIP_CMD} -o ${DISTDIR}/${i} -d ${STAGEDIR}${WWWDIR}/lang -x '*/.DS_Store' -x '*/._.DS_Store'
.endfor

.for i in ${PLUGINS}
	${UNZIP_CMD} -o ${DISTDIR}/${i} -d ${STAGEDIR}${WWWDIR}/plugins
.endfor

	@${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}

.for i in ${PORTEXAMPLES}
	@${INSTALL_DATA} ${WRKSRC}/extras/${i} ${STAGEDIR}${EXAMPLESDIR}
.endfor

	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}' >> ${TMPPLIST}

.include <bsd.port.mk>