1 |
Summary: oats Time/Project Management System for SME Server |
2 |
%define name smeserver-oats |
3 |
Name: %{name} |
4 |
%define version 2.0.3 |
5 |
%define release 1 |
6 |
Version: %{version} |
7 |
Release: %smerelease %{release} |
8 |
Copyright: GPL |
9 |
Group: Applications/Internet |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
Packager: %{_packager} |
12 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
13 |
BuildArchitectures: noarch |
14 |
Requires: smeserver-release >= 7.0 |
15 |
AutoReqProv: no |
16 |
%description |
17 |
%name is an implementation of oats (http://www.rustyparts.com/oats.php) |
18 |
on SME Server |
19 |
|
20 |
%changelog |
21 |
* Fri Mar 02 2007 Craig D. Jensen <craig.d.jensen@gmail.com> |
22 |
- Name change to reflect SME rpm build naming |
23 |
- No fuinctional changes. Added gpg signature-key-> import at: |
24 |
- http://acenet-tech.org/sme/acenettech/RPM-GPG-KEY-cjensen |
25 |
- [2.0.3-1] |
26 |
|
27 |
* Sun Dec 17 2006 Craig D. Jensen <craig.d.jensen@gmail.com> |
28 |
- Changes to provide SME 7.0 compat |
29 |
- [2.0.3-1cdj] |
30 |
|
31 |
* Tue Mar 09 2004 Craig D. Jensen <cjensen@acenet-tech.org> |
32 |
- Initial release |
33 |
- [2.0.3-cdj] |
34 |
- Original version |
35 |
|
36 |
%prep |
37 |
|
38 |
%setup |
39 |
|
40 |
%build |
41 |
#perl createlinks |
42 |
mkdir -p root/etc/e-smith/db/accounts/defaults/oats |
43 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/oats/type |
44 |
|
45 |
mkdir -p root/etc/e-smith/db/configuration/defaults/oats |
46 |
echo "Time Management" > root/etc/e-smith/db/configuration/defaults/oats/Name |
47 |
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/oats/PublicAccess |
48 |
|
49 |
%install |
50 |
rm -rf $RPM_BUILD_ROOT |
51 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
52 |
rm -f %{name}-%{version}-filelist |
53 |
/sbin/e-smith/genfilelist \ |
54 |
$RPM_BUILD_ROOT \ |
55 |
> %{name}-%{version}-filelist |
56 |
|
57 |
%files -f %{name}-%{version}-filelist |
58 |
|
59 |
%defattr(-,root,root) |
60 |
|
61 |
%clean |
62 |
rm -rf $RPM_BUILD_ROOT |
63 |
|
64 |
%pre |
65 |
|
66 |
%post |
67 |
/etc/e-smith/events/actions/initialize-default-databases |
68 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80oats.sql |
69 |
/etc/rc.d/init.d/mysql.init start |
70 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
71 |
/usr/local/bin/svc -h /service/httpd-e-smith |
72 |
/bin/chown -R www:www /opt/oats |
73 |
/bin/chown www:www /opt/oats/print |
74 |
/bin/chmod 770 /opt/oats/print |
75 |
/bin/chown root:www /opt/oats/config/* |
76 |
/bin/chmod 0440 /opt/oats/config/* |
77 |
|
78 |
echo "------" |
79 |
echo "acenet-tech.org/sme/smecontrib.php" |
80 |
echo "For install instructions" |
81 |
echo "------" |
82 |
echo "Settings to install: 'config show oats'" |
83 |
/sbin/e-smith/config show oats |
84 |
|
85 |
%preun |
86 |
|
87 |
%postun |
88 |
if [ $1 = 0 ] ; then |
89 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
90 |
/usr/local/bin/svc -h /service/httpd-e-smith |
91 |
fi |