]>
Commit | Line | Data |
---|---|---|
33332b8a | 1 | # |
38386277 | 2 | # Conditional build: |
424c3af6 | 3 | %bcond_without php # PHP binding |
33332b8a | 4 | %bcond_without ruby # ruby binding |
38386277 | 5 | # |
7070463c | 6 | Summary: Geometry Engine - Open Source |
fd0ef9fd | 7 | Summary(pl.UTF-8): GEOS - silnik geometryczny z otwartymi źródłami |
7070463c | 8 | Name: geos |
4e5f0ee5 | 9 | Version: 3.3.8 |
ce6851f1 | 10 | Release: 3 |
33332b8a | 11 | License: LGPL v2.1 |
7070463c | 12 | Group: Libraries |
a58867fa | 13 | Source0: http://download.osgeo.org/geos/%{name}-%{version}.tar.bz2 |
4e5f0ee5 | 14 | # Source0-md5: 75be476d0831a2d14958fed76ca266de |
01dd35cb | 15 | Patch0: %{name}-ruby1.9.patch |
4f288115 | 16 | Patch1: %{name}-am.patch |
ce6851f1 | 17 | Patch2: rubydir.patch |
a58867fa | 18 | URL: http://trac.osgeo.org/geos/ |
de93cddd | 19 | BuildRequires: autoconf >= 2.52 |
7070463c JB |
20 | BuildRequires: automake |
21 | BuildRequires: libstdc++-devel | |
424c3af6 | 22 | %{?with_php:BuildRequires: php-devel} |
cfd118c2 ER |
23 | BuildRequires: python |
24 | BuildRequires: python-devel | |
68bc5314 | 25 | BuildRequires: rpm-pythonprov |
424c3af6 | 26 | BuildRequires: rpmbuild(macros) >= 1.519 |
38386277 | 27 | %{?with_ruby:BuildRequires: ruby-devel} |
68bc5314 | 28 | BuildRequires: swig-python >= 1.3.29 |
01dd35cb | 29 | %{?with_ruby:BuildRequires: swig-ruby >= 1.3.40-3} |
7070463c JB |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | GEOS (Geometry Engine - Open Source) is a C++ port of the Java | |
34 | Topology Suite (JTS). As such, it aims to contain the complete | |
35 | functionality of JTS in C++. This includes all the OpenGIS "Simple | |
36 | Features for SQL" spatial predicate functions and spatial operators, | |
37 | as well as specific JTS topology functions such as IsValid(). | |
38 | ||
e0dd9005 | 39 | %description -l pl.UTF-8 |
7070463c | 40 | GEOS (Geometry Engine - Open Source, czyli silnik geometryczny z |
e0dd9005 JR |
41 | otwartymi źródłami) to port C++ biblioteki Java Topology Suite (JTS). |
42 | Celem biblioteki jako takiej jest implementacja pełnej funkcjonalności | |
43 | JTS w C++. Obejmuje to wszystkie funkcje predykatów przestrzennych | |
7070463c | 44 | wg "Simple Features for SQL" OpenGIS oraz operatory przestrzenne, a |
e0dd9005 | 45 | także specyficzne dla JTS funkcje topologiczne takie jak IsValid(). |
7070463c JB |
46 | |
47 | %package devel | |
48 | Summary: Header files for GEOS library | |
fd0ef9fd | 49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GEOS |
7070463c JB |
50 | Group: Development/Libraries |
51 | Requires: %{name} = %{version}-%{release} | |
52 | Requires: libstdc++-devel | |
53 | ||
54 | %description devel | |
55 | Header files for GEOS library. | |
56 | ||
e0dd9005 JR |
57 | %description devel -l pl.UTF-8 |
58 | Pliki nagłówkowe biblioteki GEOS. | |
7070463c JB |
59 | |
60 | %package static | |
61 | Summary: Static GEOS library | |
fd0ef9fd | 62 | Summary(pl.UTF-8): Statyczna biblioteka GEOS |
7070463c JB |
63 | Group: Development/Libraries |
64 | Requires: %{name}-devel = %{version}-%{release} | |
65 | ||
66 | %description static | |
67 | Static GEOS library. | |
68 | ||
e0dd9005 | 69 | %description static -l pl.UTF-8 |
7070463c JB |
70 | Statyczna biblioteka GEOS. |
71 | ||
424c3af6 JB |
72 | %package -n php-geos |
73 | Summary: PHP bindings for Geometry Engine - Open Source | |
74 | Summary(pl.UTF-8): Wiązania PHP do biblioteki GEOS | |
75 | Group: Development/Languages/PHP | |
76 | Requires: %{name} = %{version}-%{release} | |
77 | %{?requires_php_extension} | |
78 | ||
79 | %description -n php-geos | |
80 | PHP bindings for Geometry Engine - Open Source. | |
81 | ||
82 | %description -n php-geos -l pl.UTF-8 | |
83 | Wiązania PHP do biblioteki GEOS. | |
84 | ||
2172c3d9 | 85 | %package -n python-geos |
86 | Summary: Python bindings for Geometry Engine - Open Source | |
fd0ef9fd | 87 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GEOS |
adc066a8 | 88 | Group: Development/Languages/Python |
2172c3d9 | 89 | Requires: %{name} = %{version}-%{release} |
90 | ||
91 | %description -n python-geos | |
adc066a8 | 92 | Python bindings for Geometry Engine - Open Source. |
2172c3d9 | 93 | |
e0dd9005 JR |
94 | %description -n python-geos -l pl.UTF-8 |
95 | Wiązania Pythona do biblioteki GEOS. | |
2172c3d9 | 96 | |
68bc5314 JB |
97 | %package -n ruby-geos |
98 | Summary: Ruby bindings for Geometry Engine - Open Source | |
fd0ef9fd | 99 | Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki GEOS |
68bc5314 JB |
100 | Group: Development/Languages/Python |
101 | Requires: %{name} = %{version}-%{release} | |
102 | ||
103 | %description -n ruby-geos | |
104 | Ruby bindings for Geometry Engine - Open Source. | |
105 | ||
e0dd9005 JR |
106 | %description -n ruby-geos -l pl.UTF-8 |
107 | Wiązania języka Ruby do biblioteki GEOS. | |
68bc5314 | 108 | |
7070463c | 109 | %prep |
33332b8a | 110 | %setup -q |
01dd35cb | 111 | %patch0 -p1 |
4f288115 | 112 | %patch1 -p1 |
ce6851f1 | 113 | %patch2 -p1 |
7070463c JB |
114 | |
115 | %build | |
01dd35cb JR |
116 | %{__aclocal} -I macros |
117 | %{__autoconf} | |
118 | %{__autoheader} | |
119 | %{__automake} | |
11971862 | 120 | %configure \ |
424c3af6 | 121 | %{?with_php:--enable-php} \ |
11971862 | 122 | --enable-python \ |
ce6851f1 | 123 | %{?with_ruby:--enable-ruby} |
11971862 | 124 | |
7070463c JB |
125 | %{__make} \ |
126 | pkglibdir=%{_libdir} | |
127 | ||
68bc5314 | 128 | |
7070463c JB |
129 | %install |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %{__make} install \ | |
33332b8a JB |
133 | DESTDIR=$RPM_BUILD_ROOT |
134 | ||
424c3af6 JB |
135 | %if %{with php} |
136 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
137 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/geos.ini | |
138 | ; Enable geos extension module | |
139 | extension=geos.so | |
140 | EOF | |
141 | %endif | |
142 | ||
ce6851f1 | 143 | %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/*.{la,a}} |
424c3af6 | 144 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/geos/*.{la,a} |
7070463c | 145 | |
02cf38a4 | 146 | %py_postclean |
68bc5314 | 147 | |
7070463c JB |
148 | %clean |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %post -p /sbin/ldconfig | |
152 | %postun -p /sbin/ldconfig | |
153 | ||
154 | %files | |
155 | %defattr(644,root,root,755) | |
02cf38a4 | 156 | %doc AUTHORS ChangeLog NEWS README TODO |
a58867fa | 157 | %attr(755,root,root) %{_libdir}/libgeos-*.so |
6a9f7429 | 158 | %attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.* |
33332b8a | 159 | %attr(755,root,root) %ghost %{_libdir}/libgeos_c.so.1 |
7070463c JB |
160 | |
161 | %files devel | |
162 | %defattr(644,root,root,755) | |
163 | %attr(755,root,root) %{_bindir}/geos-config | |
6a9f7429 JB |
164 | %attr(755,root,root) %{_libdir}/libgeos.so |
165 | %attr(755,root,root) %{_libdir}/libgeos_c.so | |
166 | %{_libdir}/libgeos.la | |
167 | %{_libdir}/libgeos_c.la | |
7070463c | 168 | %{_includedir}/geos |
413fb971 | 169 | %{_includedir}/geos.h |
6a9f7429 | 170 | %{_includedir}/geos_c.h |
7070463c JB |
171 | |
172 | %files static | |
173 | %defattr(644,root,root,755) | |
6a9f7429 JB |
174 | %{_libdir}/libgeos.a |
175 | %{_libdir}/libgeos_c.a | |
2172c3d9 | 176 | |
424c3af6 JB |
177 | %if %{with php} |
178 | %files -n php-geos | |
179 | %defattr(644,root,root,755) | |
180 | %doc php/{README,TODO} | |
181 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/geos.ini | |
182 | %attr(755,root,root) %{php_extensiondir}/geos.so | |
183 | %endif | |
184 | ||
2172c3d9 | 185 | %files -n python-geos |
186 | %defattr(644,root,root,755) | |
11971862 | 187 | %dir %{py_sitedir}/geos |
188 | %attr(755,root,root) %{py_sitedir}/geos/_geos.so | |
33332b8a JB |
189 | %{py_sitescriptdir}/geos |
190 | %{py_sitescriptdir}/geos.pth | |
68bc5314 | 191 | |
38386277 | 192 | %if %{with ruby} |
68bc5314 JB |
193 | %files -n ruby-geos |
194 | %defattr(644,root,root,755) | |
71f7add8 | 195 | %attr(755,root,root) %{ruby_vendorarchdir}/geos.so |
38386277 | 196 | %endif |