File all-the-others.spec of Package all-the-others
#
# spec file for package
#
# Copyright (c) 2012 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/
#
Name: all-the-others
Version: 1.0
Release: 0
License: MIT
Summary: Build tons of gems
Group: Test/all
BuildRequires: rubygem(gem2rpm) ruby-macros
BuildRequires: rubygem(rdoc) > 3.10
#!BuildIgnore: rpmlint-Factory
#!BuildIgnore: post-build-checks
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
%prep
%build
for i in $RPM_SOURCE_DIR/*.gem; do
rm -f current.spec
echo '---' > $RPM_SOURCE_DIR/gem2rpm.yml
echo ':license: MIT' >> $RPM_SOURCE_DIR/gem2rpm.yml
nname=$(basename $i .gem | sed -e 's,\.\([^-]*\)$,_\1,g' -e 's,\.\([^-]*\)$,_\1,g' -e 's,\.\([^-]*\)$,_\1,g' )
suffix=$(basename $i .gem | sed -e 's,^.*-\([^-]*\)$,\1,; s,\.,_,g')
echo ":version_suffix: '-$suffix'" >> $RPM_SOURCE_DIR/gem2rpm.yml
if gem2rpm --config $RPM_SOURCE_DIR/gem2rpm.yml -t opensuse -l $i -o current.spec ; then
sed -i -e "s,^Release:.*,Release: %{release}," current.spec
rpmbuild -ba current.spec || true
fi
done
%install
%changelog