rpms/rubygem-zoom/devel rubygem-zoom.spec,1.5,1.6

Mamoru Tasaka mtasaka at fedoraproject.org
Wed Oct 8 05:32:10 UTC 2008


Author: mtasaka

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

Modified Files:
	rubygem-zoom.spec 
Log Message:
* Wed Oct  8 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-3
- Split out unneeded files in better way



Index: rubygem-zoom.spec
===================================================================
RCS file: /cvs/extras/rpms/rubygem-zoom/devel/rubygem-zoom.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rubygem-zoom.spec	9 Feb 2008 04:22:16 -0000	1.5
+++ rubygem-zoom.spec	8 Oct 2008 05:31:40 -0000	1.6
@@ -10,7 +10,7 @@
 
 Name:		rubygem-%{gemname}
 Version:	0.4.1
-Release:	2%{?dist}.3
+Release:	3%{?dist}
 Group:		Development/Languages
 Summary:	Ruby binding to ZOOM
 
@@ -44,6 +44,15 @@
 to a subset of the services specified by the Z39.50 standard, 
 also known as the international standard ISO 23950.
 
+%package	doc
+Summary:	Documentation for %{name}
+Group:		Documentation
+Requires:	%{name} = %{version}-%{release}
+
+%description	doc
+This package contains documentation for %{name}.
+
+
 %prep
 # Compile by myself forcely.
 # Current rubygem install method
@@ -58,9 +67,31 @@
 %setup -q -c
 %{__gzip} -dc data.tar.gz | %{__tar} -x -f -
 
+# Cleanup
+%{__rm} -rf */CVS/
+find sample/ -name \*.rb -print0 | xargs -0 %{__chmod} 0644
+
+# Repackage to split out unneeded files
+# So unpack source again
+%{__mkdir} Repackage
+cd Repackage
+%{__gzip} -dc ../data.tar.gz | %{__tar} -x -f -
+cd ..
+
 %build
+# Build module with honoring CFLAGS correctly
 rake -v build
 
+# Repackage gem
+cd Repackage
+%{__rm} -rf \
+	sample/ \
+	test/ \
+
+rake gem
+%{__mv} pkg/*.gem ..
+cd ..
+
 %install
 %{__rm} -rf %{buildroot}
 
@@ -70,7 +101,7 @@
 	--local \
 	--install-dir %{buildroot}%{gemdir} \
 	--force \
-	%{SOURCE0}
+	*.gem
 
 # 2. replace with local build!!
 %{__mkdir_p} %{buildroot}%{ruby_sitearch}
@@ -78,27 +109,14 @@
 	src/%{gemname}.so \
 	%{buildroot}%{ruby_sitearch}/
 
-# 3. clean up
-for file in \
-	Rakefile \
-	lib/ \
-	sample/CVS/ \
-	src/ \
-	test/CVS/ \
-	; do
-	%{__rm} -rf %{buildroot}%{geminstdir}/${file}
-done
-%{__chmod} 0755 %{buildroot}%{geminstdir}/sample/needle.rb
-
-# 4. Move documents
-%{__mkdir_p} %{buildroot}%{_defaultdocdir}/%{name}-%{version}
-for f in \
-	ChangeLog \
-	README \
-	; do 
-	%{__mv} -f %{buildroot}%{geminstdir}/${f} \
-		%{buildroot}%{_defaultdocdir}/%{name}-%{version}/
-done
+# 3. Cleanups
+%{__rm} -rf %{buildroot}%{geminstdir}/lib/
+pushd %{buildroot}%{geminstdir}/src/
+%{__rm} -f \
+	*.{so,o} \
+	Makefile \
+	mkmf.log
+popd
 
 %check
 # Net connection needed, disabling now.
@@ -110,15 +128,26 @@
 
 %files
 %defattr(-, root, root,-)
-%{_defaultdocdir}/%{name}-%{version}/
-
 %{ruby_sitearch}/%{gemname}.so
 
 %{geminstdir}/
+%exclude %{geminstdir}/src/
+%exclude %{geminstdir}/Rakefile
+
 %{gemdir}/cache/%{gemname}-%{version}.gem
 %{gemdir}/specifications/%{gemname}-%{version}.gemspec
 
+%files doc
+%defattr(-,root,root,-)
+%doc sample/
+%doc test/
+%{geminstdir}/src/
+%{geminstdir}/Rakefile
+
 %changelog
+* Wed Oct  8 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-3
+- Split out unneeded files in better way
+
 * Sat Feb  9 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp>
 - Rebuild against gcc43
 




More information about the scm-commits mailing list