source: TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/paster_templates/Makefile @ 7845

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/paster_templates/Makefile@7845
Revision 7845, 16.6 KB checked in by pjkersha, 9 years ago (diff)

Incomplete - task 16: NDG Security 2.x.x - incl. updated Paster templates

  • fixed yadis template syntax
  • updating securedapp template.
  • Property svn:keywords set to Id
Line 
1#
2# Makefile to copy ndg.security.test.integration configurations and make them
3# into templates.  This is intended for use preparing a distribution, not
4# for post-installation use.
5#
6# @author P J Kershaw 16/11/10
7#
8# @copyright: (C) 2010 STFC
9#
10# @license: BSD - LICENSE file
11#
12# $Id$
13
14# Settings for all Templates
15ROOT_FILEPATH = ../../../../../
16DEST_DIR = ./
17TEST_DIR = ${ROOT_FILEPATH}ndg_security_test/ndg/security/test/
18TEST_CONFIG_SRC_DIR = ${TEST_DIR}config/
19PKI_SRC_DIR = ${TEST_CONFIG_SRC_DIR}pki/
20CA_SRC_DIR = ${PKI_SRC_DIR}ca/
21SERVER_CERT_SRC_FILEPATH = ${PKI_SRC_DIR}localhost.crt
22SERVER_KEY_SRC_FILEPATH = ${PKI_SRC_DIR}localhost.key
23INTEGRATION_TEST_DIR = ${TEST_DIR}integration/
24
25USERDB_FILENAME = user.db
26USERDB_FILEPATH = ${TEST_CONFIG_SRC_DIR}${USERDB_FILENAME}
27
28# OpenID Provider Specific Settings
29OP_SERVER_YADIS_TMPL_SRC_FILENAME = serveryadis.xml
30OP_YADIS_TMPL_SRC_FILENAME = yadis.xml
31
32
33# Generic Services Template Settings
34SERVICE_SRC_DIRNAME = full_system/
35SERVICE_DEST_DIRNAME = services/
36SERVICE_SRC_DIR = ${INTEGRATION_TEST_DIR}${SERVICE_SRC_DIRNAME}
37SERVICE_DEST_DIR = ${DEST_DIR}${SERVICE_DEST_DIRNAME}
38SERVICE_SRC_INI_FILENAME = securityservices.ini
39SERVICE_SRC_INI_FILEPATH = ${SERVICE_SRC_DIR}${SERVICE_SRC_INI_FILENAME}
40SERVICE_INI_FILEPATH_TMP = ${SERVICE_DEST_DIR}${SERVICE_SRC_INI_FILENAME}
41SERVICE_INI_TMPL_FILEPATH = ${SERVICE_DEST_DIR}service.ini_tmpl
42SERVICE_PKI_DEST_DIR = ${SERVICE_DEST_DIR}pki/
43SERVICE_CA_DEST_DIR = ${SERVICE_PKI_DEST_DIR}ca/
44SERVICE_LOG_DEST_DIR = ${SERVICE_DEST_DIR}log/
45SERVICE_LOG_FILEPATH = ${SERVICE_LOG_DEST_DIR}service.log
46SERVICE_SURPLUS_FILES = README __init__.* attributeinterface.* securedapp.* \
47        request-filter.xml pep_result_handler *.pyc authn/* \
48        openidprovider/associations/  openidprovider/beaker/ \
49        openidprovider/README openidprovider/nonces/ openidprovider/temp/ \
50        openidrelyparty/store/ openidrelyparty/__init__.* \
51        pip-session-cache/* log
52SERVICE_OP_DIRNAME = openidprovider/
53SERVICE_OP_DIR = ${SERVICE_DEST_DIR}${SERVICE_OP_DIRNAME}
54SERVICE_OP_TMPL_DIR = ${SERVICE_OP_DIR}templates/
55SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH_TMP = ${SERVICE_OP_TMPL_DIR}serveryadis.xml
56SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH = ${SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH_TMP}_tmpl
57SERVICE_OP_YADIS_TMPL_FILEPATH_TMP = ${SERVICE_OP_TMPL_DIR}yadis.xml
58SERVICE_OP_YADIS_TMPL_FILEPATH = ${SERVICE_OP_YADIS_TMPL_FILEPATH_TMP}_tmpl
59
60       
61service_tmpl: ${SERVICE_SRC_DIR}
62        @-echo Preparing Generic Services template ...
63        @-echo
64        @-echo Copying configuration files ...
65        @-cp -r ${SERVICE_SRC_DIR} ${SERVICE_DEST_DIR} 2> /dev/null
66        @-echo Clear out SVN directories ...
67        @-find ${SERVICE_DEST_DIR} -name ".svn" -print | xargs /bin/rm -rf
68        @-echo Remove unneeded files ...
69        for i in ${SERVICE_SURPLUS_FILES} ; do \
70                rm -rf ${SERVICE_DEST_DIR}$$i ; \
71        done ;
72        # Make an empty log file so that log directory is included in egg
73        @-echo Make log directory ...
74        mkdir ${SERVICE_DEST_DIR}log
75        touch ${SERVICE_LOG_FILEPATH}
76        @-echo Making substitutions for ini file template variables ...
77        sed -e s/'portNum = .*'/'portNum = %%\{portNumber}'/ \
78        -e s/'baseURI =.*'/'baseURI = %%\{baseURI}'/ \
79        -e s/'saml\.soapbinding\.mountPath.*'/'saml.soapbinding.mountPath = %%\{attributeServiceMountPoint\}'/ \
80        -e s/'saml\.mountPath.*'/'saml.mountPath = %%\{authorisationServiceMountPoint\}'/ \
81        -e s/'saml\.soapbinding\.issuerName =.*'/'saml.soapbinding.issuerName = %%\{attributeServiceIssuerName}'/ \
82        -e s/'saml\.issuerName =.*'/'samlIssuerName = %%\{authorisationServiceIssuerName}'/ \
83        -e s/'saml\.soapbinding\.issuerFormat =.*'/'saml.soapbinding.issuerFormat = %%\{attributeServiceIssuerFormat}'/ \
84        -e s/'saml\.issuerFormat =.*'/'saml.issuerFormat = %%\{authorisationServiceIssuerFormat}'/ \
85        -e s/'authkitCookieSecret =.*'/'authkitCookieSecret = %%\{authkitCookieSecret}'/ \
86        -e s/'beakerSessionCookieSecret =.*'/'beakerSessionCookieSecret = %%\{beakerSessionCookieSecret}'/ \
87        -e s/'authkit.openid.session.secret = .*'/'authkit.openid.session.secret = %%\{openidRelyingPartyCookieSecret}'/ \
88        -e s/'testConfigDir = .*'// \
89        -e s/testConfigDir/here/g \
90        -e s/'# Revision:.*'//g \
91                ${SERVICE_INI_FILEPATH_TMP} > ${SERVICE_INI_TMPL_FILEPATH}
92        rm -f ${SERVICE_INI_FILEPATH_TMP}
93        @-echo Making substitutions for OpenID Provider Yadis templates ...
94        sed -r -e /'<Service priority=\"(1|19|30|20)\">'/,/'<\/Service>'/d \
95        -e s/'<\/XRD>'/'    %%\{serveryadisExtraServiceEndpoints}\n    <\/XRD>'/ \
96                ${SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH_TMP} > \
97                ${SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH}
98        rm -f ${SERVICE_OP_SERVER_YADIS_TMPL_FILEPATH_TMP}
99        sed -r -e /'<Service priority=\"(1|19|30|20)\">'/,/'<\/Service>'/d \
100        -e s/'<\/XRD>'/'    %%\{yadisExtraServiceEndpoints}\n    <\/XRD>'/ \
101                ${SERVICE_OP_YADIS_TMPL_FILEPATH_TMP} > ${SERVICE_OP_YADIS_TMPL_FILEPATH}
102        rm -f ${SERVICE_OP_YADIS_TMPL_FILEPATH_TMP}
103        @-echo
104        @-echo Create PKI directory and copying files ...
105        -mkdir ${SERVICE_PKI_DEST_DIR}
106        cp ${SERVER_CERT_SRC_FILEPATH} ${SERVICE_PKI_DEST_DIR}
107        cp ${SERVER_KEY_SRC_FILEPATH} ${SERVICE_PKI_DEST_DIR}
108        -mkdir ${SERVICE_CA_DEST_DIR}
109        cp ${CA_SRC_DIR}* ${SERVICE_CA_DEST_DIR}
110        @-echo Copying test SQLite user database ...
111        cp ${USERDB_FILEPATH} ${SERVICE_DEST_DIR}
112        @-echo
113        @-echo Done.
114       
115service_tmpl_clean:
116        @-echo Clearing Services template ...
117        rm -rf ${SERVICE_DEST_DIR}
118
119
120# Secured Application Template Settings
121SECUREDAPP_SRC_DIRNAME = full_system/
122SECUREDAPP_DEST_DIRNAME = securedapp/
123SECUREDAPP_SRC_DIR = ${INTEGRATION_TEST_DIR}${SECUREDAPP_SRC_DIRNAME}
124SECUREDAPP_DEST_DIR = ${DEST_DIR}${SECUREDAPP_DEST_DIRNAME}
125SECUREDAPP_SRC_INI_FILENAME = securedapp.ini
126SECUREDAPP_SRC_INI_FILEPATH = ${SECUREDAPP_SRC_DIR}${SECUREDAPP_SRC_INI_FILENAME}
127SECUREDAPP_INI_FILEPATH_TMP = ${SECUREDAPP_DEST_DIR}${SECUREDAPP_SRC_INI_FILENAME}
128SECUREDAPP_INI_TMPL_FILEPATH = ${SECUREDAPP_DEST_DIR}service.ini_tmpl
129SECUREDAPP_PKI_DEST_DIR = ${SECUREDAPP_DEST_DIR}pki/
130SECUREDAPP_CA_DEST_DIR = ${SECUREDAPP_PKI_DEST_DIR}ca/
131SECUREDAPP_LOG_DEST_DIR = ${SECUREDAPP_DEST_DIR}log/
132SECUREDAPP_LOG_FILEPATH = ${SECUREDAPP_LOG_DEST_DIR}service.log
133SECUREDAPP_SURPLUS_FILES = README __init__.* attributeinterface.* \
134        securityservicesapp.* *.pyc authn/* openidprovider/ openidrelyparty/store/ \
135        openidrelyparty/__init__.* pip-session-cache/ log/ policy.xml
136SECUREDAPP_REQUEST_FILTER_FILENAME = request-filter.xml
137SECUREDAPP_REQUEST_FILTER_TMPL_FILENAME = ${SECUREDAPP_REQUEST_FILTER_FILENAME}_tmpl
138SECUREDAPP_REQUEST_FILTER_FILEPATH = ${SECUREDAPP_SRC_DIR}${SECUREDAPP_REQUEST_FILTER_FILENAME}
139SECUREDAPP_REQUEST_FILTER_TMPL_FILEPATH = ${SECUREDAPP_DEST_DIR}${SECUREDAPP_REQUEST_FILTER_TMPL_FILENAME}
140       
141securedapp_tmpl: ${SECUREDAPP_SRC_DIR}
142        @-echo Preparing Secured Application template ...
143        @-echo
144        @-echo Copying configuration files ...
145        @-cp -r ${SECUREDAPP_SRC_DIR} ${SECUREDAPP_DEST_DIR} 2> /dev/null
146        @-echo Clear out SVN directories ...
147        @-find ${SECUREDAPP_DEST_DIR} -name ".svn" -print | xargs /bin/rm -rf
148        @-echo Remove unneeded files ...
149        for i in ${SECUREDAPP_SURPLUS_FILES} ; do \
150                rm -rf ${SECUREDAPP_DEST_DIR}$$i ; \
151        done ;
152        # Make an empty log file so that log directory is included in egg
153        @-echo Make log directory ...
154        mkdir ${SECUREDAPP_LOG_DEST_DIR}
155        touch ${SECUREDAPP_LOG_FILEPATH}
156        @-echo Making substitutions for ini file template variables ...
157        sed -e s/'port = .*'/'port = %%\{portNumber}'/ \
158        -e s/'# Revision:.*'//g \
159        -e s/'authN.redirectURI = .*'/'authN.redirectURI = %%{authnRedirectURI}'/ \
160        -e s/'pep.authzServiceURI = .*'/'pep.authzServiceURI = %%{authzServiceURI}'/ \
161    -e s/'pep\.authzDecisionQuery\.issuerName = .*'/'pep\.authzDecisionQuery\.issuerName = %%\{authzDecisionQueryIssuerName}'/ \
162    -e s/'pep\.authzDecisionQuery\.issuerFormat = .*'/'pep\.authzDecisionQuery\.issuerFormat = %%\{authzDecisionQueryIssuerFormat}'/ \
163        -e s/'authkit\.cookie\.secret =.*'/'authkit\.cookie\.secret = %%\{authkitCookieSecret}'/ \
164        -e s/'beaker\.session\.secret =.*'/'beaker\.session\.secret = %%\{beakerSessionCookieSecret}'/ \
165        -e s/'authkit.openid.session.secret = .*'/'authkit.openid.session.secret = %%\{openidRelyingPartyCookieSecret}'/ \
166        -e s/'testConfigDir = .*'// \
167        -e s/testConfigDir/here/g \
168        -e s/\(os\.path\.join\(\'%\(here\)s\'/\(os.path.join\(\'%%\{outputDir}\'/ \
169                ${SECUREDAPP_INI_FILEPATH_TMP} > ${SECUREDAPP_INI_TMPL_FILEPATH}
170        rm -f ${SECUREDAPP_INI_FILEPATH_TMP}
171        @-echo "Make template for ${SECUREDAPP_REQUEST_FILTER_FILENAME} ..."
172        sed -r -e s/'http:\/\/localhost:7080'/'%%\{baseURI}'/ \
173                ${SECUREDAPP_REQUEST_FILTER_FILEPATH} > ${SECUREDAPP_REQUEST_FILTER_TMPL_FILEPATH}
174        @-echo
175        @-echo Create PKI directory and copying files ...
176        -mkdir ${SECUREDAPP_PKI_DEST_DIR}
177        cp ${SERVER_CERT_SRC_FILEPATH} ${SECUREDAPP_PKI_DEST_DIR}
178        cp ${SERVER_KEY_SRC_FILEPATH} ${SECUREDAPP_PKI_DEST_DIR}
179        -mkdir ${SECUREDAPP_CA_DEST_DIR}
180        cp ${CA_SRC_DIR}* ${SECUREDAPP_CA_DEST_DIR}
181        @-echo
182        @-echo Done.
183       
184securedapp_tmpl_clean:
185        @-echo Clearing Secured App template ...
186        rm -rf ${SECUREDAPP_DEST_DIR}
187
188# Authorisation Service Template Settings
189AUTHZ_SERVICE_DIRNAME = authorisationservice/
190AUTHZ_SERVICE_SRC_DIR = ${TEST_CONFIG_SRC_DIR}${AUTHZ_SERVICE_DIRNAME}
191AUTHZ_SERVICE_DEST_DIR = ${DEST_DIR}${AUTHZ_SERVICE_DIRNAME}
192AUTHZ_SERVICE_INI_FILENAME = authorisation-service.ini
193AUTHZ_SERVICE_INI_FILEPATH_TMP = ${AUTHZ_SERVICE_DEST_DIR}${AUTHZ_SERVICE_INI_FILENAME}
194AUTHZ_SERVICE_INI_TMPL_FILEPATH = ${AUTHZ_SERVICE_INI_FILEPATH_TMP}_tmpl
195AUTHZ_SERVICE_FILES = ${AUTHZ_SERVICE_INI_FILENAME} pip-mapping.txt policy.xml \
196        public authorisationserviceapp.py
197AUTHZ_SERVICE_PKI_DEST_DIR = ${AUTHZ_SERVICE_DEST_DIR}pki/
198AUTHZ_SERVICE_CA_DEST_DIR = ${AUTHZ_SERVICE_PKI_DEST_DIR}ca/
199AUTHZ_SERVICE_LOG_DEST_DIR = ${AUTHZ_SERVICE_DEST_DIR}log/
200AUTHZ_SERVICE_LOG_FILEPATH = ${AUTHZ_SERVICE_LOG_DEST_DIR}service.log
201
202
203authorisation_service_tmpl:
204        @-echo Preparing Authorisation Service template ...
205        @-echo
206        @-echo Copying test ini file and other configuration files ...
207        mkdir ${AUTHZ_SERVICE_DEST_DIR}
208        for i in ${AUTHZ_SERVICE_FILES}; do \
209                cp -r ${AUTHZ_SERVICE_SRC_DIR}$$i ${AUTHZ_SERVICE_DEST_DIR} ; \
210        done ;
211        @-echo Making substitutions for template variables ...
212        sed -e s/'# Description:.*'/'# Description: Paster ini file for SAML\/XACML based Authorisation Service'/ \
213        -e s/'saml\.mountPath.*'/'saml.mountPath = %%\{mountPath\}'/ \
214        -e s/'samlIssuerName =.*'/'samlIssuerName = %%\{issuerName}'/ \
215        -e s/'samlIssuerFormat =.*'/'samlIssuerFormat = %%\{issuerFormat}'/ \
216        -e s/'testConfigDir = .*'// \
217        -e s/testConfigDir/here/g \
218        -e s/\(os\.path\.join\(\'%\(here\)s\'/\(os.path.join\(\'%%\{outputDir}\',\ \'log\'/ \
219        ${AUTHZ_SERVICE_INI_FILEPATH_TMP} > ${AUTHZ_SERVICE_INI_TMPL_FILEPATH}
220        rm -f ${AUTHZ_SERVICE_INI_FILEPATH_TMP}
221        @-echo
222        # Make an empty log file so that log directory is included in egg
223        @-echo Make log directory ...
224        mkdir ${AUTHZ_SERVICE_DEST_DIR}log
225        touch ${AUTHZ_SERVICE_LOG_FILEPATH}
226        @-echo Create PKI directory and copying files ...
227        mkdir -p ${AUTHZ_SERVICE_CA_DEST_DIR}
228        cp ${SERVER_CERT_SRC_FILEPATH} ${AUTHZ_SERVICE_PKI_DEST_DIR}
229        cp ${SERVER_KEY_SRC_FILEPATH} ${AUTHZ_SERVICE_PKI_DEST_DIR}
230        cp ${CA_SRC_DIR}* ${AUTHZ_SERVICE_CA_DEST_DIR}
231        @-echo Clear out SVN directories ...
232        @-find ${AUTHZ_SERVICE_DEST_DIR} -name ".svn" -print | xargs /bin/rm -rf
233        @-echo
234        @-echo Done.
235       
236authorisation_service_tmpl_clean:
237        @-echo Clearing Authorisation Service template ...
238        rm -rf ${AUTHZ_SERVICE_DEST_DIR}
239
240
241# Attribute Service Template
242ATTR_SERVICE_DIRNAME = attributeservice/
243ATTR_SERVICE_SRC_DIR = ${TEST_CONFIG_SRC_DIR}attributeauthority/sitea/
244ATTR_SERVICE_DEST_DIR = ${DEST_DIR}${ATTR_SERVICE_DIRNAME}
245ATTR_SERVICE_INI_FILENAME = attribute-service.ini
246ATTR_SERVICE_INI_FILEPATH_TMP = ${ATTR_SERVICE_DEST_DIR}${ATTR_SERVICE_INI_FILENAME}
247ATTR_SERVICE_INI_TMPL_FILEPATH = ${ATTR_SERVICE_INI_FILEPATH_TMP}_tmpl
248ATTR_SERVICE_FILES = ${ATTR_SERVICE_INI_FILENAME} public attributeauthorityapp.py
249ATTR_SERVICE_STATIC_CONTENT_DEST_DIR = ${ATTR_SERVICE_DEST_DIR}public/
250ATTR_SERVICE_PKI_DEST_DIR = ${ATTR_SERVICE_DEST_DIR}pki/
251ATTR_SERVICE_CA_DEST_DIR = ${ATTR_SERVICE_PKI_DEST_DIR}ca/
252ATTR_SERVICE_LOG_DEST_DIR = ${ATTR_SERVICE_DEST_DIR}log/
253ATTR_SERVICE_LOG_FILEPATH = ${ATTR_SERVICE_LOG_DEST_DIR}service.log
254
255
256attribute_service_tmpl:
257        @-echo Preparing Attribute Service template ...
258        @-echo
259        -mkdir ${ATTR_SERVICE_DEST_DIR}
260        @-echo Copying content directories and files ...
261        for i in ${ATTR_SERVICE_FILES}; do \
262                cp -r ${ATTR_SERVICE_SRC_DIR}$$i ${ATTR_SERVICE_DEST_DIR} ; \
263        done ;
264        @-echo Making substitutions for template variables ...
265        sed -e s/'# Description:.*'/'# Description: Paster ini file for SAML Attribute Service'/ \
266        -e s/'dbConnectionString = .*'/'dbConnectionString = sqlite:\/\/\/%(here)s\/user.db'/ \
267        -e s/'port = .*'/'port = %%\{portNumber}'/ \
268        -e s/'saml\.soapbinding\.mountPath.*'/'saml.soapbinding.mountPath = %%\{mountPath\}'/ \
269        -e s/'saml\.soapbinding\.issuerName.*'/'saml.soapbinding.issuerName = %%\{issuerName}'/ \
270        -e s/'saml\.soapbinding\.issuerFormat.*'/'saml\.soapbinding\.issuerFormat = %%\{issuerFormat}'/ \
271        -e s/\(os\.path\.join\(\'%\(here\)s\'/\(os.path.join\(\'%%\{outputDir}\',\ \'log\'/ \
272        ${ATTR_SERVICE_INI_FILEPATH_TMP} > ${ATTR_SERVICE_INI_TMPL_FILEPATH}
273        rm -f ${ATTR_SERVICE_INI_FILEPATH_TMP}
274        @-echo
275        @-echo Create PKI directory and copying files ...
276        -mkdir ${ATTR_SERVICE_PKI_DEST_DIR}
277        cp ${SERVER_CERT_SRC_FILEPATH} ${ATTR_SERVICE_PKI_DEST_DIR}
278        cp ${SERVER_KEY_SRC_FILEPATH} ${ATTR_SERVICE_PKI_DEST_DIR}
279        -mkdir ${ATTR_SERVICE_CA_DEST_DIR}
280        cp ${CA_SRC_DIR}* ${ATTR_SERVICE_CA_DEST_DIR}
281        # Make an empty log file so that log directory is included in egg
282        @-echo Make log directory ...
283        mkdir ${ATTR_SERVICE_DEST_DIR}log
284        touch ${ATTR_SERVICE_LOG_FILEPATH}
285        @-echo Copying test SQLite user database ...
286        cp ${USERDB_FILEPATH} ${ATTR_SERVICE_DEST_DIR}
287        @-echo Clear out SVN directories ...
288        @-find ${ATTR_SERVICE_DEST_DIR} -name ".svn" -print | xargs /bin/rm -rf
289        @-echo
290        @-echo Done.
291       
292attribute_service_tmpl_clean:
293        @-echo Clearing Attribute Service template ...
294        rm -rf ${ATTR_SERVICE_DEST_DIR}
295       
296
297# Settings to create OpenID Provider template
298OP_DIRNAME = openidprovider/
299OP_SRC_DIR = ${INTEGRATION_TEST_DIR}${OP_DIRNAME}
300OP_DEST_DIR = ${DEST_DIR}${OP_DIRNAME}
301OP_INI_FILENAME = service.ini
302OP_INI_FILEPATH_TMP = ${OP_DEST_DIR}openidprovider.ini
303OP_INI_TMPL_FILEPATH = ${OP_DEST_DIR}${OP_INI_FILENAME}_tmpl
304OP_PKI_DEST_DIR = ${OP_DEST_DIR}pki/
305OP_CA_DEST_DIR = ${OP_PKI_DEST_DIR}ca/
306OP_CONFIG_FILES = templates openidprovider.ini public
307OP_TMPL_DIR = ${OP_DEST_DIR}templates/
308OP_SERVER_YADIS_TMPL_FILEPATH_TMP = ${OP_TMPL_DIR}serveryadis.xml
309OP_SERVER_YADIS_TMPL_FILEPATH = ${OP_SERVER_YADIS_TMPL_FILEPATH_TMP}_tmpl
310OP_YADIS_TMPL_FILEPATH_TMP = ${OP_TMPL_DIR}yadis.xml
311OP_YADIS_TMPL_FILEPATH = ${OP_YADIS_TMPL_FILEPATH_TMP}_tmpl
312OP_LOG_DEST_DIR = ${OP_DEST_DIR}log/
313OP_LOG_FILEPATH = ${OP_LOG_DEST_DIR}service.log
314
315
316openidprovider_tmpl:
317        @-echo Preparing OpenID Provider template ...
318        @-echo
319        @-echo Copying templates, CSS and graphics and ini file ...
320        mkdir ${OP_DEST_DIR}
321        mkdir ${OP_LOG_DEST_DIR}
322        touch ${OP_LOG_FILEPATH}
323        @-echo Copying files ...
324        for i in ${OP_CONFIG_FILES} ; do \
325                cp -r ${OP_SRC_DIR}$$i ${OP_DEST_DIR}; \
326        done ;
327        @-echo Making substitutions for template variables ...
328        sed -e s/'portNum = .*'/'portNum = %%\{portNumber}'/ \
329        -e s/'baseURI =.*'/'baseURI = %%\{baseURI}'/ \
330        -e s/'testConfigDir = %(here)s\/\.\.\/\.\.\/config'// \
331        -e s/testConfigDir/here/g \
332        -e s/'# Revision:.*'// \
333        -e s/'beaker.session.secret =.*'/'beaker.session.secret = %%\{beakerSessionCookieSecret}'/ \
334        -e s/\(os\.path\.join\(\'%\(here\)s\'/\(os.path.join\(\'%%\{outputDir}\'/ \
335        ${OP_INI_FILEPATH_TMP} > ${OP_INI_TMPL_FILEPATH}
336        rm -f ${OP_INI_FILEPATH_TMP}
337        @-echo Making substitutions for Yadis templates ...
338        sed -r -e /'<Service priority=\"(1|19|30|20)\">'/,/'<\/Service>'/d \
339        -e s/'<\/XRD>'/'    %%\{serveryadisExtraServiceEndpoints}\n    <\/XRD>'/ \
340                ${OP_SERVER_YADIS_TMPL_FILEPATH_TMP} > ${OP_SERVER_YADIS_TMPL_FILEPATH}
341        rm -f ${OP_SERVER_YADIS_TMPL_FILEPATH_TMP}
342        sed -r -e /'<Service priority=\"(1|19|30|20)\">'/,/'<\/Service>'/d \
343        -e s/'<\/XRD>'/'    %%\{yadisExtraServiceEndpoints}\n    <\/XRD>'/ \
344                ${OP_YADIS_TMPL_FILEPATH_TMP} > ${OP_YADIS_TMPL_FILEPATH}
345        rm -f ${OP_YADIS_TMPL_FILEPATH_TMP}
346        @-echo
347        @-echo
348        @-echo Copying test SQLite user database ...
349        cp ${USERDB_FILEPATH} ${OP_DEST_DIR}
350        @-echo
351        @-echo Create PKI directory and copying files ...
352        -mkdir ${OP_PKI_DEST_DIR}
353        cp ${SERVER_CERT_SRC_FILEPATH} ${OP_PKI_DEST_DIR}
354        cp ${SERVER_KEY_SRC_FILEPATH} ${OP_PKI_DEST_DIR}
355        -mkdir ${OP_CA_DEST_DIR}
356        cp ${CA_SRC_DIR}* ${OP_CA_DEST_DIR}
357        @-echo Clear out SVN directories ...
358        @-find ${OP_DEST_DIR} -name ".svn" -print | xargs /bin/rm -rf
359        @-echo
360        @-echo Done.
361       
362openidprovider_tmpl_clean:
363        @-echo Clearing OpenID Provider template ...
364        rm -rf ${OP_DEST_DIR}
365
366       
367clean: service_tmpl_clean authorisation_service_tmpl_clean \
368                attribute_service_tmpl_clean openidprovider_tmpl_clean
369
Note: See TracBrowser for help on using the repository browser.