rubygem-activerecord/rubygem-activerecord.spec

87 lines
2.8 KiB
RPMSpec
Raw Normal View History

2020-08-28 16:00:02 +08:00
%global gem_name activerecord
Name: rubygem-%{gem_name}
Epoch: 1
2022-03-29 15:23:39 +08:00
Version: 6.1.4.1
Release: 1
2020-08-28 16:00:02 +08:00
Summary: Object-relational mapper framework (part of Rails)
License: MIT
URL: http://rubyonrails.org
2022-03-29 15:23:39 +08:00
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# The gem doesn't ship with the test suite.
# You may check it out like so
# git clone http://github.com/rails/rails.git
# cd rails/activerecord && git archive -v -o activerecord-6.1.4.1-tests.txz v6.1.4.1 test/
Source1: activerecord-%{version}-tests.txz
# The tools are needed for the test suite, are however unpackaged in gem file.
# You may check it out like so
# git clone http://github.com/rails/rails.git --no-checkout
# cd rails && git archive -v -o rails-6.1.4.1-tools.txz v6.1.4.1 tools/
Source2: rails-%{version}-tools.txz
2021-03-15 11:44:32 +08:00
2020-08-28 16:00:02 +08:00
Suggests: %{_bindir}/sqlite3
BuildRequires: rubygems-devel rubygem(bcrypt) rubygem(activesupport) = %{version}
BuildRequires: rubygem(activemodel) = %{version} rubygem(builder) rubygem(sqlite3)
2022-03-29 15:23:39 +08:00
BuildRequires: rubygem(actionpack) = %{version} rubygem(pg) rubygem(mocha) rubygem(rack)
2020-08-28 16:00:02 +08:00
BuildArch: noarch
%description
Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM. It ties database
tables and classes together for business objects, like Customer or
Subscription, that can find, save, and destroy themselves without resorting to
manual SQL.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
2022-03-29 15:23:39 +08:00
%setup -q -n %{gem_name}-%{version} -b1 -b2
2020-08-28 16:00:02 +08:00
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
2022-03-29 15:23:39 +08:00
ln -s %{_builddir}/tools ..
mv %{_builddir}/test .
sed -i '/^\s*def test_generates_absolute_path_with_given_root$/ a skip' \
test/cases/tasks/sqlite_rake_test.rb
sed -i '/require .byebug./ s/^/#/g' test/cases/base_prevent_writes_test.rb
mv test/cases/adapters/sqlite3/explain_test.rb{,.disable}
ruby -rpg -Itest:lib -e 'Dir.glob("./test/cases/**/*_test.rb").sort.each{ |f| require f }'
2020-08-28 16:00:02 +08:00
popd
%files
%dir %{gem_instdir}
%license %{gem_instdir}/MIT-LICENSE
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/examples
%changelog
2022-06-17 06:27:58 +00:00
* Tue Mar 29 2022 liyanan <liyanan32@huawei.com> - 6.1.4.1-1
2022-03-29 15:23:39 +08:00
- update to 6.1.4.1
2021-03-15 11:44:32 +08:00
* Tue Mar 16 2021 wangyue <wangyue92@huawei.com> - 5.2.4.4-2
- fix CVE-2021-22880
* Mon Feb 8 2021 sunguoshuai<sunguoshuai@huawei.com>- 5.2.4.4-1
- Upgrade to 5.2.4.4
2020-08-28 16:00:02 +08:00
* Wed Aug 12 2020 chengzihan <chengzihan2@huawei.com> - 5.2.3-1
- Package init