]> git.pld-linux.org Git - packages/geos.git/blame - geos.spec
- added ruby bcond
[packages/geos.git] / geos.spec
CommitLineData
38386277 1# Conditional build:
2%bcond_without ruby # build without ruby
3#
7070463c 4Summary: Geometry Engine - Open Source
fd0ef9fd 5Summary(pl.UTF-8): GEOS - silnik geometryczny z otwartymi źródłami
7070463c 6Name: geos
02cf38a4 7Version: 2.2.3
6f70ded1 8Release: 2
7070463c
JB
9License: LGPL
10Group: Libraries
c2c031fa 11Source0: http://geos.refractions.net/%{name}-%{version}.tar.bz2
02cf38a4 12# Source0-md5: 440be2b11fd3d711e950a47ea6f1b424
68bc5314 13Patch0: %{name}-swig.patch
7070463c
JB
14URL: http://geos.refractions.net/
15BuildRequires: automake
16BuildRequires: libstdc++-devel
08e05e00
JB
17BuildRequires: python >= 1:2.5
18BuildRequires: python-devel >= 1:2.5
68bc5314 19BuildRequires: rpm-pythonprov
38386277 20%{?with_ruby:BuildRequires: ruby-devel}
68bc5314 21BuildRequires: swig-python >= 1.3.29
38386277 22%{?with_ruby:BuildRequires: swig-ruby >= 1.3.29}
7070463c
JB
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26GEOS (Geometry Engine - Open Source) is a C++ port of the Java
27Topology Suite (JTS). As such, it aims to contain the complete
28functionality of JTS in C++. This includes all the OpenGIS "Simple
29Features for SQL" spatial predicate functions and spatial operators,
30as well as specific JTS topology functions such as IsValid().
31
e0dd9005 32%description -l pl.UTF-8
7070463c 33GEOS (Geometry Engine - Open Source, czyli silnik geometryczny z
e0dd9005
JR
34otwartymi źródłami) to port C++ biblioteki Java Topology Suite (JTS).
35Celem biblioteki jako takiej jest implementacja pełnej funkcjonalności
36JTS w C++. Obejmuje to wszystkie funkcje predykatów przestrzennych
7070463c 37wg "Simple Features for SQL" OpenGIS oraz operatory przestrzenne, a
e0dd9005 38także specyficzne dla JTS funkcje topologiczne takie jak IsValid().
7070463c
JB
39
40%package devel
41Summary: Header files for GEOS library
fd0ef9fd 42Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GEOS
7070463c
JB
43Group: Development/Libraries
44Requires: %{name} = %{version}-%{release}
45Requires: libstdc++-devel
46
47%description devel
48Header files for GEOS library.
49
e0dd9005
JR
50%description devel -l pl.UTF-8
51Pliki nagłówkowe biblioteki GEOS.
7070463c
JB
52
53%package static
54Summary: Static GEOS library
fd0ef9fd 55Summary(pl.UTF-8): Statyczna biblioteka GEOS
7070463c
JB
56Group: Development/Libraries
57Requires: %{name}-devel = %{version}-%{release}
58
59%description static
60Static GEOS library.
61
e0dd9005 62%description static -l pl.UTF-8
7070463c
JB
63Statyczna biblioteka GEOS.
64
2172c3d9 65%package -n python-geos
66Summary: Python bindings for Geometry Engine - Open Source
fd0ef9fd 67Summary(pl.UTF-8): Wiązania Pythona do biblioteki GEOS
adc066a8 68Group: Development/Languages/Python
2172c3d9 69Requires: %{name} = %{version}-%{release}
70
71%description -n python-geos
adc066a8 72Python bindings for Geometry Engine - Open Source.
2172c3d9 73
e0dd9005
JR
74%description -n python-geos -l pl.UTF-8
75Wiązania Pythona do biblioteki GEOS.
2172c3d9 76
68bc5314
JB
77%package -n ruby-geos
78Summary: Ruby bindings for Geometry Engine - Open Source
fd0ef9fd 79Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki GEOS
68bc5314
JB
80Group: Development/Languages/Python
81Requires: %{name} = %{version}-%{release}
82
83%description -n ruby-geos
84Ruby bindings for Geometry Engine - Open Source.
85
e0dd9005
JR
86%description -n ruby-geos -l pl.UTF-8
87Wiązania języka Ruby do biblioteki GEOS.
68bc5314 88
7070463c 89%prep
c2c031fa 90%setup -q
7070463c
JB
91%patch0 -p1
92
93%build
94cp -f /usr/share/automake/config.* .
95%configure
96%{__make} \
97 pkglibdir=%{_libdir}
98
2172c3d9 99cd swig/python
100swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
101python setup.py build
102
38386277 103%if %{with ruby}
68bc5314
JB
104cd ../ruby
105swig -c++ -ruby -autorename -o geos_wrap.cxx ../geos.i
106%{__cxx} %{rpmcxxflags} -I../../source/headers -I%{ruby_archdir} -c geos_wrap.cxx
107%{__cxx} -shared -o geos.so geos_wrap.o -lruby -L../../source/geom/.libs -lgeos
38386277 108%endif
68bc5314 109
7070463c
JB
110%install
111rm -rf $RPM_BUILD_ROOT
112
113%{__make} install \
114 DESTDIR=$RPM_BUILD_ROOT \
115 pkglibdir=%{_libdir}
116
02cf38a4 117cd swig
38386277 118%if %{with ruby}
02cf38a4 119install -D ruby/geos.so $RPM_BUILD_ROOT%{ruby_archdir}/geos.so
38386277 120%endif
2172c3d9 121
02cf38a4
JB
122cd python
123python setup.py install \
124 --optimize=2 \
125 --root=$RPM_BUILD_ROOT
126
127%py_postclean
68bc5314 128
7070463c
JB
129%clean
130rm -rf $RPM_BUILD_ROOT
131
132%post -p /sbin/ldconfig
133%postun -p /sbin/ldconfig
134
135%files
136%defattr(644,root,root,755)
02cf38a4 137%doc AUTHORS ChangeLog NEWS README TODO
6a9f7429
JB
138%attr(755,root,root) %{_libdir}/libgeos.so.*.*.*
139%attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.*
7070463c
JB
140
141%files devel
142%defattr(644,root,root,755)
143%attr(755,root,root) %{_bindir}/geos-config
6a9f7429
JB
144%attr(755,root,root) %{_libdir}/libgeos.so
145%attr(755,root,root) %{_libdir}/libgeos_c.so
146%{_libdir}/libgeos.la
147%{_libdir}/libgeos_c.la
7070463c 148%{_includedir}/geos
413fb971 149%{_includedir}/geos.h
6a9f7429 150%{_includedir}/geos_c.h
7070463c
JB
151
152%files static
153%defattr(644,root,root,755)
6a9f7429
JB
154%{_libdir}/libgeos.a
155%{_libdir}/libgeos_c.a
2172c3d9 156
157%files -n python-geos
158%defattr(644,root,root,755)
2172c3d9 159%attr(755,root,root) %{py_sitedir}/_geos.so
02cf38a4
JB
160%{py_sitedir}/geos.py[co]
161%{py_sitedir}/PyGEOS-*.egg-info
68bc5314 162
38386277 163%if %{with ruby}
68bc5314
JB
164%files -n ruby-geos
165%defattr(644,root,root,755)
166%attr(755,root,root) %{ruby_archdir}/geos.so
38386277 167%endif
This page took 0.125391 seconds and 4 git commands to generate.