1 |
# $Id: smeserver-tf-b4rt.spec,v 1.2 2008/04/02 15:03:59 slords Exp $ |
2 |
# Authority: dungog |
3 |
# Name: Stephen Noble |
4 |
|
5 |
Summary: smeserver rpm to setup torrentflux-b4rt torrent client |
6 |
%define name smeserver-tf-b4rt |
7 |
Name: %{name} |
8 |
%define version 1.0 |
9 |
%define release 1 |
10 |
Version: %{version} |
11 |
Release: %{release}%{?dist} |
12 |
License: GPL |
13 |
URL: http://www.dungog.net/sme |
14 |
Group: SMEserver/addon |
15 |
Source0: %{name}-%{version}.tar.gz |
16 |
BuildArchitectures: noarch |
17 |
BuildRoot: /var/tmp/%{name}-%{version} |
18 |
Requires: e-smith-release >= 7.0 |
19 |
Requires: tf-b4rt |
20 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
21 |
AutoReqProv: no |
22 |
|
23 |
%description |
24 |
smserver rpm to setup torrentflux-b4rt torrent client |
25 |
|
26 |
%changelog |
27 |
* Sun Sep 16 2007 Stephen Noble <support@dungog.net> 1.0 |
28 |
- initial release |
29 |
|
30 |
%prep |
31 |
%setup |
32 |
|
33 |
%build |
34 |
mkdir -p root/etc/e-smith/db/accounts/defaults/b4rt |
35 |
echo "reserved" > root/etc/e-smith/db/accounts/defaults/b4rt/type |
36 |
|
37 |
mkdir -p root/etc/e-smith/db/configuration/defaults/b4rt |
38 |
echo "service" > root/etc/e-smith/db/configuration/defaults/b4rt/type |
39 |
echo "Torrent client" > root/etc/e-smith/db/configuration/defaults/b4rt/Name |
40 |
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/b4rt/PublicAccess |
41 |
echo "enabled" > root/etc/e-smith/db/configuration/defaults/b4rt/status |
42 |
echo "b4rt" > root/etc/e-smith/db/configuration/defaults/b4rt/DbName |
43 |
echo "b4rt" > root/etc/e-smith/db/configuration/defaults/b4rt/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/80tf-b4rt |
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 $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
53 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
54 |
|
55 |
%clean |
56 |
cd .. |
57 |
rm -rf %{name}-%{version} |
58 |
|
59 |
%pre |
60 |
|
61 |
%preun |
62 |
|
63 |
%post |
64 |
/etc/e-smith/events/actions/initialize-default-databases |
65 |
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80tf-b4rt |
66 |
/etc/rc.d/init.d/mysql.init start |
67 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
68 |
/sbin/e-smith/expand-template /opt/b4rt/html/inc/config/config.db.php |
69 |
/usr/local/bin/svc -h /service/httpd-e-smith |
70 |
|
71 |
echo "" |
72 |
echo "see http://wiki.contribs.org/torrentflux" |
73 |
|
74 |
%postun |
75 |
#uninstall |
76 |
if [ $1 = 0 ] ; then |
77 |
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
78 |
/usr/local/bin/svc -h /service/httpd-e-smith |
79 |
fi |
80 |
|
81 |
%files -f %{name}-%{version}-filelist |
82 |
%defattr(-,root,root) |
83 |
|