Summary: smserver rpm to setup The Address Book, an address management system %define name smeserver-theaddressbook Name: %{name} %define version 0.9 %define release 1 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: theaddressbook BuildRequires: e-smith-devtools AutoReqProv: no %description smserver rpm to setup The Address Book, an address management system %changelog * Thu Dec 21 2006 Stephen Noble - initial release - [0.9-1] %prep %setup %build #perl createlinks mkdir -p root/etc/e-smith/db/accounts/defaults/addressbook echo "reserved" > root/etc/e-smith/db/accounts/defaults/addressbook/type mkdir -p root/etc/e-smith/db/configuration/defaults/addressbook echo "The Address Book" > root/etc/e-smith/db/configuration/defaults/addressbook/Name echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/addressbook/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 \ --file '/opt/addressbook/import.pl' 'attr(0755,root,root)' \ > %{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/80addressbook.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 addressbook'..." /sbin/e-smith/config show addressbook %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)