From af4906ec8e8f64b7b41eb7eaaeea953ca5caf247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20=E3=83=86=E3=82=A3=E3=83=93=E3=83=84?= Date: Fri, 14 Aug 2009 16:14:44 +0000 Subject: [PATCH 1/5] Initialize branch F-11 for rubygem-json --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..25c7708 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-11 From 4c679111595422892d842378992d3b31e443a0f4 Mon Sep 17 00:00:00 2001 From: Xavier LAMIEN Date: Fri, 14 Aug 2009 18:53:24 +0000 Subject: [PATCH 2/5] Initial import. --- .cvsignore | 1 + import.log | 1 + rubygem-json.spec | 204 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 207 insertions(+) create mode 100644 import.log create mode 100644 rubygem-json.spec diff --git a/.cvsignore b/.cvsignore index e69de29..7828581 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +json-1.1.7.gem diff --git a/import.log b/import.log new file mode 100644 index 0000000..53334d1 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +rubygem-json-1_1_7-3_fc10:F-11:rubygem-json-1.1.7-3.fc10.src.rpm:1250275982 diff --git a/rubygem-json.spec b/rubygem-json.spec new file mode 100644 index 0000000..62ca5ed --- /dev/null +++ b/rubygem-json.spec @@ -0,0 +1,204 @@ +%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")} +%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")} + +%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%global gemname json +%global geminstdir %{gemdir}/gems/%{gemname}-%{version} +%global installroot %{buildroot}%{geminstdir} + + +Name: rubygem-%{gemname} +Version: 1.1.7 +Release: 3%{?dist} +Summary: A JSON implementation in Ruby + +Group: Development/Languages + +License: Ruby or GPLv2 +URL: http://json.rubyforge.org +Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: ruby, ruby-devel +BuildRequires: rubygem(rake) +Requires: ruby(abi) = 1.8 +Requires: ruby(gtk2), rubygems +Provides: rubygem(json) = %{version} + +%description +This is a implementation of the JSON specification according +to RFC 4627 in Ruby. +You can think of it as a low fat alternative to XML, +if you want to store data to disk or transmit it over +a network rather than use a verbose markup language. + +%package doc +Summary: Documentation for %{name} +Group: Documentation + +Requires: %{name} = %{version}-%{release} +Requires: ruby(rubygems) + +%description doc +This package contains documentation for %{name}. + +%package -n ruby-%{gemname} +Summary: Non-Gem support package 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 +%setup -q -c -T + +mkdir -p ./%{gemdir} + +%build +export CONFIGURE_ARGS="--with-cflags='%{optflags}'" +#pushd ./%{gemdir} +gem install --local --install-dir .%{gemdir} -V --force %{SOURCE0} + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{gemdir} +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}/%{gemname}/ext + +cp -a .%{gemdir}/* %{buildroot}/%{gemdir} + +# Let's move arch dependent files to %%ruby_sitearch +mv .%{geminstdir}/ext/json/ext/*.so \ + $RPM_BUILD_ROOT%{ruby_sitearch}/%{gemname}/ext + +mv $RPM_BUILD_ROOT%{gemdir}/bin/* $RPM_BUILD_ROOT%{_bindir} + +chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/install.rb +chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/bin/*.rb +chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/tests/*.rb +chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/tools/server.rb +chmod 0644 $RPM_BUILD_ROOT%{geminstdir}/tools/fuzz.rb +chmod 0755 $RPM_BUILD_ROOT%{geminstdir}/benchmarks/*.rb + +# We don't need those files anymore. +rm -rf $RPM_BUILD_ROOT%{geminstdir}/ext +rm -rf $RPM_BUILD_ROOT%{geminstdir}/install.rb +rm -rf $RPM_BUILD_ROOT%{geminstdir}/.require_paths +rm -rf $RPM_BUILD_ROOT%{gemdir}/doc/%{gemname}-%{version}/rdoc/classes/.src +rm -rf $RPM_BUILD_ROOT%{gemdir}/doc/%{gemname}-%{version}/rdoc/classes/.html + +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} + +%clean +rm -rf $RPM_BUILD_ROOT + +%check +pushd .%{geminstdir} +rake test --trace +popd + + + +%files +%defattr(-,root,root,-) +%doc %{geminstdir}/[A-Z]* +%dir %{geminstdir} +%{_bindir}/*.rb +%{geminstdir}/bin +%{geminstdir}/lib +%{geminstdir}/tools +%{ruby_sitearch}/%{gemname} +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec + +%files doc +%defattr(-,root,root,-) +%{geminstdir}/Rakefile +%{geminstdir}/data +%{geminstdir}/tests +%{geminstdir}/benchmarks +%{geminstdir}/doc-templates +%{gemdir}/doc/%{gemname}-%{version} + +%files -n ruby-%{gemname} +%defattr(-,root,root,-) +%{ruby_sitelib}/%{gemname} +%{ruby_sitelib}/%{gemname}.rb + + +%changelog +* Wed Aug 12 2009 Xavier Lamien - 1.1.7-3 +- Fix gem scripts and install_dir. +- Enable %%check stage. + +* Wed Aug 05 2009 Xavier Lamien - 1.1.7-2 +- Rebuild in correct buildir process. +- Add sub packages. + +* Mon Aug 03 2009 Xavier Lamien - 1.1.7-1 +- Update release. + +* Sat Jun 06 2009 Xavier Lamien - 1.1.6-1 +- Update release. + +* Tue May 12 2009 Xavier Lamien - 1.1.5-1 +- Update release. + +* Thu Apr 02 2009 Xavier Lamien - 1.1.4-1 +- Update release. + +* Sat Jul 12 2008 Xavier Lamien - 1.1.3-1 +- Initial RPM release. diff --git a/sources b/sources index e69de29..abc1c4c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f8e760e37e1b6230de7ef7bd828e79c4 json-1.1.7.gem From ead69b7cb3e7fa0a663a1f53047149e91295f898 Mon Sep 17 00:00:00 2001 From: Xavier LAMIEN Date: Fri, 30 Oct 2009 20:16:39 +0000 Subject: [PATCH 3/5] Update release --- .cvsignore | 2 +- rubygem-json.spec | 10 ++++++---- sources | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7828581..e35504e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -json-1.1.7.gem +json-1.1.9.gem diff --git a/rubygem-json.spec b/rubygem-json.spec index 62ca5ed..349415d 100644 --- a/rubygem-json.spec +++ b/rubygem-json.spec @@ -8,8 +8,8 @@ Name: rubygem-%{gemname} -Version: 1.1.7 -Release: 3%{?dist} +Version: 1.1.9 +Release: 1%{?dist} Summary: A JSON implementation in Ruby Group: Development/Languages @@ -61,7 +61,6 @@ mkdir -p ./%{gemdir} %build export CONFIGURE_ARGS="--with-cflags='%{optflags}'" -#pushd ./%{gemdir} gem install --local --install-dir .%{gemdir} -V --force %{SOURCE0} %install @@ -170,7 +169,7 @@ popd %{geminstdir}/data %{geminstdir}/tests %{geminstdir}/benchmarks -%{geminstdir}/doc-templates +%{geminstdir}/doc-main.txt %{gemdir}/doc/%{gemname}-%{version} %files -n ruby-%{gemname} @@ -180,6 +179,9 @@ popd %changelog +* Thu Oct 29 2009 Xavier Lamien - 1.1.9-1 +- Update release. + * Wed Aug 12 2009 Xavier Lamien - 1.1.7-3 - Fix gem scripts and install_dir. - Enable %%check stage. diff --git a/sources b/sources index abc1c4c..2ed0130 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f8e760e37e1b6230de7ef7bd828e79c4 json-1.1.7.gem +b29ddb63ba1c0d3a9ecdaf944df61157 json-1.1.9.gem From 6bbcd843c9eba9ac21f9f5049b19e741527b3535 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:31:22 +0000 Subject: [PATCH 4/5] 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 92f744e..b0a6a6c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := rubygem-json 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 0089bf2fe80381bb5c5cb432024d6e9536a2d335 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:51:56 +0000 Subject: [PATCH 5/5] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 1 - 4 files changed, 23 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log 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 b0a6a6c..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: rubygem-json -# $Id$ -NAME := rubygem-json -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 25c7708..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-11 diff --git a/import.log b/import.log deleted file mode 100644 index 53334d1..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -rubygem-json-1_1_7-3_fc10:F-11:rubygem-json-1.1.7-3.fc10.src.rpm:1250275982