summaryrefslogtreecommitdiff
path: root/devel/rt3/Makefile.install
blob: 5d7f731d907ed7a2cab99223c2412346ef32ad6b (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
123
# $NetBSD: Makefile.install,v 1.21 2016/05/17 10:32:07 fhajny Exp $

.include "dirs.mk"

BUILD_DEFS+=		APACHE_USER APACHE_GROUP
INSTALLATION_DIRS+=	sbin

OWN_DIRS+=		${RT_VAR_DIR} ${RT_LOCAL_DIR} ${RT_LOCAL_DIR}/etc
OWN_DIRS+=		${RT_LOCAL_DIR}/lib ${RT_LOCAL_DIR}/po
OWN_DIRS+=		${RT_LOCAL_DIR}/html
REQD_DIRS+=		${RT_HTML_DIR}/Callbacks

OWN_DIRS_PERMS+=	${RT_VAR_DIR}/mason_data	${APACHE_USER}	${APACHE_GROUP}	0770
OWN_DIRS_PERMS+=	${RT_VAR_DIR}/mason_data/cache	${APACHE_USER}	${APACHE_GROUP}	0770
OWN_DIRS_PERMS+=	${RT_VAR_DIR}/mason_data/etc	${APACHE_USER}	${APACHE_GROUP}	0770
OWN_DIRS_PERMS+=	${RT_VAR_DIR}/mason_data/obj	${APACHE_USER}	${APACHE_GROUP}	0770
OWN_DIRS_PERMS+=	${RT_VAR_DIR}/session_data	${APACHE_USER}	${APACHE_GROUP}	0770

SUBST_CLASSES+=		prefix
SUBST_FILES.prefix=	config.layout
SUBST_SED.prefix=	-e s,@PREFIX@,${PREFIX},
SUBST_SED.prefix+=	-e s,@PKGSYSCONFDIR@,${PKG_SYSCONFDIR},
SUBST_SED.prefix+=	-e s,@RTLIBDIR@,${RT_LIB_DIR},
SUBST_SED.prefix+=	-e s,@RTSHAREDIR@,${RT_SHARE_DIR},
SUBST_SED.prefix+=	-e s,@RTHTMLDIR@,${RT_HTML_DIR},
SUBST_SED.prefix+=	-e s,@RTDOCDIR@,${RT_DOC_DIR},
SUBST_SED.prefix+=	-e s,@RTVARDIR@,${RT_VAR_DIR},
SUBST_SED.prefix+=	-e s,@RTLOCALDIR@,${RT_LOCAL_DIR},
SUBST_STAGE.prefix=	pre-configure

SUBST_CLASSES+=		etcpath
SUBST_FILES.etcpath=	sbin/rt-setup-database.in
SUBST_SED.etcpath=	-e 's,\$$RT::EtcPath,"${RT_SHARE_DIR}/etc",'
SUBST_STAGE.etcpath=	post-patch

SUBST_CLASSES+=		path
SUBST_FILES.path=	bin/webmux.pl.in lib/RT/Interface/CLI.pm
SUBST_SED.path=		-e 's,/bin:/usr/bin,/bin:/usr/bin:${PREFIX}/bin,'
SUBST_STAGE.path=	post-patch

SUBST_CLASSES+=		hardwired
SUBST_FILES.hardwired=	share/html/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl \
			etc/upgrade/shrink_cgm_table.pl \
			etc/upgrade/shrink_transactions_table.pl \
			etc/upgrade/upgrade-mysql-schema.pl
SUBST_SED.hardwired=	-e 's,/usr/bin/perl,'${PERL5}','
SUBST_STAGE.hardwired=	post-patch

RT_CONFIG_FILES=	RT_Config.pm RT_SiteConfig.pm

.for _file_ in ${RT_CONFIG_FILES}
CONF_FILES_PERMS+=	${RT_EXAMPLE_DIR}/${_file_}	\
			${PKG_SYSCONFDIR}/${_file_}	\
			${REAL_ROOT_USER} ${RT_GROUP} 0550
.endfor

RT_ETC_FILES=		acl.Oracle acl.Pg acl.mysql constraints.mysql	\
			drop.Oracle initialdata schema.Oracle schema.Pg	\
			schema.SQLite schema.mysql-4.0 schema.mysql-4.1 \
			upgrade/3.8-branded-queues-extension            \
			upgrade/3.8-ical-extension                      \
			upgrade/generate-rtaddressregexp                \
			upgrade/shrink_cgm_table.pl                     \
			upgrade/shrink_transactions_table.pl            \
			upgrade/split-out-cf-categories                 \
			upgrade/upgrade-mysql-schema.pl                 \
			upgrade/vulnerable-passwords
RT_UPGRADE_DIRS=	3.3.0 3.3.11 3.5.1 3.7.1 3.7.3 3.7.10 3.7.15	\
			3.7.19 3.7.81 3.7.82 3.7.85 3.7.86 3.7.87       \
			3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.6 3.8.8 3.8.9 \
			3.8.12 3.8.17

MESSAGE_SUBST+=		RTVARDIR=${RT_VAR_DIR:Q} RTSHAREDIR=${RT_SHARE_DIR:Q}

USE_TOOLS+=	pax

do-install:
	@${ECHO} "=> Configuration files"
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_EXAMPLE_DIR}
.for _file_ in ${RT_CONFIG_FILES}
	${INSTALL_DATA} ${WRKSRC}/etc/${_file_} ${DESTDIR}${RT_EXAMPLE_DIR}
