View | Details | Raw Unified | Return to bug 200040
Collapse All | Expand All

(-)Makefile (-27 / +5 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	zope213
3
PORTNAME=	zope213
4
PORTVERSION=	2.13.22
4
PORTVERSION=	2.13.22
5
PORTREVISION=	1
5
CATEGORIES=	www python zope
6
CATEGORIES=	www python zope
6
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
7
DISTNAME=	Zope2-${PORTVERSION}
8
DISTNAME=	Zope2-${PORTVERSION}
Lines 81-89 Link Here
81
82
82
USES=		python:2 zip
83
USES=		python:2 zip
83
USE_PYTHON=	distutils autoplist
84
USE_PYTHON=	distutils autoplist
85
NO_ARCH=	yes
84
86
85
PKGMESSAGE=	${WRKDIR}/pkg-message
87
SUB_FILES=	pkg-message
86
SUB_FILES=	instance-message package-pkg-message pkg-message
87
SUB_LIST=	ZOPEINSTANCEBASE=${ZOPEINSTANCEBASE} \
88
SUB_LIST=	ZOPEINSTANCEBASE=${ZOPEINSTANCEBASE} \
88
		ZOPE_USER=${ZOPE_USER} \
89
		ZOPE_USER=${ZOPE_USER} \
89
		ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
90
		ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
Lines 93-122 Link Here
93
ZOPEINSTANCEBASE?=	${PREFIX}/www/Zope213
94
ZOPEINSTANCEBASE?=	${PREFIX}/www/Zope213
94
ZOPEINSTANCEDIR?=	${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
95
ZOPEINSTANCEDIR?=	${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
95
96
96
.if defined(BATCH)
97
post-patch:
97
ISBATCH=	--user admin:test123
98
	@${REINPLACE_CMD} -e 's/#.*effective-user chrism/effective-user ${ZOPE_USER}/' ${WRKSRC}/src/Zope2/utilities/skel/etc/zope.conf.in
98
.else
99
ISBATCH=	""
100
.endif
101
99
102
.if defined(INSTANCENAME)
103
ZOPEINSTANCENAME=	${INSTANCENAME}
104
.endif
105
106
instance:
107
	@${LOCALBASE}/bin/mkzopeinstance --dir ${ZOPEINSTANCEDIR} ${ISBATCH}
108
	@${CHOWN} ${ZOPE_USER}:${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
109
	@${CHOWN} ${ZOPE_USER}:${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
110
	@${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
111
		${FILESDIR}/zope.conf_changes \
112
		| ${PATCH} --silent ${ZOPEINSTANCEDIR}/etc/zope.conf
113
	@${RM} ${ZOPEINSTANCEDIR}/etc/zope.conf.orig
114
	@${CAT} ${WRKDIR}/instance-message
115
116
post-install:
117
	@${CAT} ${WRKDIR}/pkg-message
118
119
pre-package:
120
	@${INSTALL_DATA} ${WRKDIR}/package-pkg-message ${PKGMESSAGE}
121
122
.include <bsd.port.mk>
100
.include <bsd.port.mk>
(-)files/instance-message.in (-16 lines)
Lines 1-16 Link Here
1
**********************************************************************
2
3
Zope instance successfully installed
4
5
If Zope should get started automatically when the system starts,
6
please add the following line to /etc/rc.conf
7
8
zope213_enable="YES"
9
10
If you are using not default instance location, please add this
11
line to /etc/rc.conf to make it working:
12
13
zope213_instances="%%ZOPEINSTANCEDIR%%"
14
15
If there is already a zope213_instances entry please add
16
%%ZOPEINSTANCEDIR%% separated by a space.
(-)files/package-pkg-message.in (-28 lines)
Lines 1-28 Link Here
1
**********************************************************************
2
3
Zope Successfull installed.
4
5
To create an instance of Zope please run
6
%%LOCALBASE%%/bin/mkzopeinstance --dir <INSTANCEDIR>
7
8
<INSTANCEDIR> is the directory where the instance files should
9
              be installed. This can be %%ZOPEINSTANCEBASE%%
10
11
Command-line options to 'mkzopeinstance' are available, and can be
12
investigated by running 'mkzopeinstance --help'.
13
14
Zope instances, created by mkzopeinstance, will not be removed
15
when the package is deinstalled. You'll have to delete them yourself.
16
17
If Zope should get started automatically when the system starts,
18
please add the following line to /etc/rc.conf
19
20
zope213_enable="YES"
21
22
If you are using not default instance location, please add this
23
line to /etc/rc.conf to make it working:
24
25
zope213_instances="<INSTANCEDIR>"
26
27
Additional Zope instances have to be added to zope213_instances
28
separated by a space.
(-)files/pkg-message.in (-14 / +19 lines)
Lines 2-23 Link Here
2
2
3
Zope Successfull installed.
3
Zope Successfull installed.
4
4
5
To create an instance of Zope please run
5
To create an instance of Zope using the default location, please run:
6
make instance
7
6
8
You can set the following Variables in /etc/make.conf
7
%%LOCALBASE%%/bin/mkzopeinstance --dir %%ZOPEINSTANCEDIR%%
8
chown %%ZOPE_USER%%:%%ZOPE_USER%% %%ZOPEINSTANCEDIR%%var
9
chown %%ZOPE_USER%%:%%ZOPE_USER%% %%ZOPEINSTANCEDIR%%log
9
10
10
ZOPEINSTANCEBASE	Directory where Zope instance should go
11
Command-line options to 'mkzopeinstance' are available, and can be
11
			(default: %%ZOPEINSTANCEBASE%%)
12
investigated by running 'mkzopeinstance --help'.
12
ZOPEINSTANCENAME	Default name for a new Zope instance
13
			(default: none)
14
13
15
If you want have multiple Zope you should run
14
Zope instances, created by mkzopeinstance, will not be removed
16
make instance INSTANCENAME=<somename>
15
when the package is deinstalled. You'll have to delete them yourself.
17
16
18
You may also define BATCH option if you want instance to be created with
17
If you are not using the default instance location, please use the
19
default username/password pair for instance administartor (admin:test123):
18
desired paths during creation and add this line to /etc/rc.conf:
20
make instance BATCH=yes
21
19
22
Zope instances, created by `make instance', will not be removed when the
20
zope213_instances="<INSTANCEDIR>"
23
port is deinstalled. You'll have to delete them yourself.
21
22
Additional Zope instances have to be added to zope213_instances
23
separated by a space.
24
25
If Zope should get started automatically when the system starts,
26
please add the following line to /etc/rc.conf:
27
28
zope213_enable="YES"
(-)files/zope.conf_changes (-10 lines)
Lines 1-10 Link Here
1
--- zope.conf.in	2011-11-30 15:30:18.000000000 +0400
2
+++ zope.conf	2011-11-30 15:43:40.000000000 +0400
3
@@ -161,6 +161,7 @@
4
 #
5
 #    effective-user chrism
6
 
7
+effective-user %%ZOPE_USER%%
8
 
9
 # Directive: enable-product-installation
10
 #

Return to bug 200040