Commit 1336c57d authored by Alain Takoudjou's avatar Alain Takoudjou

Update php application and remove useless parts

parent 958ee622
...@@ -3,7 +3,7 @@ import os ...@@ -3,7 +3,7 @@ import os
import MySQLdb import MySQLdb
def setup(args): def setup(args):
base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
sql_file = os.path.join(htdocs, "create_tables.sql") sql_file = os.path.join(htdocs, "create_tables.sql")
try: try:
......
...@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module} ...@@ -9,6 +9,7 @@ recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location} source = ${application:location}
template = ${application-template:location}/${application-template:filename} template = ${application-template:location}/${application-template:filename}
configuration = ${application-configuration:location} configuration = ${application-configuration:location}
lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
httpd_binary = ${apache:location}/bin/httpd httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql mysql_binary = ${mariadb:location}/bin/mysql
......
...@@ -58,7 +58,10 @@ mode = 0644 ...@@ -58,7 +58,10 @@ mode = 0644
[instance-recipe-egg] [instance-recipe-egg]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7 python = python2.7
eggs = ${instance-recipe:egg} eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
...@@ -7,8 +7,7 @@ parts = instance ...@@ -7,8 +7,7 @@ parts = instance
[instance] [instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location} source = ${application:location}
template = ${application-template:location}/${application-template:filename} lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql mysql_binary = ${mariadb:location}/bin/mysql
...@@ -16,7 +15,7 @@ mysql_install_binary = ${mariadb:location}/bin/mysql_install_db ...@@ -16,7 +15,7 @@ mysql_install_binary = ${mariadb:location}/bin/mysql_install_db
mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade mysql_upgrade_binary = ${mariadb:location}/bin/mysql_upgrade
mysqld_binary = ${mariadb:location}/libexec/mysqld mysqld_binary = ${mariadb:location}/libexec/mysqld
delete = install, CHANGELOG.txt, readme_de.txt, readme_en.txt, readme_fr.txt, readme_it.txt, readme_es.txt delete = install
rename = admin rename = admin
#file_token = name of file who will be created at the end of installation #file_token = name of file who will be created at the end of installation
table_name = configuration table_name = configuration
......
...@@ -15,22 +15,10 @@ extends = ...@@ -15,22 +15,10 @@ extends =
[application] [application]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = http://www.prestashop.com/download/prestashop_1.4.4.1.zip url = http://www.prestashop.com/download/prestashop_1.4.5.1.zip
md5sum = 08206798517ea22c0122640b05c7df73 md5sum = 3d19305d728f7e8a19f81f9f326b9383
#If provided tarball does not contain top directory, option shall be changed to false #If provided tarball does not contain top directory, option shall be changed to false
#strip-top-level-dir = true strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/prestashop.inc.php.in
#md5sum = Student may put here md5sum of this file, this is good idea
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.inc.php
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
...@@ -48,7 +36,10 @@ mode = 0644 ...@@ -48,7 +36,10 @@ mode = 0644
[instance-recipe-egg] [instance-recipe-egg]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7 python = python2.7
eggs = ${instance-recipe:egg} eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
...@@ -3,10 +3,9 @@ import os ...@@ -3,10 +3,9 @@ import os
import fileinput import fileinput
def setup(args): def setup(args):
base_url, htdocs, renamed, mysql_user, mysql_password, mysql_database, mysql_host = args mysql_port, mysql_host, mysql_user, mysql_password, mysql_database, base_url, htdocs = args
rename = renamed.split(", ") admin_dir = "admin-" + mysql_user
admin_dir = rename[0].split("=>")[1].strip()
admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php") admin_include_file = os.path.join(htdocs, admin_dir + "/includes/configure.php")
searchPattern = "/admin" searchPattern = "/admin"
replacePattern = "/" + admin_dir replacePattern = "/" + admin_dir
......
...@@ -7,8 +7,7 @@ parts = instance ...@@ -7,8 +7,7 @@ parts = instance
[instance] [instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module} recipe = ${instance-recipe:egg}:${instance-recipe:module}
source = ${application:location} source = ${application:location}
template = ${application-template:location}/${application-template:filename} lampconfigure_directory = ${buildout:bin-directory}/lampconfigure
configuration = ${application-configuration:location}
httpd_binary = ${apache:location}/bin/httpd httpd_binary = ${apache:location}/bin/httpd
mysql_binary = ${mariadb:location}/bin/mysql mysql_binary = ${mariadb:location}/bin/mysql
......
...@@ -19,8 +19,7 @@ recipe = hexagonit.recipe.download ...@@ -19,8 +19,7 @@ recipe = hexagonit.recipe.download
url = http://heanet.dl.sourceforge.net/project/zencart/CURRENT_%20Zen%20Cart%201.3.x%20Series/Zen%20Cart%20v1.3.9%20-%20Full%20Release/zen-cart-v1.3.9h-full-fileset-10262010.zip url = http://heanet.dl.sourceforge.net/project/zencart/CURRENT_%20Zen%20Cart%201.3.x%20Series/Zen%20Cart%20v1.3.9%20-%20Full%20Release/zen-cart-v1.3.9h-full-fileset-10262010.zip
md5sum = e0a5fb39078321ced7f5a9c193f30927 md5sum = e0a5fb39078321ced7f5a9c193f30927
#If provided tarball does not contain top directory, option shall be changed to false #If provided tarball does not contain top directory, option shall be changed to false
#strip-top-level-dir = true strip-top-level-dir = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[configure-script] [configure-script]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
...@@ -29,18 +28,6 @@ url = ${:_profile_base_location_}/configure.py ...@@ -29,18 +28,6 @@ url = ${:_profile_base_location_}/configure.py
filename = configure.py filename = configure.py
download-only = True download-only = True
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/zencart.inc.php.in
#md5sum = Student may put here md5sum of this file, this is good idea
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.inc.php
[instance-recipe] [instance-recipe]
egg = slapos.cookbook egg = slapos.cookbook
module = lamp.simple module = lamp.simple
...@@ -56,7 +43,10 @@ mode = 0644 ...@@ -56,7 +43,10 @@ mode = 0644
[instance-recipe-egg] [instance-recipe-egg]
recipe = zc.recipe.egg recipe = zc.recipe.egg
python = python2.7 python = python2.7
eggs = ${instance-recipe:egg} eggs =
${mysql-python:egg}
${instance-recipe:egg}
slapos.toolbox[lampconfigure]
[versions] [versions]
# Use SlapOS patched zc.buildout # Use SlapOS patched zc.buildout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment