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