Blame rubygem-activestorage.spec

2f4a55d
# Generated from activestorage-0.1.gem by gem2rpm -*- rpm-spec -*-
2f4a55d
%global gem_name activestorage
2f4a55d
2f36adc
# Circular dependency with rubygem-railties.
27767b3
%bcond_without bootstrap
2f36adc
2f36adc
# FFmpeg can be used in tests, but is not available in Fedora
2f36adc
%bcond_with ffmpeg
2f36adc
2f4a55d
Name: rubygem-%{gem_name}
27767b3
Version: 6.0.3.4
6316947
Release: 1%{?dist}
2f36adc
Summary: Local and cloud file storage framework
2f4a55d
License: MIT
2f36adc
URL: http://rubyonrails.org
6316947
Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{?prerelease}.gem
6316947
# The gem doesn't ship with the test suite.
6316947
# You may check it out like so
6316947
# git clone https://github.com/rails/rails.git
27767b3
# cd rails/activestorage && git archive -v -o activestorage-6.0.3.4-tests.txz v6.0.3.4 test/
6316947
Source1: %{gem_name}-%{version}%{?prerelease}-tests.txz
e644f89
# The tools are needed for the test suite, are however unpackaged in gem file.
e644f89
# You may check it out like so
e644f89
# git clone http://github.com/rails/rails.git --no-checkout
27767b3
# cd rails && git archive -v -o rails-6.0.3.4-tools.txz v6.0.3.4 tools/
e644f89
Source2: rails-%{version}%{?prerelease}-tools.txz
6316947
2f4a55d
BuildRequires: ruby(release)
2f4a55d
BuildRequires: rubygems-devel
2f36adc
BuildRequires: ruby
6316947
%if %{without bootstrap}
2f36adc
BuildRequires: rubygem(actionpack) = %{version}
2f36adc
BuildRequires: rubygem(activerecord) = %{version}
2f36adc
BuildRequires: rubygem(activejob) = %{version}
2f36adc
BuildRequires: rubygem(railties) = %{version}
2f36adc
BuildRequires: rubygem(rails) = %{version}
2f36adc
BuildRequires: rubygem(sprockets-rails)
2f36adc
BuildRequires: rubygem(connection_pool)
e644f89
BuildRequires: rubygem(image_processing)
2f4a55d
BuildRequires: rubygem(sqlite3)
2f36adc
# FFmpeg is not available in Fedora
2f36adc
%{?with_ffmpeg:BuildRequires: %{_bindir}/ffmpeg}
2f36adc
BuildRequires: %{_bindir}/mutool
2f36adc
BuildRequires: %{_bindir}/pdftoppm
2f36adc
%endif
2f36adc
# Used for creating file previews
2f36adc
Suggests: %{_bindir}/mutool
2f36adc
Suggests: %{_bindir}/pdftoppm
2f36adc
Suggests: %{_bindir}/ffmpeg
2f36adc
2f4a55d
BuildArch: noarch
2f4a55d
2f4a55d
%description
2f4a55d
Attach cloud and local files in Rails applications.
2f4a55d
2f4a55d
%package doc
2f4a55d
Summary: Documentation for %{name}
2f4a55d
Requires: %{name} = %{version}-%{release}
2f4a55d
BuildArch: noarch
2f4a55d
2f4a55d
%description doc
2f4a55d
Documentation for %{name}.
2f4a55d
2f4a55d
%prep
e644f89
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
2f4a55d
2f4a55d
%build
6316947
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
2f4a55d
%gem_install
2f4a55d
2f4a55d
%install
2f4a55d
mkdir -p %{buildroot}%{gem_dir}
2f4a55d
cp -a .%{gem_dir}/* \
2f4a55d
        %{buildroot}%{gem_dir}/
2f4a55d
2f4a55d
%check
6316947
%if %{without bootstrap}
2f36adc
# fake RAILS_FRAMEWORK_ROOT
6316947
ln -s %{gem_dir}/specifications/rails-%{version}%{?prerelease}.gemspec .%{gem_dir}/gems/rails.gemspec
6316947
ln -s %{gem_dir}/gems/railties-%{version}%{?prerelease}/ .%{gem_dir}/gems/railties
6316947
ln -s %{gem_dir}/gems/activerecord-%{version}%{?prerelease}/ .%{gem_dir}/gems/activerecord
6316947
ln -s %{gem_dir}/gems/activejob-%{version}%{?prerelease}/ .%{gem_dir}/gems/activejob
6316947
ln -s %{gem_dir}/gems/actionpack-%{version}%{?prerelease}/ .%{gem_dir}/gems/actionpack
6316947
ln -s %{gem_dir}/gems/activesupport-%{version}%{?prerelease}/ .%{gem_dir}/gems/activesupport
2f36adc
ln -s ${PWD}%{gem_instdir} .%{gem_dir}/gems/%{gem_name}
2f36adc
2f36adc
pushd .%{gem_dir}/gems/%{gem_name}
e644f89
ln -s %{_builddir}/tools ..
e644f89
# Copy the tests into place.
e644f89
cp -a %{_builddir}/test .
2f36adc
2f36adc
touch Gemfile
2f36adc
echo 'gem "actionpack"' >> ../Gemfile
2f36adc
echo 'gem "activerecord"' >> ../Gemfile
2f36adc
echo 'gem "activejob"' >> ../Gemfile
2f36adc
echo 'gem "sprockets-rails"' >> ../Gemfile
e644f89
echo 'gem "image_processing"' >> ../Gemfile
2f36adc
echo 'gem "rails"' >> ../Gemfile
2f36adc
echo 'gem "sqlite3"' >> ../Gemfile
2f36adc
2f36adc
# Disable tests that require FFmpeg
6316947
%if %{without ffmpeg}
2f36adc
mv test/analyzer/video_analyzer_test.rb{,.disable}
2f36adc
for f in \
2f36adc
  models/preview \
2f36adc
  models/representation \
2f36adc
  previewer/video_previewer
2f36adc
do
2f36adc
sed -i '/^  test ".* an MP4 video" do$/,/^  end$/ s/^/#/g' \
2f36adc
  test/${f}_test.rb
2f36adc
done
2f36adc
%endif
2f36adc
2f36adc
export RUBYOPT="-I${PWD}/../%{gem_name}/lib"
2f36adc
export PATH="${PWD}/../%{gem_name}/exe:$PATH"
2f36adc
export BUNDLE_GEMFILE=${PWD}/../Gemfile
2f36adc
2f36adc
ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
2f4a55d
popd
2f36adc
%endif
2f4a55d
2f4a55d
%files
2f4a55d
%dir %{gem_instdir}
2f4a55d
%license %{gem_instdir}/MIT-LICENSE
2f36adc
%{gem_instdir}/app
2f36adc
%{gem_instdir}/config
2f36adc
%{gem_instdir}/db
2f4a55d
%{gem_libdir}
2f4a55d
%exclude %{gem_cache}
2f4a55d
%{gem_spec}
2f4a55d
2f4a55d
%files doc
2f4a55d
%doc %{gem_docdir}
2f36adc
%doc %{gem_instdir}/CHANGELOG.md
2f4a55d
%doc %{gem_instdir}/README.md
2f4a55d
2f4a55d
%changelog
27767b3
* Thu Oct  8 11:56:48 CEST 2020 Pavel Valena <pvalena@redhat.com> - 6.0.3.4-1
27767b3
- Update to activestorage 6.0.3.4.
27767b3
  Resolves: rhbz#1877544
27767b3
e644f89
* Tue Sep 22 01:10:44 CEST 2020 Pavel Valena <pvalena@redhat.com> - 6.0.3.3-1
e644f89
- Update to activestorage 6.0.3.3.
e644f89
  Resolves: rhbz#1877544
e644f89
6316947
* Mon Aug 03 07:01:37 GMT 2020 Pavel Valena <pvalena@redhat.com> - 6.0.3.1-1
6316947
- Update to ActiveStorage 6.0.3.1.
6316947
  Resolves: rhbz#1742796
6316947
2258285
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-6
2258285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2258285
3ce0c55
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-5
3ce0c55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3ce0c55
f8eb2df
* Fri Dec 20 2019 Tom Callaway <spot@fedoraproject.org> - 5.2.3-4
f8eb2df
- rebuild for new rubygem-connection_pool
f8eb2df
917e0b5
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.3-3
917e0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
917e0b5
d89a868
* Thu Mar 28 2019 Pavel Valena <pvalena@redhat.com> - 5.2.3-2
d89a868
- Enable tests.
d89a868
0dfcc28
* Thu Mar 28 2019 Pavel Valena <pvalena@redhat.com> - 5.2.3-1
0dfcc28
- Update to Active Storage 5.2.3.
0dfcc28
02f250c
* Mon Mar 18 2019 Pavel Valena <pvalena@redhat.com> - 5.2.2.1-2
02f250c
- Enable tests.
02f250c
c1f5b8a
* Thu Mar 14 2019 Pavel Valena <pvalena@redhat.com> - 5.2.2.1-1
c1f5b8a
- Update to Active Storage 5.2.2.1.
c1f5b8a
04ac662
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.2-3
04ac662
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
04ac662
48b6335
* Wed Dec 05 2018 Pavel Valena <pvalena@redhat.com> - 5.2.2-2
91e0af4
- Update to Active Storage 5.2.2.
91e0af4
c7b36d1
* Thu Aug 09 2018 Pavel Valena <pvalena@redhat.com> - 5.2.1-2
c7b36d1
- Enable tests.
c7b36d1
d827dee
* Wed Aug 08 2018 Pavel Valena <pvalena@redhat.com> - 5.2.1-1
d827dee
- Update to Active Storage 5.2.1.
d827dee
849c224
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
849c224
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
849c224
405cee6
* Tue May 29 2018 Pavel Valena <pvalena@redhat.com> - 5.2.0-2
405cee6
- Enable tests.
405cee6
2f36adc
* Wed May 02 2018 Pavel Valena <pvalena@redhat.com> - 5.2.0-1
2f36adc
- Update to Active Storage 5.2.0.
2f36adc
- Moved to Rails repository.
2f36adc
be00024
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-2
be00024
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
be00024
2f4a55d
* Mon Aug 28 2017 Vít Ondruch <vondruch@redhat.com> - 0.1-1
2f4a55d
- Initial package