Skip to content

Commit 110e2e4

Browse files
authored
Added package rubygem-scanf to SPECS-EXTENDED (microsoft#11356)
1 parent a8d9461 commit 110e2e4

File tree

10 files changed

+540
-1
lines changed

10 files changed

+540
-1
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,7 @@
19701970
"rubygem-rspec-expectations",
19711971
"rubygem-rspec-mocks",
19721972
"rubygem-rspec-support",
1973+
"rubygem-scanf",
19731974
"rubygem-sys-filesystem",
19741975
"rubygem-thread_order",
19751976
"rusers",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions
5+
are met:
6+
1. Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22+
SUCH DAMAGE.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
this is 33 a fun
2+
little input file
3+
4+
with
5+
6+
characters
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Signatures": {
3+
"LICENSE.txt": "a5e3042dacb53eebda91f3b1caefbfec8307711df8c4ed1ed20e4e97c43307a4",
4+
"data.txt": "9df04e450b0904c7249f9e4025861aeac7e551d0adfad9864b7df1249b26ed12",
5+
"scanf-1.0.0.gem": "533db7f7e5acafea1a145d6c5329cef667a58fbcb7d64379a808ff1199ee1b00",
6+
"test_scanf.rb": "6634f40ebc8be0cd9a49d44a30b3b88ba8d5c3949bc2f289d343001679f0e313",
7+
"test_scanfblocks.rb": "5f814484553f435f2ff5db42a0f1c28072f7dbcac80b68d7719185fa2d966636",
8+
"test_scanfio.rb": "39103477fa0f1942adf0e3532490d90c13deb5bb0a56657ac84c649b67ed78a5"
9+
}
10+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
%global gem_name scanf
2+
3+
Name: rubygem-%{gem_name}
4+
Version: 1.0.0
5+
Release: 1%{?dist}
6+
Summary: A Ruby implementation of the C function scanf(3)
7+
# Automatically converted from old format: BSD - review is highly recommended.
8+
License: LicenseRef-Callaway-BSD
9+
Vendor: Microsoft Corporation
10+
Distribution: Azure Linux
11+
URL: https://github.com/ruby/scanf
12+
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
13+
# License is not included in the gem, copied from git
14+
Source1: LICENSE.txt
15+
# Tests are not included in the gem, copied from git
16+
Source2: data.txt
17+
Source3: test_scanf.rb
18+
Source4: test_scanfblocks.rb
19+
Source5: test_scanfio.rb
20+
BuildRequires: ruby(release)
21+
BuildRequires: rubygems-devel
22+
BuildRequires: ruby >= 2.3.0
23+
# Required for %check
24+
BuildRequires: rubygem(test-unit)
25+
BuildArch: noarch
26+
27+
%description
28+
A Ruby implementation of the C function scanf(3).
29+
30+
31+
%package doc
32+
Summary: Documentation for %{name}
33+
Requires: %{name} = %{version}-%{release}
34+
BuildArch: noarch
35+
36+
%description doc
37+
Documentation for %{name}.
38+
39+
%prep
40+
%setup -q -n %{gem_name}-%{version}
41+
cp %{SOURCE1} LICENSE.txt
42+
43+
%build
44+
# Create the gem as gem install only works on a gem file
45+
gem build ../%{gem_name}-%{version}.gemspec
46+
47+
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
48+
# by default, so that we can move it into the buildroot in %%install
49+
%gem_install
50+
51+
%install
52+
mkdir -p %{buildroot}%{gem_dir}
53+
cp -a .%{gem_dir}/* \
54+
%{buildroot}%{gem_dir}/
55+
56+
57+
58+
%check
59+
ruby -I.%{gem_instdir}/lib %{SOURCE3} %{SOURCE4} %{SOURCE5}
60+
61+
%files
62+
%license LICENSE.txt
63+
%dir %{gem_instdir}
64+
%{gem_libdir}
65+
%exclude %{gem_cache}
66+
%{gem_spec}
67+
68+
%files doc
69+
%doc %{gem_docdir}
70+
71+
72+
%changelog
73+
* Fri Dec 06 2024 Sumit Jena <[email protected]> - 1.0.0-1
74+
- Initial Azure Linux import from Fedora 41 (license: MIT).
75+
- License verified

0 commit comments

Comments
 (0)