%define wwwroot /var/www/html Name: oscommerce Version: 3.0.2 Release: 1mamba Summary: osCommerce is the leading Open Source online shop e-commerce solution that is available for free Group: Applications/Web Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.oscommerce.com/ Source0: http://www.oscommerce.com/files/oscommerce-%{version}.zip Source1: osCommerce-createmysql License: GPL Requires: apache Requires: apache-mod_php Requires: php-mysql Provides: osCommerce Obsoletes: osCommerce BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root %description osCommerce is the leading Open source online shop e-commerce solution that is available for free under the GNU General Public License. It features a rich set of out-of-the-box online shopping cart functionality that allows store owners to setup, run, and maintain their online stores with minimum effort and with no costs, license fees, or limitations involved. %prep %setup -q %build %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{wwwroot} cp -a oscommerce %{buildroot}%{wwwroot}/ install -D %{SOURCE1} %{buildroot}%{_datadir}/oscommerce/contrib/createmysql #% pre #/usr/sbin/useradd -u %{userid} -c 'osCommerce user' -d /dev/null -g oscommerce \ # -s /bin/false oscommerce 2>/dev/null #exit 0 #% post ## new install #if [ $1 -eq 1 ]; then # RANDOM_PASSWD=`/usr/bin/mkpasswd -l 10 -s 0` # sed -i "s|# output database: log, mysql.*|output database: log, mysql, user= password=$RANDOM_PASSWD dbname= host=localhost|" \ # %{_datadir}/osCommerce/contrib/createmysql $RANDOM_PASSWD #fi #exit 0 %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %files %defattr(-,root,root) %{_datadir}/oscommerce/contrib/createmysql %dir %{wwwroot}/oscommerce %{wwwroot}/oscommerce/* %{wwwroot}/oscommerce/.htaccess %doc README license.txt %changelog * Wed Jun 20 2012 Silvan Calarco 3.0.2-1mamba - update to 3.0.2 * Tue Jan 17 2006 Alessandro Ramazzina 051113-1qilnx - package created by autospec