--- rpms/smeserver-wordpress/contribs8/smeserver-wordpress.spec 2013/10/27 18:04:33 1.1 +++ rpms/smeserver-wordpress/contribs8/smeserver-wordpress.spec 2013/10/27 21:17:36 1.2 @@ -4,7 +4,7 @@ %define name smeserver-wordpress %define version 1.0 -%define release 5 +%define release 6 Summary: smserver rpm to setup mysql database and web link for wordpress weblog Name: %{name} Version: %{version} @@ -15,6 +15,7 @@ Group: SMEserver/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-wordpress-1.0-rm80opt.patch Patch1: smeserver-wordpress-1.0-tmp_folder.patch +Patch2: smeserver-wordpress-1.0-wpEPEL.patch BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} BuildRequires: e-smith-devtools >= 1.13.1-03 @@ -26,6 +27,12 @@ AutoReqProv: no smserver rpm to setup mysql database and web link for wordpress weblog %changelog +* Sun Oct 27 2013 JP Pialasse 1.0-6.sme +- rewritten for epel version of wordpress +- added createlinks and conf-wordpress event +- start cleaning spec file + + * Wed Sep 04 2013 Stephane de Labrusse 1.0.5 - add www:www permission on /opt/wordpress folder to allow automatic update by FTP @@ -68,24 +75,27 @@ smserver rpm to setup mysql database and %setup %patch0 -p1 %patch1 -p1 -%build -mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress -echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type +%patch2 -p1 -mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress -echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name -echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess -echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status -echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName -echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser -echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang - -mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init -echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress - -#only needed so it is removed afterwards -mkdir -p root/opt/wordpress -touch root/opt/wordpress/wp-config.php + +%build +#mkdir -p root/etc/e-smith/db/accounts/defaults/wordpress +#echo "reserved" > root/etc/e-smith/db/accounts/defaults/wordpress/type +# +#mkdir -p root/etc/e-smith/db/configuration/defaults/wordpress +#echo "Wordpress weblog" > root/etc/e-smith/db/configuration/defaults/wordpress/Name +#echo "global" > root/etc/e-smith/db/configuration/defaults/wordpress/PublicAccess +#echo "enabled" > root/etc/e-smith/db/configuration/defaults/wordpress/status +#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbName +#echo "wordpress" > root/etc/e-smith/db/configuration/defaults/wordpress/DbUser +#echo "en" > root/etc/e-smith/db/configuration/defaults/wordpress/WpLang +# +#mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init +#echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80wordpress +# +##only needed so it is removed afterwards +#mkdir -p root/opt/wordpress +#touch root/opt/wordpress/wp-config.php %install rm -rf $RPM_BUILD_ROOT @@ -103,26 +113,28 @@ rm -rf %{name}-%{version} %preun %post -/etc/e-smith/events/actions/initialize-default-databases -/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress -/etc/rc.d/init.d/mysql.init start -/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf -/sbin/e-smith/expand-template /opt/wordpress/wp-config.php -/usr/bin/sv h /service/httpd-e-smith - -echo "" -echo "see http://wiki.contribs.org/Wordpress" -echo "see config show wordpress" -/sbin/e-smith/config show wordpress -echo " " -/bin/chown -R www:www /opt/wordpress/ +#/etc/e-smith/events/actions/initialize-default-databases +#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress +#/etc/rc.d/init.d/mysql.init start +#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +#/sbin/e-smith/expand-template /opt/wordpress/wp-config.php +#/usr/bin/sv h /service/httpd-e-smith +# +#echo "" +#echo "see http://wiki.contribs.org/Wordpress" +#echo "see config show wordpress" +#/sbin/e-smith/config show wordpress +#echo " " + +# this one under I am not sure if it is a good thing ..................... !!!!!! +#/bin/chown -R www:www /opt/wordpress/ %postun #uninstall -if [ $1 = 0 ] ; then - /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf - /usr/bin/sv h /service/httpd-e-smith -fi +#if [ $1 = 0 ] ; then +# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +# /usr/bin/sv h /service/httpd-e-smith +#fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)