1 |
Summary: oats Time/Project Management System for SME Server |
2 |
%define name smeserver-oats |
3 |
Name: %{name} |
4 |
%define version 0.0.1 |
5 |
%define release 2 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: SMEserver/addon |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
Patch0: smeserver-oats-0.0.1-administrators.patch |
12 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
13 |
BuildArchitectures: noarch |
14 |
Requires: smeserver-release >= 7.0 |
15 |
Requires: oats |
16 |
BuildRequires: e-smith-devtools |
17 |
AutoReqProv: no |
18 |
%description |
19 |
%name is an implementation of oats (http://www.rustyparts.com/oats.php) |
20 |
on SME Server |
21 |
|
22 |
%changelog |
23 |
* Sat Feb 23 2008 Craig D. Jensen <craig.d.jensen@gmail.com> |
24 |
- Administrators array added to the defaults.php templates. This |
25 |
- adds the 'admin' link and associated config page to the interface. |
26 |
- [0.0.1-2] |
27 |
|
28 |
* Fri Feb 08 2008 Craig D. Jensen <craig.d.jensen@gmail.com> |
29 |
- Complete re-write to separate this with the package 'oats' |
30 |
- These two now install as do other SME Contribs. Initial Release. |
31 |
- [0.0.1-1] |
32 |
|
33 |
%prep |
34 |
|
35 |
%setup |
36 |
%patch0 -p1 |
37 |
|
38 |
%build |
39 |
#perl createlinks |
40 |
mkdir -p root/etc/e-smith/db/accounts/defaults/oats |
41 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/oats/type |
42 |
|
43 |
mkdir -p root/etc/e-smith/db/configuration/defaults/oats |
44 |
echo "service" > root/etc/e-smith/db/configuration/defaults/oats/type |
45 |
echo "Time Management System" > root/etc/e-smith/db/configuration/defaults/oats/Name |
46 |
echo "global" > root/etc/e-smith/db/configuration/defaults/oats/PublicAccess |
47 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/oats/status |
48 |
echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbName |
49 |
echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbUser |
50 |
|
51 |
mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init |
52 |
echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80oats |
53 |
|
54 |
%install |
55 |
rm -rf $RPM_BUILD_ROOT |
56 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
57 |
rm -f %{name}-%{version}-filelist |
58 |
/sbin/e-smith/genfilelist \ |
59 |
$RPM_BUILD_ROOT \ |
60 |
> %{name}-%{version}-filelist |
61 |
|
62 |
%files -f %{name}-%{version}-filelist |
63 |
|
64 |
%defattr(-,root,root) |
65 |
|
66 |
%clean |
67 |
rm -rf $RPM_BUILD_ROOT |
68 |
|
69 |
%pre |
70 |
|
71 |
%post |
72 |
/etc/e-smith/events/actions/initialize-default-databases |
73 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80oats |
74 |
/etc/rc.d/init.d/mysql.init start |
75 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
76 |
/sbin/e-smith/expand-template /opt/oats/config/defaults.php |
77 |
/usr/bin/sv h /service/httpd-e-smith |
78 |
|
79 |
%preun |
80 |
|
81 |
%postun |
82 |
if [ $1 = 0 ] ; then |
83 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
84 |
/usr/bin/sv h /service/httpd-e-smith |
85 |
fi |
86 |
# Not good for yum multi-package installs ;-) so i removed the line below |
87 |
#echo "To remove the DB issue 'mysqladmin drop oats' then 'y' to confirm" |