valtri pushed to rubygem-uuid (epel7). "Unretire (#1177805)."

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Mar 24 23:04:39 UTC 2015


>From 20a3b176039630e72496dcba251d9d9e4e598cd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri at civ.zcu.cz>
Date: Tue, 17 Mar 2015 15:50:16 +0100
Subject: Unretire (#1177805).


diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bab9ae6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/uuid-2.3.7.gem
diff --git a/dead.package b/dead.package
deleted file mode 100644
index 5226705..0000000
--- a/dead.package
+++ /dev/null
@@ -1 +0,0 @@
-Package retired, since its dependencies were never satisfied and package was never functional.
diff --git a/rubygem-uuid-tool.patch b/rubygem-uuid-tool.patch
new file mode 100644
index 0000000..46a9b1e
--- /dev/null
+++ b/rubygem-uuid-tool.patch
@@ -0,0 +1,78 @@
+commit 8fe1f949f0538a87f5b4f74de0008306d2f70c65
+Author: Michael Witrant <mike at lepton.fr>
+Date:   Sat Mar 3 10:50:12 2012 +0100
+
+    Reverted executable loss
+
+diff --git a/bin/uuid b/bin/uuid
+index 3e9ea85..b859696 100755
+--- a/bin/uuid
++++ b/bin/uuid
+@@ -1,16 +1,55 @@
+ #!/usr/bin/env ruby
+-#
+-# This file was generated by Bundler.
+-#
+-# The application 'uuid' is installed as part of a gem, and
+-# this file is here to facilitate running it.
+-#
++require "uuid"
++require "optparse"
+ 
+-require 'pathname'
+-ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
+-  Pathname.new(__FILE__).realpath)
++address = nil 
++count = 1
++format = :default
++server = false
+ 
+-require 'rubygems'
+-require 'bundler/setup'
++opts = OptionParser.new("", 24, '  ') do |opts|
++  opts.banner = "Usage: #{File.basename($0)} [options]"
+ 
+-load Gem.bin_path('uuid', 'uuid')
++  opts.separator "\nOptions:"
++  opts.on("-s", "--socket {HOST:PORT|PATH}",
++          "communicate on HOST:PORT or PATH (default: #{UUID::SOCKET_NAME})") do |value|
++    address = value
++  end
++
++  opts.on("-S", "--server", "run as a server") do |value|
++    server = value ? true : false
++  end
++
++  opts.on("-F", "--format {FORMAT}", "UUID format (client only)") do |value|
++    format = value.to_sym
++  end
++
++  opts.on("-C", "--count {COUNT}", "returns give number of UUIDs") do |value|
++    count = value.to_i
++  end
++
++  opts.on("-h", "--help", "Show this message") do
++    puts opts.to_s.gsub(/^.*DEPRECATED.*$/s, '')
++    exit
++  end
++
++  opts.on("-v", "--version", "Show version") do
++    puts "UUID v#{UUID::VERSION}"
++    exit
++  end
++
++  opts.parse! ARGV
++end
++
++
++if server
++  $stdout << "Starting UUID server on #{address}\n"
++  UUID::Server.new.listen(address || UUID::SOCKET_NAME)
++else
++  UUID.server = address if address
++  $stdout << UUID.generate(format)
++  (count - 1).times do
++    $stdout.putc "\n"
++    $stdout << UUID.generate(format)
++  end
++end
diff --git a/rubygem-uuid.spec b/rubygem-uuid.spec
new file mode 100644
index 0000000..7868d5f
--- /dev/null
+++ b/rubygem-uuid.spec
@@ -0,0 +1,105 @@
+%global gem_name uuid
+
+Name:           rubygem-%{gem_name}
+Version:        2.3.7
+Release:        1%{?dist}
+Summary:        UUID generator based on RFC 4122
+
+Group:          Development/Languages
+License:        MIT or CC-BY-SA
+URL:            http://github.com/assaf/uuid
+Source0:        https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# https://github.com/assaf/uuid/pull/39
+Patch0:         %{name}-tool.patch
+
+BuildArch:      noarch
+BuildRequires:  rubygems-devel
+BuildRequires:  rubygem(macaddr)
+BuildRequires:  rubygem(mocha)
+BuildRequires:  rubygem(test-unit)
+%if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7
+Requires:       ruby(release)
+Requires:       ruby(rubygems)
+Requires:       rubygem(macaddr) >= 1.0
+Requires:       rubygem(macaddr) < 2
+Provides:       rubygem(%{gem_name}) = %{version}
+%endif
+
+%description
+UUID generator for producing universally unique identifiers based on RFC 4122
+(http://www.ietf.org/rfc/rfc4122.txt).
+
+
+%package doc
+Summary:        Documentation for %{name}
+Group:          Documentation
+BuildArch:      noarch
+Requires:       %{name} = %{version}-%{release}
+
+%description doc
+Documentation for %{name}.
+
+
+%prep
+gem unpack %{SOURCE0}
+
+%setup -q -D -T -n  %{gem_name}-%{version}
+%patch0 -p1
+sed -i -e '1s,.*,#!/usr/bin/ruby,' bin/uuid
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+
+%build
+gem build %{gem_name}.gemspec
+
+%gem_install
+
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+mkdir -p %{buildroot}%{_bindir}
+# rename to fix conflict with uuid package
+mv .%{_bindir}/uuid \
+        %{buildroot}%{_bindir}/uuid.rb
+
+find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
+
+
+%check
+pushd .%{gem_instdir}
+# https://github.com/assaf/uuid/issues/43
+sed -i -e "s,'mocha','mocha/setup'," test/*.rb
+ruby -Ilib:test -e 'Dir.glob "./test/*.rb", &method(:require)'
+popd
+
+
+%files
+%dir %{gem_instdir}/
+%dir %{gem_instdir}/bin/
+%license %{gem_instdir}/MIT-LICENSE
+%{_bindir}/uuid.rb
+%{gem_instdir}/bin/uuid
+%{gem_libdir}/
+%{gem_spec}
+%{gem_instdir}/%{gem_name}.gemspec
+%exclude %{gem_instdir}/bin/rake
+%exclude %{gem_instdir}/bin/yard
+%exclude %{gem_instdir}/bin/yardoc
+%exclude %{gem_instdir}/bin/yri
+%exclude %{gem_instdir}/test/
+%exclude %{gem_cache}
+%exclude %{gem_instdir}/Rakefile
+
+%files doc
+%doc %{gem_docdir}/
+%doc %{gem_instdir}/CHANGELOG
+%doc %{gem_instdir}/README.rdoc
+
+
+%changelog
+* Sun Feb 08 2015 František Dvořák <valtri at civ.zcu.cz> - 2.3.7-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..22b905a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+749430cac002a05e99d7ae0fb835f78a  uuid-2.3.7.gem
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/rubygem-uuid.git/commit/?h=epel7&id=20a3b176039630e72496dcba251d9d9e4e598cd9

--
You received this message due to your preference settings at
https://apps.fedoraproject.org/notifications//fmnscmcommits.id.fedoraproject.org/email/29390


More information about the scm-commits mailing list