diff --git a/README.md b/README.md index 37cdd79..58eb8d5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # prestashop +PrestaShop offers a free, fully scalable, Open-source e-commerce solution. + diff --git a/prestashop.spec b/prestashop.spec new file mode 100644 index 0000000..8097d11 --- /dev/null +++ b/prestashop.spec @@ -0,0 +1,109 @@ +%define serverdir %(apxs -q htdocsdir 2>/dev/null) +# To create a customized installation: +# autospec -u prestashop -a5 \ +# -d "installdir=%serverdir/../www.example.com, \ +# sitename=example, \ +# adminmail=webmaster@example.com" + +%if "%{?installdir}" == "" +%define installdir %{serverdir}/prestashop +%endif + +%if "%{?sitename}" != "" +%if "%{?servername}" == "" +%define servername %(basename %installdir 2>/dev/null) +%endif +%define serverlogdir %(apxs -q logfiledir 2>/dev/null) +%else +%if "%{?aliasdir}" == "" +%define aliasdir /prestashop +%endif +%endif + +Name: %{?sitename:%sitename-website-}prestashop +Version: 1.5.5.0 +Release: 1mamba +Summary: A free, fully scalable, Open-source e-commerce solution +Group: Applications/Web +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.prestashop.com/ +## GITSOURCE https://github.com/PrestaShop/PrestaShop.git 1.5.5.0 +Source: https://github.com/PrestaShop/PrestaShop.git/%{version}/PrestaShop-%{version}.tar.bz2 +License: Open Software License 3.0 +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +PrestaShop offers a free, fully scalable, Open-source e-commerce solution. + +%prep +%setup -q -n PrestaShop-%{version} + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}%{installdir} +cp -a * %{buildroot}%{installdir} + +install -d %{buildroot}%{_sysconfdir}/httpd/httpd.d +%if "%{?sitename}" != "" +cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{servername}.conf << EOF +%else +cat > %{buildroot}%{_sysconfdir}/httpd/httpd.d/%{name}.conf << EOF +%endif +%if "%{?sitename}" == "" +%if "%(dirname %installdir)" != "%{serverdir}" +Alias %{aliasdir} %{installdir} + +%endif +%endif + +AllowOverride All +RewriteEngine On +Order allow,deny +Allow from All + +%if "%{?sitename}" != "" +%if "%(dirname %installdir)" != "%{serverdir}" + + +%{?adminmail:ServerAdmin %adminmail} +DocumentRoot %{installdir} +ServerName %{servername} +ErrorLog %{serverlogdir}/%{servername}-error_log +CustomLog %{serverlogdir}/%{servername}-access_log common + +%endif +%endif +EOF + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post +if [ $1 -ge 1 ]; then +[ -e %{_localstatedir}/lock/subsys/httpd ] && service httpd reload || : +fi +: + +%files +%defattr(-,root,root) +%if "%{?sitename}" != "" +%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{servername}.conf +%else +%config(noreplace) %{_sysconfdir}/httpd/httpd.d/%{name}.conf +%endif +%dir %{installdir} +%attr(-,apache,nobody) %{installdir}/* + +## note: eventually add the remaining documents (if any) +# %doc README.md + +%changelog +* Thu Oct 03 2013 Silvan Calarco 1.5.5.0-1mamba +- package created by silvan using the webbuild interface