ruby-common/ruby-common.spec

71 lines
2.4 KiB
RPMSpec

#
# spec file for package ruby-common
#
# 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/
#
Name: ruby-common
Version: 3
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source1: gem_build_cleanup
Source3: ruby.common-macros
Source4: rubygems.attr
Source5: rubygemsdeps.rb
Source6: gem_install.sh
Source7: generate_buildrequires.sh
Summary: Collection of scripts and macros for ruby packaging
License: MIT
Group: Development/Languages/Ruby
Requires: /usr/bin/getopt
Requires: fdupes
Requires: ruby-devel
Requires: rubygems > 1.8
BuildArch: noarch
Provides: ruby-macros = %{version}
%if 0%{?suse_version} < 1140
# we need a patched rpm
Requires: rpm-with-ruby-provide-hook
%endif
#!BuildIgnore: ruby-common
%description
This package is needed for (generated) ruby gems. It provides hooks for
automatic rpm provides and requires and macros that gem2rpm uses.
%prep
%build
%install
# we need to make sure it overwrites older macro versions and rpm sorts alphabetically
install -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/rpm/macros.suse-ruby
install -D -m 0644 %{S:4} $RPM_BUILD_ROOT/usr/lib/rpm/fileattrs/rubygems.attr
install -D -m 0755 %{S:5} $RPM_BUILD_ROOT/usr/lib/rpm/rubygemsdeps.rb
install -D -m 0755 %{S:6} $RPM_BUILD_ROOT/usr/lib/rpm/gem_install.sh
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT/usr/lib/rpm/gem_build_cleanup.sh
install -D -m 0755 %{S:7} $RPM_BUILD_ROOT/usr/lib/rpm/generate_buildrequires.sh
%files
%defattr(-,root,root)
/etc/rpm/macros.suse-ruby
%dir /usr/lib/rpm/fileattrs
/usr/lib/rpm/fileattrs/rubygems.attr
/usr/lib/rpm/rubygemsdeps.rb
/usr/lib/rpm/gem_install.sh
/usr/lib/rpm/gem_build_cleanup.sh
/usr/lib/rpm/generate_buildrequires.sh
%changelog