diff --git a/.cvsignore b/.cvsignore index e69de29..3e54b36 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +markdown2-1.0.1.8.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..28deaf4 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +python-markdown2-1_0_1_8-1_fc9:F-9:python-markdown2-1.0.1.8-1.fc9.src.rpm:1221169076 diff --git a/markdown2 b/markdown2 new file mode 100644 index 0000000..5b0cc20 --- /dev/null +++ b/markdown2 @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +from markdown2 import main +import sys + +sys.exit( main(sys.argv) ) diff --git a/python-markdown2.spec b/python-markdown2.spec new file mode 100644 index 0000000..7993c9a --- /dev/null +++ b/python-markdown2.spec @@ -0,0 +1,76 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%define srcname markdown2 + +Name: python-%{srcname} +Version: 1.0.1.8 +Release: 1%{?dist} +Summary: A fast and complete Python implementation of Markdown +Group: Development/Languages +License: MIT +URL: http://code.google.com/p/python-%{srcname}/ +Source0: http://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +Source1: markdown2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: python-devel +BuildRequires: python-pygments + +%description +Markdown is a text-to-HTML filter; it translates an easy-to-read / +easy-to-write structured text format into HTML. Markdown's text format +is most similar to that of plain text email, and supports features +such as headers, emphasis, code blocks, blockquotes, and links. + +This is a fast and complete Python implementation of the Markdown +spec. + +For information about markdown itself, see +http://daringfireball.net/projects/markdown/ + + +%prep +%setup0 -q -n %{srcname}-%{version} + + +%build +%{__python} setup.py build + + +%install +rm -rf %{buildroot} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} + +# remove shebangs and fix permissions +find %{buildroot}%{python_sitelib} \( -name '*.py' -o -name 'py.*' \) \ + -exec sed -i '1{/^#!/d}' {} \; \ + -exec chmod u=rw,go=r {} \; + +# overwrite the script (which is self-contained) with a version that +# instead imports from markdown2 +install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir} + + +%clean +rm -rf %{buildroot} + + +%check +cd test +%{__python} test.py + + +%files +%defattr(-,root,root,-) +%doc CHANGES.txt LICENSE.txt README.txt TODO.txt +%{python_sitelib}/* +%{_bindir}/markdown2 + + +%changelog +* Thu Sep 11 2008 Thomas Moschny - 1.0.1.8-1 +- Update to 1.0.1.8. +- Simplify the cmdline wrapper. + +* Tue Sep 9 2008 Thomas Moschny - 1.0.1.7-1 +- New package. diff --git a/sources b/sources index e69de29..84c43c0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +869daf8cc2510a6492aa9b3a810e73e0 markdown2-1.0.1.8.tar.gz