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