]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without php # PHP binding | |
4 | %bcond_without ruby # ruby binding | |
5 | # | |
6 | Summary: Geometry Engine - Open Source | |
7 | Summary(pl.UTF-8): GEOS - silnik geometryczny z otwartymi źródłami | |
8 | Name: geos | |
9 | Version: 3.4.2 | |
10 | Release: 3 | |
11 | License: LGPL v2.1 | |
12 | Group: Libraries | |
13 | Source0: http://download.osgeo.org/geos/%{name}-%{version}.tar.bz2 | |
14 | # Source0-md5: fc5df2d926eb7e67f988a43a92683bae | |
15 | Patch0: %{name}-ruby1.9.patch | |
16 | Patch1: rubydir.patch | |
17 | URL: http://trac.osgeo.org/geos/ | |
18 | BuildRequires: autoconf >= 2.52 | |
19 | BuildRequires: automake | |
20 | BuildRequires: libstdc++-devel | |
21 | %{?with_php:BuildRequires: php-devel} | |
22 | BuildRequires: python | |
23 | BuildRequires: python-devel | |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.519 | |
26 | %{?with_ruby:BuildRequires: ruby-devel} | |
27 | BuildRequires: swig-python >= 1.3.29 | |
28 | %{?with_ruby:BuildRequires: swig-ruby >= 1.3.40-3} | |
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 | ||
38 | %description -l pl.UTF-8 | |
39 | GEOS (Geometry Engine - Open Source, czyli silnik geometryczny z | |
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 | |
43 | wg "Simple Features for SQL" OpenGIS oraz operatory przestrzenne, a | |
44 | także specyficzne dla JTS funkcje topologiczne takie jak IsValid(). | |
45 | ||
46 | %package devel | |
47 | Summary: Header files for GEOS library | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki GEOS | |
49 | Group: Development/Libraries | |
50 | Requires: %{name} = %{version}-%{release} | |
51 | Requires: libstdc++-devel | |
52 | ||
53 | %description devel | |
54 | Header files for GEOS library. | |
55 | ||
56 | %description devel -l pl.UTF-8 | |
57 | Pliki nagłówkowe biblioteki GEOS. | |
58 | ||
59 | %package static | |
60 | Summary: Static GEOS library | |
61 | Summary(pl.UTF-8): Statyczna biblioteka GEOS | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-devel = %{version}-%{release} | |
64 | ||
65 | %description static | |
66 | Static GEOS library. | |
67 | ||
68 | %description static -l pl.UTF-8 | |
69 | Statyczna biblioteka GEOS. | |
70 | ||
71 | %package -n php-geos | |
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 | ||
78 | %description -n php-geos | |
79 | PHP bindings for Geometry Engine - Open Source. | |
80 | ||
81 | %description -n php-geos -l pl.UTF-8 | |
82 | Wiązania PHP do biblioteki GEOS. | |
83 | ||
84 | %package -n python-geos | |
85 | Summary: Python bindings for Geometry Engine - Open Source | |
86 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GEOS | |
87 | Group: Development/Languages/Python | |
88 | Requires: %{name} = %{version}-%{release} | |
89 | ||
90 | %description -n python-geos | |
91 | Python bindings for Geometry Engine - Open Source. | |
92 | ||
93 | %description -n python-geos -l pl.UTF-8 | |
94 | Wiązania Pythona do biblioteki GEOS. | |
95 | ||
96 | %package -n ruby-geos | |
97 | Summary: Ruby bindings for Geometry Engine - Open Source | |
98 | Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki GEOS | |
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 | ||
105 | %description -n ruby-geos -l pl.UTF-8 | |
106 | Wiązania języka Ruby do biblioteki GEOS. | |
107 | ||
108 | %prep | |
109 | %setup -q | |
110 | %patch0 -p1 | |
111 | %patch1 -p1 | |
112 | ||
113 | %build | |
114 | %{__aclocal} -I macros | |
115 | %{__autoconf} | |
116 | %{__autoheader} | |
117 | %{__automake} | |
118 | %configure \ | |
119 | %{?with_php:--enable-php} \ | |
120 | --enable-python \ | |
121 | %{?with_ruby:--enable-ruby} | |
122 | ||
123 | %{__make} \ | |
124 | pkglibdir=%{_libdir} | |
125 | ||
126 | ||
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %{__make} install \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | %if %{with php} | |
134 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
135 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/geos.ini | |
136 | ; Enable geos extension module | |
137 | extension=geos.so | |
138 | EOF | |
139 | %endif | |
140 | ||
141 | %{?with_ruby:%{__rm} $RPM_BUILD_ROOT%{ruby_vendorarchdir}/*.{la,a}} | |
142 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/geos/*.{la,a} | |
143 | ||
144 | %py_postclean | |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %post -p /sbin/ldconfig | |
150 | %postun -p /sbin/ldconfig | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
154 | %doc AUTHORS ChangeLog NEWS README TODO | |
155 | %attr(755,root,root) %{_libdir}/libgeos-*.so | |
156 | %attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.* | |
157 | %attr(755,root,root) %ghost %{_libdir}/libgeos_c.so.1 | |
158 | ||
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
161 | %attr(755,root,root) %{_bindir}/geos-config | |
162 | %attr(755,root,root) %{_libdir}/libgeos.so | |
163 | %attr(755,root,root) %{_libdir}/libgeos_c.so | |
164 | %{_libdir}/libgeos.la | |
165 | %{_libdir}/libgeos_c.la | |
166 | %{_includedir}/geos | |
167 | %{_includedir}/geos.h | |
168 | %{_includedir}/geos_c.h | |
169 | ||
170 | %files static | |
171 | %defattr(644,root,root,755) | |
172 | %{_libdir}/libgeos.a | |
173 | %{_libdir}/libgeos_c.a | |
174 | ||
175 | %if %{with php} | |
176 | %files -n php-geos | |
177 | %defattr(644,root,root,755) | |
178 | %doc php/{README,TODO} | |
179 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/geos.ini | |
180 | %attr(755,root,root) %{php_extensiondir}/geos.so | |
181 | %endif | |
182 | ||
183 | %files -n python-geos | |
184 | %defattr(644,root,root,755) | |
185 | %dir %{py_sitedir}/geos | |
186 | %attr(755,root,root) %{py_sitedir}/geos/_geos.so | |
187 | %{py_sitescriptdir}/geos | |
188 | %{py_sitescriptdir}/geos.pth | |
189 | ||
190 | %if %{with ruby} | |
191 | %files -n ruby-geos | |
192 | %defattr(644,root,root,755) | |
193 | %attr(755,root,root) %{ruby_vendorarchdir}/geos.so | |
194 | %endif |