Blob Blame History Raw
# Generated from ruby-dbus-0.7.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name ruby-dbus
%global rubyabi 1.9.1

Summary: Ruby module for interaction with D-Bus
Name: rubygem-%{gem_name}
Version: 0.7.0
Release: 3%{?dist}
Group: Development/Languages
License: LGPLv2+
URL: https://trac.luon.net/ruby-dbus
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
# Accepted by upstream: https://github.com/mvidner/ruby-dbus/pull/18
Patch0: %{gem_name}-unbundle-files-from-activesupport.patch
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
# Obsolete ruby-dbus
Provides: ruby(dbus) = %{version}
Provides: ruby-dbus = %{version}-%{release}
Obsoletes: ruby(dbus) <= 0.3.0
Obsoletes: ruby-dbus < 0.3.0-5

%description
Ruby D-Bus provides an implementation of the D-Bus protocol such that the
D-Bus system can be used in the Ruby programming language.


%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}

%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gem_dir} \
            --force %{SOURCE0}

# fix rpmlint issue with Rakefile (should not have shebang)
sed -i '1d' .%{gem_instdir}/Rakefile

pushd .%{gem_instdir}
%patch0 -p1
popd

%build

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/

%check
pushd .%{gem_instdir}/test
RUBYOPT="-I../lib" ./test_env testrb *_test.rb t[0-9]*.rb
popd

%files
%dir %{gem_instdir}
%doc %{gem_instdir}/COPYING
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README
%doc %{gem_instdir}/NEWS
%doc %{gem_instdir}/VERSION
%doc %{gem_instdir}/doc
%doc %{gem_instdir}/examples
%{gem_instdir}/Rakefile
%{gem_instdir}/%{gem_name}.gemspec
%{gem_instdir}/test

%changelog
* Mon Mar 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.0-3
- Bump release to allow getting 0.7.0-3 into F16 (stupid mistake).

* Tue Feb 28 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.0-2
- Simplified the test running.
- Properly obsolete ruby-dbus.
- Applied the patch that unbundles files from activesupport (accepted by upstream).

* Tue Feb 28 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.0-1
- Initial package