File spectacle.spec of Package spectacle
#
# spec file for package spectacle
#
# Copyright (c) 2014 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/
#
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: spectacle
Summary: RPM Spec file generator and management tool
Version: 0.30
Release: 1
Group: Development/Tools
License: GPL-2.0+
BuildArch: noarch
Url: https://meego.gitorious.org/meego-developer-tools/spectacle
Source0: spectacle-%{version}.tar.gz
Source1: autospectacle.pl
Source100: spectacle.yaml
Requires: python-yaml
Requires: python-urlgrabber
Requires: python-cheetah
Requires: perl
BuildRequires: python-devel
BuildRequires: python-cheetah
BuildRequires: fdupes
%description
A tool for managing and creating RPM spec files
%prep
%setup -q -n src
%build
make tmpls
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --root=%{buildroot} -O1
make install-data DESTDIR=${RPM_BUILD_ROOT}
install -m 0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_bindir}
grep -rl '^#!' ${RPM_BUILD_ROOT}%{python_sitelib} | xargs chmod 0755
%fdupes ${RPM_BUILD_ROOT}%{python_sitelib}
%files
%defattr(-,root,root,-)
%doc README.md AUTHORS COPYING TODO
%doc examples/
%dir %{_datadir}/spectacle
%{_datadir}/spectacle/*
%{_bindir}/*
%{python_sitelib}/*
%changelog