# $Id$ # Authority: dungog # Name: Stephen Noble Summary: smeserver rpm to setup torrentflux-b4rt torrent client %define name smeserver-tf-b4rt Name: %{name} %define version 1.0 %define release 1 Version: %{version} Release: %{release}%{?dist} License: GPL URL: http://www.dungog.net/sme Group: SMEserver/addon Source0: %{name}-%{version}.tar.gz BuildArchitectures: noarch BuildRoot: /var/tmp/%{name}-%{version} Requires: e-smith-release >= 7.0 Requires: tf-b4rt BuildRequires: e-smith-devtools >= 1.13.1-03 AutoReqProv: no %description smserver rpm to setup torrentflux-b4rt torrent client %changelog * Sun Sep 16 2007 Stephen Noble 1.0 - initial release %prep %setup %build mkdir -p root/etc/e-smith/db/accounts/defaults/b4rt echo "reserved" > root/etc/e-smith/db/accounts/defaults/b4rt/type mkdir -p root/etc/e-smith/db/configuration/defaults/b4rt echo "service" > root/etc/e-smith/db/configuration/defaults/b4rt/type echo "Torrent client" > root/etc/e-smith/db/configuration/defaults/b4rt/Name echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/b4rt/PublicAccess echo "enabled" > root/etc/e-smith/db/configuration/defaults/b4rt/status echo "b4rt" > root/etc/e-smith/db/configuration/defaults/b4rt/DbName echo "b4rt" > root/etc/e-smith/db/configuration/defaults/b4rt/DbUser mkdir -p root/etc/e-smith/templates.metadata/etc/e-smith/sql/init echo "PERMS=0750" > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80tf-b4rt %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist %clean cd .. rm -rf %{name}-%{version} %pre %preun %post /etc/e-smith/events/actions/initialize-default-databases /sbin/e-smith/expand-template /etc/e-smith/sql/init/80tf-b4rt /etc/rc.d/init.d/mysql.init start /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /sbin/e-smith/expand-template /opt/b4rt/html/inc/config/config.db.php /usr/local/bin/svc -h /service/httpd-e-smith echo "" echo "see http://wiki.contribs.org/torrentflux" %postun #uninstall if [ $1 = 0 ] ; then /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf /usr/local/bin/svc -h /service/httpd-e-smith fi %files -f %{name}-%{version}-filelist %defattr(-,root,root)