Blob Blame History Raw
%global namewithoutpythonprefix %(echo %{name} | sed 's/^python-//')

Name:           python-xml2rfc
Version:        2.5.1
Release:        1%{?dist}
Summary:        Convert IETF RFC-2629 XML into txt format

Group:          Development/Languages
License:        BSD with advertising
URL:            https://pypi.python.org/pypi/%{namewithoutpythonprefix}/
Source0:        https://pypi.python.org/packages/source/x/%{namewithoutpythonprefix}/%{namewithoutpythonprefix}-%{version}.tar.gz

BuildArch:      noarch
Requires:       python-lxml
BuildRequires:  python2-devel
# for testing
BuildRequires:  python-setuptools python-virtualenv libxml2-devel
BuildRequires:  libxslt-devel

%description
Xml2rfc generates RFCs and IETF drafts from document source in XML
according to the dtd in RFC-2629.  It takes as input an xml file which
contains the text and meta-information about author names etc., and
transforms it into suitably formatted output. The input xml file should
follow the DTD given in RFC-2629 (or it's unofficial successor).

%prep
%setup -q -n %{namewithoutpythonprefix}-%{version}
rm -rf %{namewithoutpythonprefix}.egg-info
iconv -f iso8859-1 -t utf-8 LICENSE > LICENSE.utf8
mv -f LICENSE.utf8 LICENSE

%build
%{__python} setup.py build

%check
# virtualenv .
# make test

%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT

%files
%{_bindir}/xml2rfc
%doc changelog README LICENSE
%{python_sitelib}/*

%changelog
* Sun Jul 31 2016 Paul Wouters <pwouters@redhat.com> - 2.5.1-1
- Updated to 2.5.1

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Sep 01 2013 Paul Wouters <pwouters@redhat.com> - 2.4.2-4
- Fix typo, convert LICENSE to utf-8, check fix and python-setuptools fix

* Sun Sep 01 2013 Paul Wouters <pwouters@redhat.com> - 2.4.2-3
- Patch for paginated_txt.py by Miek, fixes my draft crasher

* Sat Aug 31 2013 Paul Wouters <pwouters@redhat.com> - 2.4.2-2
- Fixup summary, remove cleaning buildroot, remove upstream egg-info
- Added BuildRequire for python-virtualenv to run tests
- Added commented check target - but it has issues to pass
- Fix license to BSD with advertising

* Fri Aug 30 2013 Paul Wouters <pwouters@redhat.com> - 2.4.2-1
- Initial Package