1.12.8
This commit is contained in:
parent
4ffd477a02
commit
9032ed5308
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
/cairo-1.12.3.gem
|
/cairo-1.12.3.gem
|
||||||
/cairo-1.12.4.gem
|
/cairo-1.12.4.gem
|
||||||
/cairo-1.12.6.gem
|
/cairo-1.12.6.gem
|
||||||
|
/cairo-1.12.8.gem
|
||||||
|
@ -1,22 +1,7 @@
|
|||||||
%if 0%{?fedora} <= 16
|
|
||||||
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
|
||||||
%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
||||||
%if 0%{?fedora} < 19
|
|
||||||
%global rubyabi 1.9.1
|
|
||||||
%endif
|
|
||||||
%global header_dir %{ruby_vendorarchdir}
|
%global header_dir %{ruby_vendorarchdir}
|
||||||
%global ruby19 1
|
|
||||||
%else
|
|
||||||
%global rubyabi 1.8
|
|
||||||
%global header_dir %{ruby_sitearch}
|
|
||||||
%global ruby19 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global gem_name cairo
|
%global gem_name cairo
|
||||||
%global gemver 1.12.6
|
%global gemver 1.12.8
|
||||||
#%%global gem_githash af3e3fc059
|
#%%global gem_githash af3e3fc059
|
||||||
|
|
||||||
# Upstream GIT http://github.com/rcairo/
|
# Upstream GIT http://github.com/rcairo/
|
||||||
@ -58,10 +43,8 @@ BuildRequires: dejavu-serif-fonts
|
|||||||
Requires: rubygems
|
Requires: rubygems
|
||||||
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
Provides: rubygem(%{gem_name}) = %{version}-%{release}
|
||||||
|
|
||||||
%if %{ruby19}
|
|
||||||
Obsoletes: ruby-%{gem_name} <= %{version}-%{release}
|
Obsoletes: ruby-%{gem_name} <= %{version}-%{release}
|
||||||
Provides: ruby-%{gem_name} = %{version}-%{release}
|
Provides: ruby-%{gem_name} = %{version}-%{release}
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Ruby bindings for cairo. Cairo is a 2D graphics library with support for
|
Ruby bindings for cairo. Cairo is a 2D graphics library with support for
|
||||||
@ -76,17 +59,6 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
%description doc
|
%description doc
|
||||||
This package contains documentation for %{name}.
|
This package contains documentation for %{name}.
|
||||||
|
|
||||||
%package -n ruby-%{gem_name}
|
|
||||||
# TODO: remove ruby-%%{gem_name} compat package for F-17
|
|
||||||
# TODO: needs dependency check
|
|
||||||
Summary: Non-Gem support package for %{gem_name}
|
|
||||||
Group: Development/Languages
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
Provides: ruby(%{gem_name}) = %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n ruby-%{gem_name}
|
|
||||||
This package provides non-Gem support for %{gem_name}.
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Ruby-cairo development environment
|
Summary: Ruby-cairo development environment
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -96,13 +68,10 @@ Requires: ruby-devel
|
|||||||
# Obsoletes / Provides
|
# Obsoletes / Provides
|
||||||
# ruby(cairo-devel) Provides is for compatibility
|
# ruby(cairo-devel) Provides is for compatibility
|
||||||
#
|
#
|
||||||
# Actually ruby(cairo-dock) provides should not exist -
|
# Actually ruby(cairo-devel) provides should not exist -
|
||||||
# Remove on F-17 and above
|
# Remove on F-17 and above
|
||||||
Obsoletes: ruby-cairo-devel < 1.9
|
Obsoletes: ruby-cairo-devel < 1.9
|
||||||
Provides: ruby-cairo-devel = %{version}-%{release}
|
Provides: ruby-cairo-devel = %{version}-%{release}
|
||||||
%if %{ruby19} < 1
|
|
||||||
Provides: ruby(cairo-devel) = %{version}-%{release}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header files and libraries for building a extension library for the
|
Header files and libraries for building a extension library for the
|
||||||
@ -136,25 +105,11 @@ do
|
|||||||
chmod 0644 $f
|
chmod 0644 $f
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move C extension library to some private directory
|
# Move C extension
|
||||||
pushd ./TMPINSTDIR/%{gem_instdir}
|
|
||||||
%if %{ruby19} < 1
|
|
||||||
grep -rl '%{gem_name}.so' . | \
|
|
||||||
xargs sed -i \
|
|
||||||
-e "\@require@s|'%{gem_name}.so'|'%{gem_name}/%{gem_name}.so'|" \
|
|
||||||
-e '\@require@s|"%{gem_name}.so"|"%{gem_name}/%{gem_name}.so"|'
|
|
||||||
popd
|
|
||||||
mkdir -p ./TMPINSTDIR/%{ruby_sitearch}/%{gem_name}
|
|
||||||
pushd ./TMPINSTDIR
|
|
||||||
mv .%{gem_instdir}/lib/%{gem_name}.so \
|
|
||||||
./%{ruby_sitearch}/%{gem_name}/
|
|
||||||
%else
|
|
||||||
popd
|
|
||||||
pushd ./TMPINSTDIR
|
pushd ./TMPINSTDIR
|
||||||
mkdir -p .%{gem_extdir_mri}/lib
|
mkdir -p .%{gem_extdir_mri}/lib
|
||||||
mv .%{gem_instdir}/lib/%{gem_name}.so \
|
mv .%{gem_instdir}/lib/%{gem_name}.so \
|
||||||
./%{gem_extdir_mri}/lib
|
./%{gem_extdir_mri}/lib
|
||||||
%endif
|
|
||||||
|
|
||||||
# Move header
|
# Move header
|
||||||
mkdir -p ./%{header_dir}
|
mkdir -p ./%{header_dir}
|
||||||
@ -170,75 +125,8 @@ rm -f ./TMPINSTDIR/%{gem_instdir}/{Makefile*,extconf.rb}
|
|||||||
%install
|
%install
|
||||||
cp -a ./TMPINSTDIR/* %{buildroot}/
|
cp -a ./TMPINSTDIR/* %{buildroot}/
|
||||||
|
|
||||||
# The following method is completely copied from rubygem-gettext
|
|
||||||
# spec file
|
|
||||||
#
|
|
||||||
# Create symlinks
|
|
||||||
##
|
|
||||||
## Note that before switching to gem %%{ruby_sitelib}/%%{gem_name}
|
|
||||||
## already existed as a directory, so this cannot be replaced
|
|
||||||
## by symlink (cpio fails)
|
|
||||||
## Similarly, all directories under %%{ruby_sitelib} cannot be
|
|
||||||
## replaced by symlink
|
|
||||||
#
|
|
||||||
|
|
||||||
create_symlink_rec(){
|
|
||||||
|
|
||||||
ORIGBASEDIR=$1
|
|
||||||
TARGETBASEDIR=$2
|
|
||||||
|
|
||||||
## First calculate relative path of ORIGBASEDIR
|
|
||||||
## from TARGETBASEDIR
|
|
||||||
TMPDIR=$TARGETBASEDIR
|
|
||||||
BACKDIR=
|
|
||||||
DOWNDIR=
|
|
||||||
num=0
|
|
||||||
nnum=0
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
num=$((num+1))
|
|
||||||
TMPDIR=$(echo $TMPDIR | sed -e 's|/[^/][^/]*$||')
|
|
||||||
DOWNDIR=$(echo $ORIGBASEDIR | sed -e "s|^$TMPDIR||")
|
|
||||||
if [ x$DOWNDIR != x$ORIGBASEDIR ]
|
|
||||||
then
|
|
||||||
nnum=0
|
|
||||||
while [ $nnum -lt $num ]
|
|
||||||
do
|
|
||||||
BACKDIR="../$BACKDIR"
|
|
||||||
nnum=$((nnum+1))
|
|
||||||
done
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
RELBASEDIR=$( echo $BACKDIR/$DOWNDIR | sed -e 's|//*|/|g' )
|
|
||||||
|
|
||||||
## Next actually create symlink
|
|
||||||
pushd %{buildroot}/$ORIGBASEDIR
|
|
||||||
find . -type f | while read f
|
|
||||||
do
|
|
||||||
DIRNAME=$(dirname $f)
|
|
||||||
BACK2DIR=$(echo $DIRNAME | sed -e 's|/[^/][^/]*|/..|g')
|
|
||||||
mkdir -p %{buildroot}${TARGETBASEDIR}/$DIRNAME
|
|
||||||
LNNAME=$(echo $BACK2DIR/$RELBASEDIR/$f | \
|
|
||||||
sed -e 's|^\./||' | sed -e 's|//|/|g' | \
|
|
||||||
sed -e 's|/\./|/|' )
|
|
||||||
ln -s -f $LNNAME %{buildroot}${TARGETBASEDIR}/$f
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
%if %{ruby19} < 1
|
|
||||||
create_symlink_rec %{gem_instdir}/lib %{ruby_sitelib}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{ruby19}
|
|
||||||
export RUBYLIB=$(pwd)/TMPINSTDIR/%{gem_instdir}:$(pwd)/TMPINSTDIR/%{gem_extdir_mri}/lib
|
export RUBYLIB=$(pwd)/TMPINSTDIR/%{gem_instdir}:$(pwd)/TMPINSTDIR/%{gem_extdir_mri}/lib
|
||||||
%else
|
|
||||||
export RUBYLIB=$(pwd)/TMPINSTDIR/%{ruby_sitearch}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
pushd ./TMPINSTDIR/%{gem_instdir}
|
pushd ./TMPINSTDIR/%{gem_instdir}
|
||||||
# kill unneeded make process
|
# kill unneeded make process
|
||||||
@ -258,20 +146,20 @@ ruby ./test/run-test.rb
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%if %{ruby19} < 1
|
|
||||||
%dir %{ruby_sitearch}/%{gem_name}/
|
|
||||||
%{ruby_sitearch}/%{gem_name}/%{gem_name}.so
|
|
||||||
%else
|
|
||||||
%dir %{gem_extdir_mri}
|
%dir %{gem_extdir_mri}
|
||||||
%dir %{gem_extdir_mri}/lib
|
%dir %{gem_extdir_mri}/lib
|
||||||
%{gem_extdir_mri}/lib/%{gem_name}.so
|
%{gem_extdir_mri}/lib/%{gem_name}.so
|
||||||
%endif
|
|
||||||
%dir %{gem_instdir}/
|
%dir %{gem_instdir}/
|
||||||
%doc %{gem_instdir}/[A-Z]*
|
%doc %{gem_instdir}/[A-Z]*
|
||||||
%exclude %{gem_instdir}/Gemfile
|
%exclude %{gem_instdir}/Gemfile
|
||||||
%exclude %{gem_instdir}/Rakefile
|
%exclude %{gem_instdir}/Rakefile
|
||||||
%{gem_instdir}/lib/
|
%{gem_instdir}/lib/
|
||||||
|
%if 0%{?fedora} >= 20
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%else
|
||||||
%{gem_cache}
|
%{gem_cache}
|
||||||
|
%endif
|
||||||
%{gem_spec}
|
%{gem_spec}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
@ -281,16 +169,13 @@ popd
|
|||||||
%{gem_instdir}/test/
|
%{gem_instdir}/test/
|
||||||
%{gem_docdir}/
|
%{gem_docdir}/
|
||||||
|
|
||||||
%if %{ruby19} < 1
|
|
||||||
%files -n ruby-%{gem_name}
|
|
||||||
%{ruby_sitelib}/%{gem_name}.rb
|
|
||||||
%{ruby_sitelib}/%{gem_name}/
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{header_dir}/rb_cairo.h
|
%{header_dir}/rb_cairo.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 30 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.8-1
|
||||||
|
- 1.12.8
|
||||||
|
|
||||||
* Tue Aug 6 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.6-1
|
* Tue Aug 6 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.12.6-1
|
||||||
- 1.12.6
|
- 1.12.6
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user