summaryrefslogtreecommitdiff
path: root/www/typolight28/Makefile
blob: b0bf1eff570d99b2592b0c60a7f4e4f48b9e675f (plain)
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
# $NetBSD: Makefile,v 1.2 2009/12/23 12:53:46 taca Exp $
#

DISTNAME=	typolight-${TL_VERSION}
PKGNAME=	typolight${TL_VER}-${TL_PKGVER}
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=typolight/}

MAINTAINER=	taca@NetBSD.org
HOMEPAGE=	http://www.typolight.org/
COMMENT=	Powerful web content management system (CMS)
LICENSE=	gnu-lgpl-v3

DEPENDS+=	${PHP_PKG_PREFIX}-gd>=5.2.0:../../graphics/php-gd
DEPENDS+=	${PHP_PKG_PREFIX}-mbstring>=5.2.0:../../misc/php-mbstring
DEPENDS+=	${PHP_PKG_PREFIX}-mysql>=5.2.0:../../databases/php-mysql
DEPENDS+=	${PHP_PKG_PREFIX}-mcrypt>=5.2.0:../../security/php-mcrypt
DEPENDS+=	${PHP_PKG_PREFIX}-soap>=5.2.0:../../net/php5-soap

PKG_DESTDIR_SUPPORT=	destdir

PHP_VERSIONS_ACCEPTED=	5

USE_TOOLS=	pax
NO_BUILD=	yes

EG_DATA=	${WWW_EG_FILES} system/config tl_files
EG_FILES=	system/config/config.php system/config/countries.php \
		system/config/dcaconfig.php system/config/langconfig.php \
		system/config/languages.php \
		system/config/tcpdf.php system/config/timezones.php \
		system/config/tinyFlash.php system/config/tinyMCE.php \
		system/config/tinyNews.php
TMPL_FILES=	tl_files/tiny_templates/index.html
WWW_EG_FILES=	basic.css print.css robots.txt

CONF_FILES_PERMS+=	${TL_EGDIR}/system/config/localconfig.php \
			${TL_WEBDIR}/system/config/localconfig.php \
			${APACHE_USER} ${APACHE_GROUP} 0600

CONF_FILES+=		${TL_EGDIR}/typolight.conf \
			${PKG_SYSCONFDIR}/typolight.conf \
			${TL_EGDIR}/templates-htaccess \
			${TL_WEBDIR}/templates/.htaccess

.for f in ${EG_FILES}
CONF_FILES+=		${TL_EGDIR}/${f} ${TL_WEBDIR}/${f}
.endfor

.for f in ${TMPL_FILES}
REQD_FILES+=		${TL_EGDIR}/${f} ${TL_WEBDIR}/${f}
.endfor

.for f in ${WWW_EG_FILES}
CONF_FILES_PERMS+=	${TL_EGDIR}/${f} ${TL_WEBDIR}/${f} \
			${APACHE_USER} ${APACHE_GROUP} 0644
.endfor

SUBST_CLASSES+=		conf
SUBST_FILES.conf+=	${WRKDIR}/typolight.conf
SUBST_SED.conf+=        -e 's|@PREFIX@|${PREFIX:Q}|g'
SUBST_SED.conf+=        -e 's|@TL_WEBDIR@|${TL_WEBDIR:Q}|g'
SUBST_STAGE.conf=	post-configure

WWW_FILES=	CHANGELOG.txt GPL.txt INSTALL.txt LGPL.txt \
		cron.php index.php plugins templates typolight
WWW_SYSFILES=	config/.htaccess constants.php drivers functions.php \
		html iefixes.css initialize.php interface.php libraries \
		logs/.htaccess mbstring.php modules themes tmp/.htaccess \
		typolight.css

INSTALLATION_DIRS+=	${TL_DOCDIR} ${TL_EGDIR} ${TL_WEBDIR}/system/config
OWN_DIRS_PERMS+= \
	${TL_WEBDIR} ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/plugins ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/plugins/tcpdf/cache ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system/drivers ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system/html ${BINOWN} ${APACHE_GROUP} 0770 \
	${TL_WEBDIR}/system/libraries ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system/logs ${BINOWN} ${APACHE_GROUP} 0770 \
	${TL_WEBDIR}/system/modules ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system/themes ${BINOWN} ${APACHE_GROUP} 0775 \
	${TL_WEBDIR}/system/tmp ${BINOWN} ${APACHE_GROUP} 0770 \
	${TL_WEBDIR}/templates ${BINOWN} ${APACHE_GROUP} 0770 \
	${TL_WEBDIR}/tl_files ${BINOWN} ${APACHE_GROUP} 0770 \
	${TL_WEBDIR}/tl_files/tiny_templates \
	${BINOWN} ${APACHE_GROUP} 0770

PKG_GROUPS_VARS+=	APACHE_GROUP
PKG_USERS_VARS+=	APACHE_USER

.include "../../www/typolight/options.mk"

pre-configure:
	${MV} ${WRKSRC}/templates/.htaccess ${WRKDIR}/templates-htaccess
	${CP} ${FILESDIR}/typolight.conf ${WRKDIR}

pre-install:
	cd ${WRKSRC}; ${RM} -rf music_academy.css \
		templates/music_academy.sql tl_files/music_academy
	${FIND} ${WRKSRC} -name "*.orig*" -exec ${RM} -f {} \;

do-install:
	cd ${WRKSRC}; pax -rw ${WWW_FILES} ${DESTDIR}${PREFIX}/${TL_WEBDIR}
	cd ${WRKSRC}/system; \
		pax -rw ${WWW_SYSFILES} \
			${DESTDIR}${PREFIX}/${TL_WEBDIR}/system; \
		${INSTALL_DATA} config/.htaccess \
			${DESTDIR}${PREFIX}/${TL_WEBDIR}/system/config
	cd ${WRKSRC}; pax -rw ${EG_DATA} ${DESTDIR}${PREFIX}/${TL_EGDIR}
	rm -f ${DESTDIR}${PREFIX}/${TL_EGDIR}/system/config/.htaccess
	${INSTALL_DATA} ${WRKDIR}/typolight.conf ${DESTDIR}${PREFIX}/${TL_EGDIR}
	${INSTALL_DATA} ${WRKDIR}/templates-htaccess \
		${DESTDIR}${PREFIX}/${TL_EGDIR}
	${INSTALL_DATA} ${FILESDIR}/README \
		${DESTDIR}${PREFIX}/${TL_DOCDIR}

.include "Makefile.version"
.include "../../www/typolight/Makefile.common"
.include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk"