14
0
Files
python-textile/python-textile.spec

70 lines
1.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-textile
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define modname textile
Name: python-%{modname}
BuildRequires: python-devel python-setuptools
URL: http://code.google.com/p/pytextile/
License: BSD Licence
Group: Productivity/System
Autoreqprov: on
Version: 2.0.11
Release: 1
Summary: This is a Python implementation of the Textile markup language.
Source0: http://pytextile.googlecode.com/files/%{modname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
## for htmlizer:
#Requires(missingok): python-twisted-core
# FIXME: no package currently provides tidy,
# could be mx (experimental) or uTidyLib.
%description
This is a Python implementation of the Textile
(http://textism.com/tools/textile) markup language.
Textile is a XHTML generator using a simple markup developed by Dean
Allen. This is a Python port with support for code validation, itex to
MathML translation, Python code coloring and much more.
%prep
%setup -n %{modname}-%{version}
# small fixes:
# - toggle import statement for htmlizer
# - remove the shebang
sed -i -e 's/^\( *\)\(import htmlizer\)/\1#\2/' \
-e 's/^\( *\)#\(from twisted.python import htmlizer\)/\1\2/' \
-e '/#! *\/usr\/bin\/.*python.*/{1D}' textile.py
%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build
# calling textile directly yields a single overview page
python textile.py > overview.html
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc overview.html
%changelog -n python-%{modname}