LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File torrent-seeder.spec of Package torrent-seeder (Project openSUSE:infrastructure:devel)

# spec file for package torrent-seeder (Version 0.0.1)
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name:           torrent-seeder
Version:        0.0.2
Release:        1
%define pkg_name torrent-seeder
%define pkg_user torrent
%define pkg_home /srv/torrents
Group:          openSUSE/Servers
License:        BSD
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       rubygem-bencode 
Requires:       rubygem-rubytorrent
Requires:       cron 
Requires:       transmission 
Requires:       logrotate
Url:            http://www.opensuse.org/
Source:         torrent-crawler.rb
Source1:        torrent-seeder.cron
Source2:        torrent-seeder.init
Source3:        torrent-seeder.sysconfig
Source4:        usr.bin.client_test
Source5:        torrent-seeder.logrotate
Summary:        Package to setup a torrent seeder on openSUSE servers
Package to setup a torrent seeder on openSUSE servers

%{__install} -D -m 0755 %{S:0} %{buildroot}%{_sbindir}/torrent-crawler.rb
%{__install} -D -m 0644 %{S:1} %{buildroot}/etc/cron.d/torrent-seeder
%{__install} -D -m 0644 %{S:3} %{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
%{__install} -D -m 0755 %{S:2} %{buildroot}/etc/init.d/torrent-seeder
%{__ln_s} -f /etc/init.d/torrent-seeder \
%{__install} -d -m 0755 %{buildroot}%{pkg_home}
%{__install} -D -m 0644 %{S:4} %{buildroot}/etc/apparmor.d/usr.bin.client_test
%{__install} -D -m 0644 %{S:5} %{buildroot}/etc/logrotate.d/torrent-seeder

%{__rm} -rf %{buildroot}

/usr/sbin/groupadd -r %{pkg_user} &>/dev/null ||:
/usr/sbin/useradd  -g %{pkg_user} -s /bin/false -r -c "user for %{pkg_user}" -d %{pkg_home} %{pkg_user} &>/dev/null ||:

%fillup_only %{pkg_name}

%stop_on_removal %{pkg_name}

%restart_on_update %{pkg_name}

%config(noreplace) /etc/cron.d/torrent-seeder
%config(noreplace) /etc/init.d/torrent-seeder
%dir %attr(755,%{pkg_user},%{pkg_user}) %{pkg_home}
%dir /etc/apparmor.d/
%config(noreplace) /etc/apparmor.d/usr.bin.client_test
%config(noreplace) /etc/logrotate.d/torrent-seeder