File python-icalendar.spec of Package python-icalendar

# spec file for package python-icalendar
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 7/2011 - now  open-slx GmbH <>
# Copyright (c) 2009 - 7/2011 Sascha Manns <> 
# 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

# # norootforbuild
%define	module	icalendar
%define	gitid   4d52777
%define	tarname collective-%{module}-%{gitid}

Name:           python-%{module}
Version:        2.2
Release:        0
Summary:        Python parser/generator of iCalendar files package
License:        LGPL-2.1+ and GPL-2.0+
Group:          Development/Languages/Python
Source0:        %{tarname}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-Sphinx
BuildRequires:  python-distribute
%if 0%{?suse_version} >= 1120
BuildArch:      noarch

The iCalendar package is a parser/generator of iCalendar files for use
with Python. It follows the RFC 2445 (iCalendar) specification.

%package doc
Summary:        Python parser/generator of iCalendar files package
Requires:       %{name} = %{version}

%description doc
Documentation for package {name}, a python parser/generator of iCalendar files

%setup -q -n %{tarname}

python build
pushd docs
make html
rm -rf _build/html/.buildinfo
mv _build/html ../

python install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}
install -m644 *.txt README.rst %{buildroot}/%{_defaultdocdir}/%{name}/
cp -r html %{buildroot}/%{_defaultdocdir}/%{name}/
%fdupes -s %{buildroot}/%{_defaultdocdir}/%{name}
%fdupes -s %{buildroot}

rm -rf %{buildroot}

%defattr(-, root, root)
%dir %{_defaultdocdir}/%{name}

%files doc
%defattr(-, root, root)

openSUSE Build Service is sponsored by