File scour.spec of Package scour

# spec file for package scour (Version 0.25)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Guido Berhoerster.
# 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

Name:           scour
Version:        0.25
Release:        1
License:        ASL 2.0 and BSD
Summary:        Tool for Reducing the Size of SVG Files
Group:          Productivity/Graphics/Other
BuildRequires:  unzip
BuildRequires:  ed
BuildRequires:  fdupes
BuildRequires:  python-devel
Requires:       python-xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Scour is a tool for reducing the size of SVG files as much as possible, while
retaining the original rendering of the files.

Optimisations performed by Scour on SVG files include: removing empty elements,
removing metadata elements, removing unused id= attribute values, removing
unrenderable elements, trimming coordinates to a certain number of significant
places, and removing vector editor metadata.

%setup -q -n %{name}
sed -e 's/\(svg_regex\|svg_transform\|yocto_css\)\( \|$\)/scour.\1\2/g' >scour
for file in; do
  ed -s ${file} <<EOF


for file in; do
  install -D -p -m 644 ${file} %{buildroot}%{python_sitelib}/scour/${file}
install -D -p -m 755 scour %{buildroot}%{_bindir}/scour
%py_compile %{buildroot}%{python_sitelib}/scour/
%py_compile -O %{buildroot}%{python_sitelib}/scour/
%fdupes %{buildroot}%{python_sitelib}/scour/

rm -rf %{buildroot}

%doc LICENSE README.txt release-notes.html