SPECS: geos.spec - added ruby bcond

wrobell wrobell at pld-linux.org
Tue Oct 9 22:49:01 CEST 2007


Author: wrobell                      Date: Tue Oct  9 20:49:01 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added ruby bcond

---- Files affected:
SPECS:
   geos.spec (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: SPECS/geos.spec
diff -u SPECS/geos.spec:1.16 SPECS/geos.spec:1.17
--- SPECS/geos.spec:1.16	Sun Jun 17 12:29:57 2007
+++ SPECS/geos.spec	Tue Oct  9 22:48:56 2007
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+# Conditional build:
+%bcond_without ruby # build without ruby
+#
 Summary:	Geometry Engine - Open Source
 Summary(pl.UTF-8):	GEOS - silnik geometryczny z otwartymi źródłami
 Name:		geos
@@ -15,9 +18,9 @@
 BuildRequires:	python >= 1:2.5
 BuildRequires:	python-devel >= 1:2.5
 BuildRequires:	rpm-pythonprov
-BuildRequires:	ruby-devel
+%{?with_ruby:BuildRequires:	ruby-devel}
 BuildRequires:	swig-python >= 1.3.29
-BuildRequires:	swig-ruby >= 1.3.29
+%{?with_ruby:BuildRequires:	swig-ruby >= 1.3.29}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -98,10 +101,12 @@
 swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
 python setup.py build
 
+%if %{with ruby}
 cd ../ruby
 swig -c++ -ruby -autorename -o geos_wrap.cxx ../geos.i
 %{__cxx} %{rpmcxxflags} -I../../source/headers -I%{ruby_archdir} -c geos_wrap.cxx
 %{__cxx} -shared -o geos.so geos_wrap.o -lruby -L../../source/geom/.libs -lgeos
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -111,7 +116,9 @@
 	pkglibdir=%{_libdir}
 
 cd swig
+%if %{with ruby}
 install -D ruby/geos.so $RPM_BUILD_ROOT%{ruby_archdir}/geos.so
+%endif
 
 cd python
 python setup.py install \
@@ -154,9 +161,11 @@
 %{py_sitedir}/geos.py[co]
 %{py_sitedir}/PyGEOS-*.egg-info
 
+%if %{with ruby}
 %files -n ruby-geos
 %defattr(644,root,root,755)
 %attr(755,root,root) %{ruby_archdir}/geos.so
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -164,6 +173,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.17  2007/10/09 20:48:56  wrobell
+- added ruby bcond
+
 Revision 1.16  2007/06/17 10:29:57  wrobell
 - rel. 2
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/geos.spec?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list