3 %bcond_without apidocs # do not build and package API docs
4 %bcond_without libxml2 # XML documents support
5 %bcond_without lwgeom # LWGEOM support
6 %bcond_with bootstrap # bootstrap without postgis dependency
12 Summary: Spatial SQL database engine based on SQLite
13 Summary(pl.UTF-8): Silnik przestrzennej bazy danych SQL oparty na SQLite
17 License: MPL v1.1 or GPL v2+ or LGPL v2.1+
19 Source0: http://www.gaia-gis.it/gaia-sins/libspatialite-sources/%{name}-%{version}.tar.gz
20 # Source0-md5: 6b380b332c00da6f76f432b10a1a338c
21 Patch0: %{name}-lwgeom.patch
22 URL: https://www.gaia-gis.it/fossil/libspatialite
23 %{?with_apidocs:BuildRequires: doxygen >= 1.7.3}
24 BuildRequires: freexl-devel >= 1.0.1
25 BuildRequires: geos-devel >= 3.4.0
26 %{?with_lwgeom:BuildRequires: liblwgeom-devel}
27 %{?with_libxml2:BuildRequires: libxml2-devel >= 2.0}
28 BuildRequires: proj-devel >= 4.8.0
29 BuildRequires: sqlite3-devel >= 3.7.3
30 BuildRequires: zlib-devel
31 Requires: freexl >= 1.0.1
32 Requires: geos >= 3.4.0
33 Requires: proj >= 4.8.0
34 Requires: sqlite3 >= 3.7.3
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Spatial SQL database engine based on SQLite.
40 %description -l pl.UTF-8
41 Silnik przestrzennej bazy danych SQL oparty na SQLite.
44 Summary: Header files for spatialite library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki spatialite
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: freexl-devel >= 1.0.1
49 Requires: geos-devel >= 3.4.0
50 %{?with_lwgeom:Requires: liblwgeom-devel}
51 %{?with_libxml2:Requires: libxml2-devel >= 2.0}
52 Requires: proj-devel >= 4.8.0
53 Requires: sqlite3-devel >= 3.7.3
57 Header files for spatialite library.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki spatialite.
63 Summary: Static spatialite library
64 Summary(pl.UTF-8): Statyczna biblioteka spatialite
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
69 Static spatialite library.
71 %description static -l pl.UTF-8
72 Statyczna biblioteka spatialite.
75 Summary: spatialite API documentation
76 Summary(pl.UTF-8): Dokumentacja API biblioteki spatialite
81 API and internal documentation for spatialite library.
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API biblioteki spatialite.
91 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
93 --enable-geocallbacks \
95 %{?with_libxml2:--enable-libxml2} \
96 %{?with_lwgeom:--enable-lwgeom}
100 %{?with_apidocs:doxygen}
103 rm -rf $RPM_BUILD_ROOT
106 DESTDIR=$RPM_BUILD_ROOT
109 %{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_spatialite.la
110 # obsoleted by pkg-config
111 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libspatialite.la
114 rm -rf $RPM_BUILD_ROOT
116 %post -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
120 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libspatialite.so.*.*.*
123 %attr(755,root,root) %ghost %{_libdir}/libspatialite.so.7
125 %attr(755,root,root) %{_libdir}/mod_spatialite.so*
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_libdir}/libspatialite.so
130 %{_includedir}/spatialite
131 %{_includedir}/spatialite.h
132 %{_pkgconfigdir}/spatialite.pc
135 %defattr(644,root,root,755)
136 %{_libdir}/libspatialite.a
140 %defattr(644,root,root,755)