File taskd.spec of Package taskd

#
# spec file for package taskwarrior
#
# Copyright (c) 2015 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/
#


Name:           taskd
Version:        1.1.0
Release:        0
Summary:        Task sharing server for taskwarrior clients
License:        MIT
Group:          Productivity/Office/Organizers
Url:            http://taskwarrior.org
Source0:        http://www.taskwarrior.org/download/taskd-%{version}.tar.gz
BuildRequires:  cmake >= 2.8
BuildRequires:  gcc-c++
BuildRequires:  awk
BuildRequires:  coreutils
BuildRequires:  pkgconfig(gnutls)
BuildRequires:  libuuid-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Taskserver will allow you set up a server so your Taskwarrior client (and
others, coming soon) can share tasks.

%prep
%setup -q -n %{name}-%{version}

# replace __TIME__/__DATE__ with values from source code tarball
DATE=$(/bin/date -r "%{SOURCE0}" | awk '{print $2" "$3" "$6}')
TIME=$(/bin/date -r "%{SOURCE0}" | awk '{print $4}')
sed -i src/diag.cpp \
 -e "s/__TIME__/\"${TIME}\"/" \
 -e "s/__DATE__/\"${DATE}\"/"

%build
%cmake

make %{?_smp_mflags}

%install
%cmake_install

rm -f %{buildroot}/%{_datadir}/doc/%{name}/INSTALL
mkdir -p %{buildroot}%{_datadir}/doc/packages/
mv %{buildroot}/%{_datadir}/doc/%{name} \
   %{buildroot}/%{_datadir}/doc/packages

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS
%{_bindir}/%{name}
%{_bindir}/%{name}ctl
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/%{name}ctl.1.*
%{_mandir}/man5/%{name}rc.5.*

%changelog
openSUSE Build Service is sponsored by