rpms/rubygem-mechanize/devel rubygem-mechanize.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Mamoru Tasaka mtasaka at fedoraproject.org
Sat Jan 24 04:07:55 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/rubygem-mechanize/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27051/devel

Modified Files:
	.cvsignore sources 
Added Files:
	rubygem-mechanize.spec 
Log Message:
Initial commit


--- NEW FILE rubygem-mechanize.spec ---
# Initially Generated from mechanize-0.8.5.gem by gem2rpm -*- rpm-spec -*-
%define	ruby_sitelib		%(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%define	rubyabi		1.8

%define	gemdir			%(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%define	gemname		mechanize
%define	geminstdir		%{gemdir}/gems/%{gemname}-%{version}

Summary:	A handy web browsing ruby object
Name:		rubygem-%{gemname}
Version:	0.9.0
Release:	2%{?dist}
Group:		Development/Languages
License:	GPL+
URL:		http://mechanize.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)
Requires:	rubygem(nokogiri)
Provides:	rubygem(%{gemname}) = %{version}-%{release}
#Requires:	rubygem(hoe)

BuildArch:	noarch

%description
The Mechanize library is used for automating interaction with websites. 
Mechanize automatically stores and sends cookies, follows redirects, 
can follow links, and submit forms. Form fields can be populated and 
submitted. Mechanize also keeps track of the sites that you have 
visited as a history.

%package	doc
Summary:	Documentation for %{name}
Group:		Documentation
# Directory ownership issue
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}
Requires:	ruby(nokogiri)
Provides:	ruby(%{gemname}) = %{version}-%{release}

%description	-n ruby-%{gemname}
This package provides non-Gem support for %{gemname}.

%prep

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
gem install \
	--local \
	--install-dir %{buildroot}%{gemdir} \
	--force --rdoc \
	%{SOURCE0}

# Clean up
rm -f %{buildroot}%{geminstdir}/*.gemspec
rm -f %{buildroot}%{geminstdir}/{Rakefile,Manifest.txt}
find %{buildroot}%{geminstdir} -name \*.html -print0 | \
	xargs -0 chmod 0644

# The following method is completely copied from rubygem-gettext
# spec file
#
# Create symlinks
##
## Note that before switching to gem %%{ruby_sitelib}/%%{gemname}
## already existed as a directory, so this cannot be replaced
## by symlink (cpio fails)
## Similarly, all directories under %%{ruby_sitelib} cannot be
## replaced by symlink
#

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 %{buildroot}

%files
%defattr(-,root,root,-)
%doc	%{geminstdir}/[A-Z]*.txt
%dir	%{geminstdir}
%{geminstdir}/lib/
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec

%files	doc
%defattr(-,root,root,-)
%{gemdir}/doc/%{gemname}-%{version}/
%{geminstdir}/examples/
%{geminstdir}/test/

%files	-n ruby-%{gemname}
%defattr(-,root,root,-)
%{ruby_sitelib}/%{gemname}.rb
%{ruby_sitelib}/www/

%changelog
* Tue Jan 20 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.9.0-2
- Some cleanup

* Thu Dec 25 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.9.0-1
- 0.9.0
- Dependency changed: hpricot -> nokogiri

* Sun Dec 21 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.8.5-2
- Switch to Gem

* Wed Nov 26 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.8.5-1
- 0.8.5

* Wed Oct  8 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.8.4-1
- 0.8.4

* Wed Oct  1 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.8.3-1
- 0.8.3

* Thu Sep 25 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.8.0-1
- 0.8.0

* Thu Aug 28 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.8-1
- 0.7.8

* Thu Jul 31 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.7-1
- 0.7.7

* Thu May 22 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.6-1
- 0.7.6

* Thu Mar 20 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.5-1
- 0.7.5

* Thu Mar  6 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.1-1
- 0.7.1

* Thu Jan 17 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.7.0-1
- 0.7.0

* Thu Dec 13 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.11-1
- 0.6.11

* Fri Nov  9 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.10-3
- More cleanup

* Sat Nov  3 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.10-2
- BR: ruby
- Remove unneeded CFLAGS

* Sat Nov  3 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.10-1
- 0.6.10

* Fri Jun  8 2007 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.8-1
- Initial packaging


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rubygem-mechanize/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	23 Jan 2009 23:27:13 -0000	1.1
+++ .cvsignore	24 Jan 2009 04:07:25 -0000	1.2
@@ -0,0 +1 @@
+mechanize-0.9.0.gem


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rubygem-mechanize/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	23 Jan 2009 23:27:13 -0000	1.1
+++ sources	24 Jan 2009 04:07:25 -0000	1.2
@@ -0,0 +1 @@
+7bd4fd71b64d1be3212cd3e559e2e669  mechanize-0.9.0.gem




More information about the fedora-extras-commits mailing list