180 lines
4.3 KiB
RPMSpec
180 lines
4.3 KiB
RPMSpec
# Generated from htmlentities-4.0.0.gem by gem2rpm -*- rpm-spec -*-
|
|
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
|
|
|
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
%global gemname htmlentities
|
|
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
|
|
|
%global rubyabi 1.8
|
|
|
|
# Some functions removed on 4.2.4. Please don't upgrade this rpm
|
|
# to 4.3.0+ on F-14-
|
|
|
|
Summary: A module for encoding and decoding (X)HTML entities
|
|
Name: rubygem-%{gemname}
|
|
Version: 4.3.0
|
|
Release: 1%{?dist}
|
|
Group: Development/Languages
|
|
License: MIT
|
|
URL: http://htmlentities.rubyforge.org/
|
|
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
|
|
|
|
BuildRequires: ruby(abi) = %{rubyabi}
|
|
BuildRequires: ruby(rubygems)
|
|
Requires: ruby(abi) = %{rubyabi}
|
|
Requires: ruby(rubygems)
|
|
BuildArch: noarch
|
|
Provides: rubygem(%{gemname}) = %{version}-%{release}
|
|
|
|
%description
|
|
HTMLEntities is a simple library to facilitate encoding and
|
|
decoding of named (ý and so on) or numerical ({ or Ī)
|
|
entities in HTML and XHTML documents.
|
|
|
|
%package -n ruby-%{gemname}
|
|
Summary: Non-Gem support for %{gemname}
|
|
Group: Development/Languages
|
|
Requires: %{name} = %{version}-%{release}
|
|
Provides: ruby(%{gemname}) = %{version}-%{release}
|
|
|
|
%description -n ruby-%{gemname}
|
|
This package provides non-Gem support for %{gemname}.
|
|
|
|
%prep
|
|
# First install rubygems under %%_builddir to execute some
|
|
# tests
|
|
%setup -q -c -T
|
|
|
|
mkdir -p ./%{geminstdir}
|
|
gem install \
|
|
-V \
|
|
--local --install-dir ./%{gemdir} \
|
|
--force \
|
|
--rdoc \
|
|
%{SOURCE0}
|
|
|
|
%build
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
mkdir -p %{buildroot}%{gemdir}
|
|
cp -a ./%{gemdir}/* %{buildroot}%{gemdir}/
|
|
|
|
# Cleanups
|
|
rm -f %{buildroot}%{geminstdir}/setup.rb
|
|
|
|
# Create symlinks for ruby-%%{gemname}
|
|
# Copied from rubygem-gettext.spec
|
|
|
|
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
|
|
|
|
}
|
|
|
|
create_symlink_rec %{geminstdir}/lib %{ruby_sitelib}
|
|
|
|
|
|
%check
|
|
pushd ./%{geminstdir}/
|
|
for f in test/*.rb
|
|
do
|
|
ruby -Ilib $f
|
|
done
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc %{gemdir}/doc/%{gemname}-%{version}/
|
|
|
|
%dir %{geminstdir}
|
|
%doc %{geminstdir}/[A-Z]*
|
|
%{geminstdir}/lib/
|
|
%doc %{geminstdir}/perf/
|
|
%doc %{geminstdir}/test/
|
|
|
|
%{gemdir}/cache/%{gemname}-%{version}.gem
|
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
|
|
|
%files -n ruby-%{gemname}
|
|
%defattr(-,root,root,-)
|
|
%{ruby_sitelib}/%{gemname}.rb
|
|
%{ruby_sitelib}/%{gemname}/
|
|
|
|
|
|
%changelog
|
|
* Sun Apr 03 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 4.3.0-1
|
|
- 4.3.0
|
|
|
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.4-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Tue Feb 1 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.4-1
|
|
- 4.2.4
|
|
|
|
* Fri Jan 14 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.3-1
|
|
- 4.2.3
|
|
|
|
* Sun Nov 6 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.2-1
|
|
- 4.2.2
|
|
|
|
* Sat Apr 11 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.1-1
|
|
- 4.2.1
|
|
|
|
* Wed Jan 13 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.0-2.respin1
|
|
- 4.2.0 (tarball seems respun)
|
|
|
|
* Thu Aug 27 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.2.0-1
|
|
- 4.2.0
|
|
|
|
* Fri Aug 21 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.1.0-1
|
|
- 4.1.0
|
|
|
|
* Sat Jul 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.0.0-3
|
|
- F-12: Mass rebuild
|
|
|
|
* Fri Mar 6 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
|
|
- Cleanups
|
|
|
|
* Tue Mar 03 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 4.0.0-1
|
|
- Initial package
|