rpms/eruby/devel eruby.spec,1.21,1.22

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Thu Sep 27 03:29:14 UTC 2007


Author: tagoh

Update of /cvs/pkgs/rpms/eruby/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1678

Modified Files:
	eruby.spec 
Log Message:
* Tue Sep 25 2007 Akira TAGOH <tagoh at redhat.com> - 1.0.5-10
- clean up the spec file.


Index: eruby.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eruby/devel/eruby.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- eruby.spec	23 Aug 2007 10:52:20 -0000	1.21
+++ eruby.spec	27 Sep 2007 03:28:42 -0000	1.22
@@ -1,13 +1,17 @@
+%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')}
+%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
+%define ruby_archdir %(ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]')
+
 Name:		eruby
 Version:	1.0.5
-Release:	9
+Release:	10
 # eruby is GPLv2+
 # liberuby is LGPLv2+
 License:	GPLv2+ and LGPLv2+
 URL:		http://www.modruby.net/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildPrereq:	ruby
-BuildPreReq:	ruby-devel >= 1.8.0
+BuildRequires:	ruby
+BuildRequires:	ruby-devel >= 1.8.0
 
 Source0:	http://www.modruby.net/archive/%{name}-%{version}.tar.gz
 
@@ -23,92 +27,85 @@
 %package libs
 Summary:	Library for eRuby
 Group:		Development/Languages
-Requires:	ruby-libs >= 1.8.0
+Requires:	ruby(abi) = 1.8
+Provides:	ruby(eruby) = %{version}
 
 %description libs
 This package contains a library for eRuby.
 
 
 %package devel
-Summary:	Development files for eRuby.
+Summary:	Development files for eRuby
 Group:		Development/Languages
-Requires:	%{name}-libs = %{version}
+Requires:	ruby(eruby) = %{version}
 
 %description devel
 This package contains the header files and libraries for an application
 embedded eRuby.
 
 %prep
-
-%setup -q -c
+%setup -q
 
 %build
-pushd %{name}-%{version}
 ruby configure.rb --enable-shared
 make %{?_smp_mflags}
-popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%__mkdir_p $RPM_BUILD_ROOT%{_bindir}
-%__mkdir_p $RPM_BUILD_ROOT%{_libdir}
-%__mkdir_p $RPM_BUILD_ROOT%{_datadir}
-%__mkdir_p $RPM_BUILD_ROOT%{_includedir}
-%__mkdir_p $RPM_BUILD_ROOT%{_mandir}/man1
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
+mkdir -p $RPM_BUILD_ROOT%{_datadir}
+mkdir -p $RPM_BUILD_ROOT%{_includedir}
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
+mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}
 
 # installing binaries ...
-pushd %{name}-%{version}
 make install DESTDIR=$RPM_BUILD_ROOT
-popd
-
-# change permissions
-chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
-
-# listing all files in ruby-all.files
-(find \
-	$RPM_BUILD_ROOT%{_bindir} \
-	$RPM_BUILD_ROOT%{_libdir} \
-	$RPM_BUILD_ROOT%{_mandir} \
-	$RPM_BUILD_ROOT%{_includedir} \
-	-type f -o -type l) |
-	sort | sed -e "s,^$RPM_BUILD_ROOT,," \
-		   -e "s,\(/man/man./.*\)$,\1*," > eruby-all.files
-
-# for eruby-libs
-egrep '\.so\..*$' eruby-all.files > eruby-libs.files
-egrep '%{_libdir}/ruby' eruby-all.files >> eruby-libs.files
 
-# for eruby-devel
-egrep '\.([ah]|so)$' eruby-all.files | grep -v %{_libdir}/ruby > eruby-devel.files
+# remove the unnecessary files
+rm $RPM_BUILD_ROOT%{_libdir}/*.a
 
-# for eruby
-sort eruby-all.files eruby-libs.files eruby-devel.files | uniq -u > eruby.files
+# change permissions
+find $RPM_BUILD_ROOT%{_libdir} -name '*.so*' | xargs chmod 0755
 
+# workaround for not working site-install properly
+mv $RPM_BUILD_ROOT%{ruby_archdir}/eruby.so $RPM_BUILD_ROOT%{ruby_sitearch}/
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-rm -f *.files
 
 %post -p /sbin/ldconfig libs
 
 %postun -p /sbin/ldconfig libs
 
-%files -f eruby.files
-%defattr (-, root, root)
-%doc %{name}-%{version}/README.*
-%doc %{name}-%{version}/ChangeLog
-%doc %{name}-%{version}/examples
-
-%files -f eruby-libs.files libs
-%defattr (-, root, root)
-
-%files -f eruby-devel.files devel
-%defattr (-, root, root)
+%files
+%defattr (-, root, root, -)
+%doc COPYING GPL README.en ChangeLog examples
+%lang(ja) %doc README.ja
+%{_bindir}/eruby
+%{_mandir}/man1/eruby.1*
+
+%files libs
+%defattr (-, root, root, -)
+%doc COPYING LGPL README.en
+%lang(ja) %doc README.ja
+%{_libdir}/liberuby.so.*
+%{ruby_sitearch}/eruby.so
+
+%files devel
+%defattr (-, root, root, -)
+%doc COPYING LGPL README.en
+%lang(ja) %doc README.ja
+%{_includedir}/eruby.h
+%{_libdir}/liberuby.so
 
 
 %changelog
+* Tue Sep 25 2007 Akira TAGOH <tagoh at redhat.com> - 1.0.5-10
+- clean up the spec file.
+
 * Thu Aug 23 2007 Akira TAGOH <tagoh at redhat.com> - 1.0.5-9
 - Rebuild
 




More information about the scm-commits mailing list