# # spec file for package python-silvercity # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %define shortname SilverCity Name: python-silvercity Version: 0.9.7 Release: 4.1 Summary: Lexing package, based on Scintilla Group: Development/Python License: BSD-like URL: http://silvercity.sourceforge.net/ Source0: http://garr.dl.sourceforge.net/sourceforge/silvercity/%{shortname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %description SilverCity is a lexing package, based on Scintilla, that can provide lexical analysis for over 20 programming and markup langauges. Scripting language bindings currently exist for Python. %prep %setup -q -n %{shortname}-%{version} sed -i "s,/usr/home/sweetapp/bin/python,/usr/bin/env python," PySilverCity/Scripts/cgi-styler-form.py # fix .css permissions chmod 644 CSS/default.css %build %{__python} setup.py build %install rm -rf %{buildroot} #%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-purelib=%{python_sitelib} %{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} pushd %{buildroot}/%{_bindir} for B in source2html.py cgi-styler.py cgi-styler-form.py ; do new=$(echo $B | sed "s/\(.*\)\(.py\)/\1-%{py_ver}\2/") mv $B $new ln -sf ${new} $B done popd %fdupes %{buildroot}%{_prefix} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/cgi-styler-form-%{py_ver}.py %{_bindir}/cgi-styler-%{py_ver}.py %{_bindir}/source2html-%{py_ver}.py %{_bindir}/cgi-styler-form.py %{_bindir}/cgi-styler.py %{_bindir}/source2html.py %attr(644,root,root) %{python_sitelib}/%{shortname}/default.css %{python_sitelib}/* %changelog * Fri Oct 29 2010 Michael Scherer 0.9.7-9mdv2011.0 + Revision: 590089 - rebuild for python 2.7 * Fri Jan 22 2010 Ahmad Samir 0.9.7-8mdv2010.1 + Revision: 495120 - fix file permissions * Tue Sep 15 2009 Thierry Vignaud 0.9.7-7mdv2010.0 + Revision: 442484 - rebuild * Wed Dec 24 2008 Michael Scherer 0.9.7-6mdv2009.1 + Revision: 318412 - rebuild for new python * Fri Aug 01 2008 Thierry Vignaud 0.9.7-5mdv2009.0 + Revision: 259779 - rebuild * Fri Jul 25 2008 Thierry Vignaud 0.9.7-4mdv2009.0 + Revision: 247634 - rebuild * Mon Feb 18 2008 Thierry Vignaud 0.9.7-2mdv2008.1 + Revision: 171067 - rebuild - fix "foobar is blabla" summary (=> "blabla") so that it looks nice in rpmdrake - kill re-definition of %%buildroot on Pixel's request + Olivier Blin - restore BuildRoot * Sun Oct 21 2007 Colin Guthrie 0.9.7-1mdv2008.1 + Revision: 100735 - import python-silvercity