Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
590b38b51a | ||
|
|
b43e0f3884 | ||
|
|
611d966cc5 | ||
|
|
5db716ec3a | ||
|
|
3517b5f0c0 | ||
|
|
b74db84de5 |
5 changed files with 159 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
htmlentities-4.2.0.gem
|
||||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: rubygem-htmlentities
|
|
||||||
# $Id$
|
|
||||||
NAME := rubygem-htmlentities
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attept a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
||||||
157
rubygem-htmlentities.spec
Normal file
157
rubygem-htmlentities.spec
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
Summary: A module for encoding and decoding (X)HTML entities
|
||||||
|
Name: rubygem-%{gemname}
|
||||||
|
Version: 4.2.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Group: Development/Languages
|
||||||
|
License: MIT
|
||||||
|
URL: http://htmlentities.rubyforge.org/
|
||||||
|
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
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}/test/
|
||||||
|
ruby test_all.rb
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%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
|
||||||
|
* 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
|
||||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
||||||
|
ad78c92451862e54fa608539d7c1bccd htmlentities-4.2.0.gem
|
||||||
Loading…
Add table
Add a link
Reference in a new issue