.endfor
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_SHARE_DIR}/etc
	${INSTALL_DATA} ${WRKSRC}/UPGRADING ${DESTDIR}${RT_SHARE_DIR}/etc
.for _file_ in ${RT_ETC_FILES}
	${INSTALL_DATA} ${WRKSRC}/etc/${_file_} ${DESTDIR}${RT_SHARE_DIR}/etc
.endfor
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_SHARE_DIR}/etc/upgrade
.for _dir_ in ${RT_UPGRADE_DIRS}
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_SHARE_DIR}/etc/upgrade/${_dir_}
	cd ${WRKSRC}/etc/upgrade/${_dir_} &&						\
		${FIND} . -type f ! -name '*.orig' 2>/dev/null | 			\
		${PAX} -rw ${DESTDIR}${RT_SHARE_DIR}/etc/upgrade/${_dir_}
.endfor
	@${ECHO} "=> Libraries"
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_LIB_DIR}
	cd ${WRKSRC}/lib && ${FIND} . -type f ! -name '*.orig' -o -name '*.in' 2>/dev/null | ${PAX} -rw ${DESTDIR}${RT_LIB_DIR}
	${FIND} ${DESTDIR}${RT_LIB_DIR} -type f -exec ${CHMOD} 644 {} \;
	@${ECHO} "=> Binaries"
	${INSTALL_SCRIPT_DIR} ${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/bin/rt-mailgate ${WRKSRC}/bin/rt-crontool		\
		${WRKSRC}/bin/mason_handler.fcgi ${WRKSRC}/bin/mason_handler.scgi	\
		${WRKSRC}/bin/standalone_httpd ${WRKSRC}/bin/mason_handler.svc		\
		${WRKSRC}/bin/rt ${WRKSRC}/bin/webmux.pl 				\
		${DESTDIR}${PREFIX}/bin
	${INSTALL_SCRIPT_DIR} ${DESTDIR}${PREFIX}/sbin
	${INSTALL_SCRIPT} ${WRKSRC}/sbin/rt-dump-database		\
		${WRKSRC}/sbin/rt-setup-database			\
		${WRKSRC}/sbin/rt-email-digest				\
		${WRKSRC}/sbin/rt-email-dashboards			\
		${WRKSRC}/sbin/rt-email-group-admin			\
		${WRKSRC}/sbin/rt-server				\
		${WRKSRC}/sbin/rt-test-dependencies			\
		${WRKSRC}/sbin/rt-clean-sessions			\
		${WRKSRC}/sbin/rt-shredder				\
		${WRKSRC}/sbin/rt-validator	 ${DESTDIR}${PREFIX}/sbin
	@${ECHO} "=> HTML documents"
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_HTML_DIR}
	cd ${WRKSRC}/share/html && ${FIND} . -type f ! -name '*.orig' -o -name '*.in' 2>/dev/null | ${PAX} -rw ${DESTDIR}${RT_HTML_DIR}
	${FIND} ${DESTDIR}${RT_HTML_DIR} -type f -exec ${CHMOD} 644 {} \;
	@${ECHO} "=> Documentation"
	${INSTALL_DATA_DIR} ${DESTDIR}${RT_DOC_DIR}
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${RT_DOC_DIR}