summaryrefslogtreecommitdiff
path: root/www/gallery/Makefile
blob: bfcdce9fbd53d8dd655f6417e13ae7fa7e167160 (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
# $NetBSD: Makefile,v 1.9 2013/05/31 12:42:32 wiz Exp $
#

DISTNAME=	gallery-1.5.10
PKGREVISION=	5
CATEGORIES=	www graphics
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=gallery/}

MAINTAINER=	pettai@NetBSD.org
HOMEPAGE=	http://gallery.sourceforge.net/
COMMENT=	Web-based photo gallery written in PHP
LICENSE=	gnu-gpl-v2

PHP_VERSIONS_ACCEPTED=	53 54

DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.1.0:../../graphics/php-gd
DEPENDS+=	${PHP_PKG_PREFIX}-gettext>=4.1.0:../../devel/php-gettext

NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${DISTNAME}

USE_TOOLS+=	perl:run

REPLACE_PERL=	po/remove_obsolete.pl po/transform_fuzzy.pl
REPLACE_SH=	po/create_po_template.sh po/change_version.sh
REPLACE_SH+=	po/edit_changelog.sh po/make_mo_files.sh
REPLACE_SH+=	po/update_po_files.sh

PKG_SYSCONFDIR=	${G1DIR}

EGDIR=		${PREFIX}/share/examples/gallery
G1DIR=		${PREFIX}/share/gallery

CONF_FILES_PERMS=	${EGDIR}/config.php ${G1DIR}/config.php \
			${ROOT_USER} ${ROOT_GROUP} 0666
CONF_FILES_PERMS+=	${EGDIR}/.htaccess ${G1DIR}/.htaccess \
			${ROOT_USER} ${ROOT_GROUP} 0666

MESSAGE_SUBST+=	G1DIR=${G1DIR}
FILES_SUBST+=	G1DIR=${G1DIR}

SUBST_CLASSES+=	paths
SUBST_FILES.paths=	${WRKDIR}/gallery.conf
SUBST_VARS.paths+=	G1DIR
SUBST_STAGE.paths=	post-patch

INSTALLATION_DIRS=	share/examples/gallery
INSTALLATION_DIRS+=	share/gallery

post-extract:
	${CP} ${FILESDIR}/gallery.conf ${WRKDIR}/
	${TOUCH} ${WRKDIR}/config.php
	${TOUCH} ${WRKDIR}/.htaccess

do-install:
	${INSTALL_DATA} ${WRKDIR}/gallery.conf ${DESTDIR}${EGDIR}/gallery.conf
	${INSTALL_DATA} ${WRKDIR}/config.php ${DESTDIR}${EGDIR}/config.php
	${INSTALL_DATA} ${WRKDIR}/.htaccess ${DESTDIR}${EGDIR}/.htaccess
	${CP} -R ${WRKSRC}/* ${DESTDIR}${G1DIR}

.include "../../lang/php/phpversion.mk"
.include "${PHPPKGSRCDIR}/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"