Skip to content

Commit

Permalink
Synced RPM packaging with OBS.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed May 12, 2016
1 parent 0e8b407 commit d67fad8
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 58 deletions.
85 changes: 85 additions & 0 deletions package/gem2rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ---
# ## used by gem2rpm
# :summary: this is a custom summary
# ## used by gem2rpm
# :description: |-
# this is a custom description
#
# it can be multiline
# ## used by gem2rpm
:license: LGPL-2.1
# ## used by gem2rpm and gem_packages
# :version_suffix: -x_y
# ## used by gem2rpm and gem_packages
# :disable_docs: true
# ## used by gem2rpm
# :disable_automatic_rdoc_dep: true
# ## used by gem2rpm
# :preamble: |-
# BuildRequires: foobar
# Requires: foobar
# ## used by gem2rpm
# :patches:
# foo.patch: -p1
# bar.patch:
# ## used by gem2rpm
:sources:
# - foo.desktop
# - bar.desktop
# :gem_install_args: '....'
# ## used by gem2rpm
# :pre_install: |-
# %if 0%{?use_system_libev}
# export USE_VENDORED_LIBEV="no"
# %endif
# ## used by gem2rpm
# :post_install: |-
# # delete custom files here or do other fancy stuff
# install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse
# ## used by gem2rpm
:testsuite_command: |-
cd %{buildroot}/%{gem_base}/gems//%{mod_full_name}/test
rake test TESTOPTS=-v
# (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test)
# ## used by gem2rpm
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem2rpm
# :scripts:
# :post: |-
# /bin/echo foo
# ## used by gem_packages
# :main:
# :preamble: |-
# Requires: util-linux
# Recommends: pwgen
# :filelist: |-
# /usr/bin/gem2rpm-opensuse
# ## used by gem_packages
# :custom:
# apache:
# :preamble: |-
# Requires: .....
# :filelist: |-
# /etc/apache2/conf.d/passenger.conf
# :summary: Custom summary is optional
# :description: |-
# Custom description is optional
#
# bar
# :post: |-
# /bin/echo foo
#
:main:
:preamble: |-
Provides: ruby-dbus = %{version}
Obsoletes: ruby-dbus < %{version}
:preamble: |-
BuildRequires: %{rubygem rake}
BuildRequires: %{rubygem packaging_rake_tasks}
BuildRequires: %{rubygem nokogiri}
BuildRequires: %{rubygem rspec}
BuildRequires: dbus-1
BuildRequires: netcfg
5 changes: 5 additions & 0 deletions package/rubygem-ruby-dbus.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 16 06:43:05 UTC 2014 - coolo@suse.com

- adapt to new rubygem packaging

-------------------------------------------------------------------
Mon Feb 17 21:41:03 UTC 2014 - mvidner@suse.com

Expand Down
90 changes: 32 additions & 58 deletions package/rubygem-ruby-dbus.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-ruby-dbus
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
Expand All @@ -15,82 +15,56 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

#
# This file was generated with a gem2rpm.yml and not just plain gem2rpm.
# All sections marked as MANUAL, license headers, summaries and descriptions
# can be maintained in that file. Please consult this file before editing any
# of those fields
#

Name: rubygem-ruby-dbus
Version: 0.11.0
Release: 0
%define mod_name ruby-dbus
%define mod_full_name %{mod_name}-%{version}
Provides: ruby-dbus = %{version}
Obsoletes: ruby-dbus < %{version}
#
Group: Development/Languages/Ruby
License: LGPL-2.1
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: rubygems_with_buildroot_patch
BuildRequires: rubygem-rake
BuildRequires: rubygem-packaging_rake_tasks
BuildRequires: rubygem-nokogiri
BuildRequires: rubygem-rspec
# MANUAL
BuildRequires: %{rubygem nokogiri > 1.6}
BuildRequires: %{rubygem packaging_rake_tasks}
BuildRequires: %{rubygem rake}
BuildRequires: %{rubygem rspec}
BuildRequires: dbus-1
BuildRequires: netcfg

%rubygems_requires

Requires: ruby >= 1.9.3
BuildRequires: ruby-devel >= 1.9.3
#
# /MANUAL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{ruby >= 1.9.3}
BuildRequires: %{rubygem gem2rpm}
BuildRequires: ruby-macros >= 5
Url: https://trac.luon.net/ruby-dbus
Source: %{mod_full_name}.gem
#
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: Ruby module for interaction with D-Bus
%description
Ruby module for interaction with D-Bus

%package doc
Summary: RDoc documentation for %{mod_name}
License: LGPL-2.1
Group: Development/Languages/Ruby
Requires: %{name} = %{version}
%description doc
Documentation generated at gem installation time.
Usually in RDoc and RI formats.

%package testsuite
Summary: Test suite for %{mod_name}
Group: Development/Languages/Ruby
Requires: %{name} = %{version}
%description testsuite
Test::Unit or RSpec files, useful for developers.
%description
Pure Ruby module for interaction with D-Bus IPC system.

%prep
%gem_unpack
%gem_build

%build

%install
%gem_install -f
%gem_install \
--doc-files="COPYING README.md" \
-f

# MANUAL
%check
cd %{buildroot}/%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/spec
cd %{buildroot}/%{gem_base}/gems//%{mod_full_name}/test
rake test TESTOPTS=-v
#/ MANUAL

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec

%files doc
%defattr(-,root,root,-)
%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/

%files testsuite
%defattr(-,root,root,-)
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
%gem_packages

%changelog

0 comments on commit d67fad8

Please sign in to comment.