A new user interface for you!

File xbt-tracker.spec of Package xbt-tracker

# spec file for package xbt-tracker
# Copyright (c) 2016 SUSE LINUX 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/

Name:           xbt-tracker
Version:        r2494
Release:        0
Summary:        XBT Tracker is a BitTorrent tracker written in C++
License:        GPL-3.0
Group:          Productivity/Networking/Other
Url:            https://github.com/OlafvdSpek/xbt
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}.logrotate
Source2:        %{name}.conf
Source3:        %{name}.service
Source4:        usr.sbin.xbt-tracker.apparmor
Patch0:         xbt_tracker_log.diff
BuildRequires:  boost-devel
BuildRequires:  cmake >= 2.4
BuildRequires:  gcc-c++
BuildRequires:  libmysqlclient-devel
BuildRequires:  libstdc++-devel
BuildRequires:  systemd
BuildRequires:  zlib-devel
Requires:       logrotate
Requires:       systemd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

XBT Tracker is a BitTorrent tracker written in C++. It's designed to offer high performance
while consuming little resources (CPU and RAM). It's a pure tracker, so it doesn't offer a frontend.
You can use any (PHP) frontend you want.

%setup -q

export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"

%{__cmake} .
make %{?_smp_mflags}

install -D -s -m 755 Tracker/xbt_tracker %{buildroot}/%{_sbindir}/%{name}
install -d -m 750 %{buildroot}/%{_localstatedir}/log/%{name}
install -D -m 644 Tracker/xbt_tracker.sql %{buildroot}/%{_sysconfdir}/%{name}/%{name}.sql
install -D -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
install -D -m 660 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
install -D -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
install -D -m 640 %{SOURCE4} %{buildroot}/%{_sysconfdir}/apparmor/profiles/extras/usr.sbin.xbt-tracker
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}

%service_add_pre %{name}.service

%service_add_post %{name}.service

%service_del_preun %{name}.service

%service_del_postun %{name}.service

%dir %attr(0750,root,root) %{_localstatedir}/log/%{name}
%dir %attr(0750,root,root) %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/%{name}.sql
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{_sysconfdir}/apparmor
%dir %{_sysconfdir}/apparmor/profiles
%dir %{_sysconfdir}/apparmor/profiles/extras
%config(noreplace) /%{_sysconfdir}/apparmor/profiles/extras/usr.sbin.xbt-tracker
%doc Tracker/COPYING Tracker/htdocs/*