Summary: smserver rpm to setup mysql database and web link for wordpress weblog %define name smeserver-wordpress Name: %{name} %define version 0.9 %define release 5 Version: %{version} Release: %{release}%{?dist} License: GPL URL: http://www.dungog.net/sme Group: SMEserver/addon Source: %{name}-%{version}.tar.gz BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} Requires: e-smith-release >= 7.0 Requires: wordpress AutoReqProv: no %description smserver rpm to setup mysql database and web link for wordpress weblog %changelog * Mon Dec 11 2006 Stephen Noble - rpm %post events reordered, to enable clean install - [0.9-5] * Thu Nov 9 2006 Stephen Noble - http alias corrected - [0.9-4] * Thu Nov 9 2006 Stephen Noble - http PublicAccess setting added - [0.9-3] * Thu May 4 2006 Stephen Noble - httpd fragment modified - rpm doesn't change file permissions - [0.9-2] * Sun Apr 16 2006 Stephen Noble - initial release - [0.9-1] %prep %setup %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 %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --dir '/opt/wordpress' 'attr(755,www,www)' \ > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post /etc/e-smith/events/actions/initialize-default-databases /sbin/e-smith/expand-template /etc/e-smith/sql/init/80wordpress.sql /etc/rc.d/init.d/mysql.init start /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith echo "" echo "see www.dungog.net/sme/webapp.php" echo "current settings 'config show wordpress'..." /sbin/e-smith/config show wordpress %postun #uninstall if [ $1 = 0 ] ; then /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)