summaryrefslogtreecommitdiff
path: root/deskutils/myitcrm/Makefile
blob: 78564c75cc75aa74aa7472c910a46acb6cc4daa2 (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
PORTNAME=	myitcrm
PORTVERSION=	0.2.9.3
PORTREVISION=	4
CATEGORIES=	deskutils
MASTER_SITES=	SF/myitcrm/
DISTNAME=	MyITCRM1-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	CRM project designed for Computer Servicing and Repairs
WWW=		http://www.myitcrm.com

LICENSE=	GPLv3

DEPRECATED=	Abandoned project as last update was on 2012-01-15
EXPIRATION_DATE=	2022-09-30

USES=		dos2unix zip
USE_PHP=	mysqli session xml

PATCH_STRIP=	-p1
NO_ARCH=	yes
NO_BUILD=	yes
SUB_FILES=	pkg-message

WRKSRC=		${WRKDIR}/MyITCRM-${PORTVERSION}

PLIST_SUB=	WWWGRP="${WWWGRP}" \
		WWWOWN="${WWWOWN}"
PORTDOCS=	README.textile changelog.txt
PORTEXAMPLES=	htaccess.txt

OPTIONS_DEFINE=		APACHE DOCS EXAMPLES LIGHTTPD NGINX PHPMOD
OPTIONS_DEFAULT=	APACHE

NGINX_DESC=	Use Nginx
PHPMOD_DESC=	Use PHP module for Apache

APACHE_USES=		apache:run,2.2+
LIGHTTPD_RUN_DEPENDS=	lighttpd:www/lighttpd
NGINX_RUN_DEPENDS=	nginx:www/nginx
PHPMOD_USES=		php:mod
PHPMOD_USES_OFF=	php:cgi

WRITEABLE=	conf.php.sample log/access.log cache

.include <bsd.port.options.mk>

# Set files to ignore.
.for file in ${PORTEXAMPLES} ${PORTDOCS} LICENSE.txt
WWW_IGNORE+=	-not -name ${file}
.endfor

.if defined(MAINTAINER_MODE)
trace-distfile: distclean
	@cd ${.CURDIR} && make FETCH_ARGS=-vFpr makesum

rm-install:
	${SU_CMD} '${RM} -r ${WWWDIR}/install'

.endif

post-patch:
	${MV} ${WRKSRC}/conf-default.php ${WRKSRC}/conf.php.sample

do-install:
	@${MKDIR} ${STAGEDIR}${WWWDIR}
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} '${WWW_IGNORE}')
.for ent in ${WRITEABLE}
	@${CHMOD} u+w ${STAGEDIR}${WWWDIR}/${ent}
.endfor
.if defined(MAINTAINER_MODE)
	@${MAKE} -C ${.CURDIR} rm-install
.endif

do-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for ex in ${PORTEXAMPLES}
	${INSTALL_DATA} ${WRKSRC}/${ex} ${STAGEDIR}${EXAMPLESDIR}
.endfor

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor

.include <bsd.port.mk>