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 4 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Applications/Internet |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
Patch1: smeserver-oats-2.0.3-db_httpd_templates-01.patch |
12 |
Patch2: smeserver-oats-2.0.3-db_httpd_templates-02.patch |
13 |
Patch3: smeserver-oats-2.0.3-db_template-typo.patch |
14 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
BuildArchitectures: noarch |
16 |
Requires: smeserver-release >= 7.0 |
17 |
BuildRequires: e-smith-devtools |
18 |
AutoReqProv: no |
19 |
%description |
20 |
%name is an implementation of oats (http://www.rustyparts.com/oats.php) |
21 |
on SME Server |
22 |
|
23 |
%changelog |
24 |
* Sat Feb 02 2008 Craig D. Jensen <craig.d.jensen@gmail.com> |
25 |
- fix typo in db init template |
26 |
- [2.0.3-4] |
27 |
|
28 |
* Fri Feb 01 2008 Craig D. Jensen <craig.d.jensen@gmail.com> |
29 |
- fix typos and missing '""' quotes in templates. |
30 |
- [2.0.3-3] |
31 |
|
32 |
* Fri Feb 01 2008 Craig D. Jensen <craig.d.jensen@gmail.com> |
33 |
- changes to db, httpd templates and spec to bring up to package |
34 |
- modification guidelines |
35 |
- [2.0.3-2] |
36 |
|
37 |
* Fri Mar 02 2007 Craig D. Jensen <craig.d.jensen@gmail.com> |
38 |
- Name change to reflect SME rpm build naming |
39 |
- No fuinctional changes. Added gpg signature-key-> import at: |
40 |
- http://acenet-tech.org/sme/acenettech/RPM-GPG-KEY-cjensen |
41 |
- [2.0.3-1] |
42 |
|
43 |
* Sun Dec 17 2006 Craig D. Jensen <craig.d.jensen@gmail.com> |
44 |
- Changes to provide SME 7.0 compat |
45 |
- [2.0.3-1cdj] |
46 |
|
47 |
* Tue Mar 09 2004 Craig D. Jensen <cjensen@acenet-tech.org> |
48 |
- Initial release |
49 |
- [2.0.3-cdj] |
50 |
- Original version |
51 |
|
52 |
%prep |
53 |
|
54 |
%setup |
55 |
%patch1 -p1 |
56 |
%patch2 -p1 |
57 |
%patch3 -p1 |
58 |
|
59 |
%build |
60 |
#perl createlinks |
61 |
mkdir -p root/etc/e-smith/db/accounts/defaults/oats |
62 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/oats/type |
63 |
|
64 |
mkdir -p root/etc/e-smith/db/configuration/defaults/oats |
65 |
echo "service" > root/etc/e-smith/db/configuration/defaults/oats/type |
66 |
echo "Time Management" > root/etc/e-smith/db/configuration/defaults/oats/Name |
67 |
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/oats/PublicAccess |
68 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/oats/status |
69 |
echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbName |
70 |
echo "oats" > root/etc/e-smith/db/configuration/defaults/oats/DbUser |
71 |
|
72 |
%install |
73 |
rm -rf $RPM_BUILD_ROOT |
74 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
75 |
rm -f %{name}-%{version}-filelist |
76 |
/sbin/e-smith/genfilelist \ |
77 |
$RPM_BUILD_ROOT \ |
78 |
> %{name}-%{version}-filelist |
79 |
|
80 |
%files -f %{name}-%{version}-filelist |
81 |
|
82 |
%defattr(-,root,root) |
83 |
|
84 |
%clean |
85 |
rm -rf $RPM_BUILD_ROOT |
86 |
|
87 |
%pre |
88 |
|
89 |
%post |
90 |
/etc/e-smith/events/actions/initialize-default-databases |
91 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80oats.sql |
92 |
/etc/rc.d/init.d/mysql.init start |
93 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
94 |
/usr/bin/sv -h /service/httpd-e-smith |
95 |
/bin/chown -R www:www /opt/oats |
96 |
/bin/chown www:www /opt/oats/print |
97 |
/bin/chmod 770 /opt/oats/print |
98 |
/bin/chown root:www /opt/oats/config/* |
99 |
/bin/chmod 0440 /opt/oats/config/* |
100 |
|
101 |
echo "------" |
102 |
echo "acenet-tech.org/sme/smecontrib.php" |
103 |
echo "For install instructions" |
104 |
echo "------" |
105 |
echo "Settings to install: 'config show oats'" |
106 |
/sbin/e-smith/config show oats |
107 |
|
108 |
%preun |
109 |
|
110 |
%postun |
111 |
if [ $1 = 0 ] ; then |
112 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
113 |
/usr/bin/sv -h /service/httpd-e-smith |
114 |
fi |