From 541db3d01d70726bd2127467eab622244d63808d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 5 Mar 2009 20:26:31 +0000 Subject: [PATCH 1/4] Initialize branch F-9 for rubygem-htmlentities --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..1c26f78 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-9 From 09f529eabd38e32ae968f139b78242da56defcfd Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 6 Mar 2009 01:18:55 +0000 Subject: [PATCH 2/4] Initial import --- .cvsignore | 1 + rubygem-htmlentities.spec | 144 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 146 insertions(+) create mode 100644 rubygem-htmlentities.spec diff --git a/.cvsignore b/.cvsignore index e69de29..d81205e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +htmlentities-4.0.0.gem diff --git a/rubygem-htmlentities.spec b/rubygem-htmlentities.spec new file mode 100644 index 0000000..c273024 --- /dev/null +++ b/rubygem-htmlentities.spec @@ -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 +- Cleanups + +* Tue Mar 03 2009 Mamoru Tasaka - 4.0.0-1 +- Initial package diff --git a/sources b/sources index e69de29..8bb36b8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8490050367c95d63f83049852f7e93a8 htmlentities-4.0.0.gem From 46cbdc71f1a19bdeaa3f3cd6195b9376896e1a2a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:31:21 +0000 Subject: [PATCH 3/4] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e29c289..c1cf31b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 58629f4edd6ae5550907c9c727ad2630c754c15b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:51:46 +0000 Subject: [PATCH 4/4] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c1cf31b..0000000 --- a/Makefile +++ /dev/null @@ -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 $$d/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) diff --git a/branch b/branch deleted file mode 100644 index 1c26f78..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-9