Blob Blame History Raw
# Invoke with "--with tests" to enable tests
# Currently disabled by default as it requires network by default
%bcond_with tests

Name:       khal
Version:    0.6.0
Release:    1%{?git_tag}%{?dist}
Summary:    CLI calendar application

License:    MIT
URL:        https://github.com/geier/%{name}
Source0:    https://github.com/geier/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# In theory documentation requires sphinxcontrib.newsfeed to generate
# a blog of the changelog. We only need the manpage. We also fix a Makefile error
# which happens when using .tar.gz
Patch0:     fix-man-build.patch
Patch1:     doc-typo.patch
Patch2:     sphinx-python3.patch
Patch3:     doc-theme-fix.patch
BuildArch:  noarch

BuildRequires:  python-devel
BuildRequires:  python-configobj
BuildRequires:  python-setuptools
BuildRequires:  python-sphinx

Requires:       python-click >= 3.2
Requires:       python-dateutil
Requires:       python-configobj
Requires:       python-urwid
Requires:       python-tzlocal
Requires:       vdirsyncer >= 0.4.3-5

%description
Khal is a standards based CLI (console) calendar program. CalDAV compatibility
is achieved by using vdir/vdirsyncer as a back-end, allowing syncing of
calendars with a variety of other programs on a host of different platforms.

%prep
%setup -q
%patch0 -p1 -b .man
%patch1 -p1 -b .typo
#%patch2 -p1 -b .tzerror
%patch3 -p1 -b .doctheme

%build
%{__python} setup.py build
cd doc
# Not using _smp_flags as sphinx barfs with it from time to time
make SPHINXBUILD=sphinx-build man html text
cd ..

%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
install -d "$RPM_BUILD_ROOT%{_mandir}/man1"
cp -r doc/build/man/%{name}.1 "$RPM_BUILD_ROOT%{_mandir}/man1"
# Remove extra copy of text docs
rm -vrf doc/build/html/_sources
rm -fv doc/build/html/{.buildinfo,objects.inv}

%check
# needs python3-tox bz #1010767
%if %{with tests}
tox -e py27
%endif


%files
%doc AUTHORS.txt README.rst CONTRIBUTING.txt khal.conf.sample doc/build/html doc/build/text
%license COPYING
%{python_sitelib}/*
%{_bindir}/ikhal
%{_bindir}/khal
%{_mandir}/man1/%{name}.1.*

%changelog
* Sat Aug 08 2015 Ben Boeckel <mathstuf@gmail.com> - 0.6.0-1
- update to 0.6.0

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 03 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-2
- Fix build

* Wed Jun 03 2015 Michele Baldessari <michele@acksyn.org> - 0.5.0-1
- New upstream

* Mon Mar 02 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-10
- Fix build

* Mon Mar 02 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-9
- Disable python3 port until khal supports it fully

* Sun Mar 01 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-8
- Fix broken build

* Sun Mar 01 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-7
- Port to python3

* Sun Mar 01 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-6
- Fix check section and make it work when run with tests enabled

* Sun Feb 15 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-5
- Apply proper upstream fix for issue 159

* Sat Feb 14 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-4
- Fix for issue https://github.com/geier/khal/issues/158
- Temp fix for issue 159

* Tue Feb 10 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-3
- Add documentation

* Wed Feb 04 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-2
- Fix the doc build

* Tue Feb 03 2015 Michele Baldessari <michele@redhat.com> - 0.4.0-1
- New upstream

* Mon Jan 05 2015 Michele Baldessari <michele@redhat.com> - 0.3.1-2
- Fixed some missing requires

* Wed Oct 01 2014 Michele Baldessari <michele@redhat.com> - 0.3.1-1
- Initial packaging