136 lines
2.9 KiB
RPMSpec
136 lines
2.9 KiB
RPMSpec
%global gem_name opengl
|
|
|
|
# examples/OrangeBook/: BSD
|
|
# examples/NeHe: KILLED (license unclear)
|
|
# examples/RedBook/ SGI = MIT
|
|
# examples/misc/OGLBench.rb: GPL+ or Artistic
|
|
# examples/misc/fbo_test.rb ??? KILLED
|
|
# examples/misc/trislam.rb: GPL+ or Artistic
|
|
|
|
Name: rubygem-%{gem_name}
|
|
Version: 0.8.0
|
|
Release: 2%{?dist}
|
|
|
|
Summary: An OpenGL wrapper for Ruby
|
|
Group: Development/Languages
|
|
License: MIT
|
|
URL: https://github.com/drbrain/opengl
|
|
# Source0: https://rubygems.org/gems/%%{gem_name}-%%{version}.gem
|
|
# The above gem file contains files with unclear license,
|
|
# we use a regenerated gem as a Source0 with such files
|
|
# removed.
|
|
# Source0 is generated using Source1.
|
|
Source0: %{gem_name}-%{version}-clean.gem
|
|
Source1: create-clean-opengl-gem.sh
|
|
# http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
|
|
Source2: GPLv1.rubygem_opengl
|
|
|
|
# MRI (CRuby) only
|
|
BuildRequires: ruby-devel
|
|
BuildRequires: rubygems-devel
|
|
BuildRequires: libGL-devel
|
|
BuildRequires: libGLU-devel
|
|
BuildRequires: freeglut-devel
|
|
Requires: ruby
|
|
Requires: ruby(rubygems)
|
|
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
|
|
|
%description
|
|
An OpenGL wrapper for Ruby. ruby-opengl contains bindings for OpenGL and the
|
|
GLU and GLUT libraries.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for %{name}
|
|
Group: Documentation
|
|
Requires: %{name} = %{version}-%{release}
|
|
License: MIT and BSD and (GPL+ or Artistic)
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{name}
|
|
|
|
%prep
|
|
%setup -q -c -T
|
|
|
|
# Gem repack
|
|
TOPDIR=$(pwd)
|
|
mkdir tmpunpackdir
|
|
pushd tmpunpackdir
|
|
|
|
gem unpack %{SOURCE0}
|
|
cd %{gem_name}-%{version}-clean
|
|
gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
|
|
|
|
find examples/ -type f -print0 | xargs --null file | \
|
|
grep CRLF | sed -e 's|:.*$||' | \
|
|
while read f
|
|
do
|
|
sed -i -e 's|\r||' $f
|
|
done
|
|
|
|
gem build %{gem_name}.gemspec
|
|
mv %{gem_name}-%{version}.gem $TOPDIR
|
|
|
|
popd
|
|
rm -rf tmpunpackdir
|
|
|
|
%build
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}/
|
|
cp -pa .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
install -cpm 644 %{SOURCE2} \
|
|
%{buildroot}%{gem_instdir}/examples/misc/
|
|
|
|
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
|
|
mv %{buildroot}%{gem_instdir}/lib/%{gem_name}/ \
|
|
%{buildroot}%{gem_extdir_mri}/lib/
|
|
|
|
# cleanups
|
|
pushd %{buildroot}%{gem_instdir}
|
|
rm -rf \
|
|
.autotest .gemtest .gitignore \
|
|
Manifest.txt \
|
|
Rakefile* \
|
|
docs/build_install.txt \
|
|
ext/ \
|
|
test/
|
|
|
|
find examples/ utils/ website/ -type f -perm /100 \
|
|
-exec chmod ugo-x {} \;
|
|
|
|
popd
|
|
|
|
rm -f %{buildroot}%{gem_extdir_mri}/lib/opengl/test_case.rb
|
|
|
|
%check
|
|
# Need X, disabling
|
|
exit 0
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%doc %{gem_instdir}/[A-Z]*
|
|
|
|
%{gem_libdir}/
|
|
%{gem_extdir_mri}/
|
|
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%doc %{gem_instdir}/docs/
|
|
%doc %{gem_instdir}/examples/
|
|
%doc %{gem_instdir}/utils/
|
|
%doc %{gem_instdir}/website/
|
|
|
|
%changelog
|
|
* Wed Oct 30 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.8.0-2
|
|
- Misc fixes with review (bug 1024168)
|
|
|
|
* Tue Oct 29 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.8.0-1
|
|
- Initial package
|