1 |
slords |
1.1 |
Summary: smserver rpm to setup The Address Book, an address management system |
2 |
|
|
%define name smeserver-theaddressbook |
3 |
|
|
Name: %{name} |
4 |
|
|
%define version 0.9 |
5 |
|
|
%define release 1 |
6 |
|
|
Version: %{version} |
7 |
slords |
1.3 |
Release: %{release}%{?dist} |
8 |
slords |
1.2 |
License: GPL |
9 |
slords |
1.1 |
URL: http://www.dungog.net/sme |
10 |
|
|
Group: SMEserver/addon |
11 |
|
|
Source: %{name}-%{version}.tar.gz |
12 |
|
|
BuildArchitectures: noarch |
13 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
14 |
|
|
Requires: e-smith-release >= 7.0 |
15 |
|
|
Requires: theaddressbook |
16 |
slords |
1.5 |
BuildRequires: e-smith-devtools |
17 |
slords |
1.1 |
AutoReqProv: no |
18 |
|
|
|
19 |
|
|
%description |
20 |
|
|
smserver rpm to setup The Address Book, an address management system |
21 |
|
|
|
22 |
|
|
%changelog |
23 |
|
|
* Thu Dec 21 2006 Stephen Noble <support@dungog.net> |
24 |
|
|
- initial release |
25 |
|
|
- [0.9-1] |
26 |
|
|
|
27 |
|
|
%prep |
28 |
|
|
%setup |
29 |
|
|
|
30 |
|
|
%build |
31 |
|
|
#perl createlinks |
32 |
|
|
mkdir -p root/etc/e-smith/db/accounts/defaults/addressbook |
33 |
|
|
echo "reserved" > root/etc/e-smith/db/accounts/defaults/addressbook/type |
34 |
|
|
|
35 |
|
|
mkdir -p root/etc/e-smith/db/configuration/defaults/addressbook |
36 |
|
|
echo "The Address Book" > root/etc/e-smith/db/configuration/defaults/addressbook/Name |
37 |
|
|
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/addressbook/PublicAccess |
38 |
|
|
|
39 |
|
|
%install |
40 |
|
|
rm -rf $RPM_BUILD_ROOT |
41 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
42 |
|
|
rm -f %{name}-%{version}-filelist |
43 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
44 |
|
|
--file '/opt/addressbook/import.pl' 'attr(0755,root,root)' \ |
45 |
|
|
> %{name}-%{version}-filelist |
46 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
47 |
|
|
|
48 |
|
|
%clean |
49 |
|
|
cd .. |
50 |
|
|
rm -rf %{name}-%{version} |
51 |
|
|
|
52 |
|
|
%pre |
53 |
|
|
%preun |
54 |
|
|
|
55 |
|
|
%post |
56 |
|
|
/etc/e-smith/events/actions/initialize-default-databases |
57 |
|
|
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80addressbook.sql |
58 |
|
|
/etc/rc.d/init.d/mysql.init start |
59 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
60 |
|
|
/usr/local/bin/svc -h /service/httpd-e-smith |
61 |
|
|
|
62 |
|
|
echo "" |
63 |
|
|
echo "see www.dungog.net/sme/webapp.php" |
64 |
|
|
echo "current settings 'config show addressbook'..." |
65 |
|
|
/sbin/e-smith/config show addressbook |
66 |
|
|
|
67 |
|
|
%postun |
68 |
|
|
#uninstall |
69 |
|
|
if [ $1 = 0 ] ; then |
70 |
|
|
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
71 |
|
|
/usr/local/bin/svc -h /service/httpd-e-smith |
72 |
|
|
fi |
73 |
|
|
|
74 |
|
|
%files -f %{name}-%{version}-filelist |
75 |
|
|
%defattr(-,root,root) |
76 |
|
|
|