Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58629f4edd | ||
|
|
46cbdc71f1 | ||
|
|
09f529eabd | ||
|
|
541db3d01d |
5 changed files with 146 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
htmlentities-4.0.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)
|
||||
144
rubygem-htmlentities.spec
Normal file
144
rubygem-htmlentities.spec
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
# 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.0.0
|
||||
Release: 2%{?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}/
|
||||
|
||||
# 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}/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
|
||||
* 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 @@
|
|||
8490050367c95d63f83049852f7e93a8 htmlentities-4.0.0.gem
|
||||
Loading…
Add table
Add a link
Reference in a new issue