# $Id: smeserver-oats.spec,v 1.3 2008/04/02 15:03:58 slords Exp $ # Authority: fetcher # Name: Craig D. Jensen Summary: oats Time/Project Management System for SME Server %define name smeserver-oats Name: %{name} %define version 0.0.1 %define release 2 Version: %{version} Release: %{release}%{?dist} License: GPL Group: SMEserver/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-oats-0.0.1-administrators.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: smeserver-release >= 7.0 Requires: oats BuildRequires: e-smith-devtools AutoReqProv: no %description %name is an implementation of oats (http://www.rustyparts.com/oats.php) on SME Server %changelog * Sat Feb 23 2008 Craig D. Jensen - Administrators array added to the defaults.php templates. This - adds the 'admin' link and associated config page to the interface. - [0.0.1-2] * Fri Feb 08 2008 Craig D. Jensen - Complete re-write to separate this with the package 'oats' - These two now install as do other SME Contribs. Initial Release. - [0.0.1-1] %prep %setup %patch0 -p1 %build #perl createlinks mkdir -p root/etc/e-smith/db/accounts/defaults/oats echo "reserved" > root/etc/e-smith/db/accounts/defaults/oats/type mkdir -p root/etc/e-smith/db/configuration/defaults/oats echo "service" > root/etc/e-smith/db/configuration/defaults/oats/type echo "Time Management System" > root/etc/e-smith/db/configuration/defaults/oats/Name echo "global" > root/etc/e-smith/db/configuration/defaults/oats/PublicAccess echo "enabled" > root/etc/e-smith/db/configuration/defaults/oats/status echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbName echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbUser 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/80oats %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 \ > %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist %defattr(-,root,root) %clean rm -rf $RPM_BUILD_ROOT %pre %post /etc/e-smith/events/actions/initialize-default-databases /sbin/e-smith/expand-template /etc/e-smith/sql/init/80oats /etc/rc.d/init.d/mysql.init start /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /sbin/e-smith/expand-template /opt/oats/config/defaults.php /usr/bin/sv h /service/httpd-e-smith %preun %postun if [ $1 = 0 ] ; then /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/bin/sv h /service/httpd-e-smith fi # Not good for yum multi-package installs ;-) so i removed the line below #echo "To remove the DB issue 'mysqladmin drop oats' then 'y' to confirm"