]>
Commit | Line | Data |
---|---|---|
fbaa7440 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4590b7a1 JB |
4 | %bcond_without libxml2 # XML documents support |
5 | %bcond_without lwgeom # LWGEOM support | |
fbaa7440 JB |
6 | # |
7 | Summary: Spatial SQL database engine based on SQLite | |
8 | Summary(pl.UTF-8): Silnik przestrzennej bazy danych SQL oparty na SQLite | |
9 | Name: libspatialite | |
e50f9b1d JB |
10 | Version: 4.1.1 |
11 | Release: 1 | |
fbaa7440 JB |
12 | License: MPL v1.1 or GPL v2+ or LGPL v2.1+ |
13 | Group: Libraries | |
14 | Source0: http://www.gaia-gis.it/gaia-sins/libspatialite-sources/%{name}-%{version}.tar.gz | |
e50f9b1d | 15 | # Source0-md5: 356e0b18de0d382e27da578dc227a7b0 |
fbaa7440 JB |
16 | URL: https://www.gaia-gis.it/fossil/libspatialite |
17 | %{?with_apidocs:BuildRequires: doxygen >= 1.7.3} | |
18 | BuildRequires: freexl-devel >= 0.0.4 | |
19 | BuildRequires: geos-devel >= 3.3.0 | |
4590b7a1 JB |
20 | %{?with_lwgeom:BuildRequires: liblwgeom-devel} |
21 | %{?with_libxml2:BuildRequires: libxml2-devel >= 2.0} | |
fbaa7440 JB |
22 | BuildRequires: proj-devel >= 4 |
23 | BuildRequires: sqlite3-devel >= 3.7.3 | |
4590b7a1 | 24 | BuildRequires: zlib-devel |
fbaa7440 JB |
25 | Requires: freexl >= 0.0.4 |
26 | Requires: geos >= 3.3.0 | |
27 | Requires: proj >= 4 | |
28 | Requires: sqlite3 >= 3.7.3 | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Spatial SQL database engine based on SQLite. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Silnik przestrzennej bazy danych SQL oparty na SQLite. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for spatialite library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki spatialite | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | Requires: freexl-devel >= 0.0.4 | |
43 | Requires: geos-devel >= 3.3.0 | |
4590b7a1 JB |
44 | %{?with_lwgeom:Requires: liblwgeom-devel} |
45 | %{?with_libxml2:Requires: libxml2-devel >= 2.0} | |
fbaa7440 JB |
46 | Requires: proj-devel >= 4 |
47 | Requires: sqlite3-devel >= 3.7.3 | |
48 | ||
49 | %description devel | |
50 | Header files for spatialite library. | |
51 | ||
52 | %description devel -l pl.UTF-8 | |
53 | Pliki nagłówkowe biblioteki spatialite. | |
54 | ||
55 | %package static | |
56 | Summary: Static spatialite library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka spatialite | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static spatialite library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka spatialite. | |
66 | ||
67 | %package apidocs | |
68 | Summary: spatialite API documentation | |
69 | Summary(pl.UTF-8): Dokumentacja API biblioteki spatialite | |
70 | Group: Documentation | |
71 | ||
72 | %description apidocs | |
73 | API and internal documentation for spatialite library. | |
74 | ||
75 | %description apidocs -l pl.UTF-8 | |
76 | Dokumentacja API biblioteki spatialite. | |
77 | ||
78 | %prep | |
79 | %setup -q | |
80 | ||
81 | %build | |
c1129f62 | 82 | %configure \ |
4590b7a1 JB |
83 | --enable-geocallbacks \ |
84 | --enable-geopackage \ | |
85 | %{?with_libxml2:--enable-libxml2} \ | |
86 | %{?with_lwgeom:--enable-lwgeom} | |
fbaa7440 JB |
87 | |
88 | %{__make} | |
89 | ||
90 | %{?with_apidocs:doxygen} | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %{__make} install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
98 | # obsoleted by pkg-config | |
99 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libspatialite.la | |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post -p /sbin/ldconfig | |
105 | %postun -p /sbin/ldconfig | |
106 | ||
107 | %files | |
108 | %defattr(644,root,root,755) | |
109 | %doc AUTHORS | |
110 | %attr(755,root,root) %{_libdir}/libspatialite.so.*.*.* | |
c1129f62 | 111 | %attr(755,root,root) %ghost %{_libdir}/libspatialite.so.5 |
fbaa7440 JB |
112 | |
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
115 | %attr(755,root,root) %{_libdir}/libspatialite.so | |
116 | %{_includedir}/spatialite | |
117 | %{_includedir}/spatialite.h | |
118 | %{_pkgconfigdir}/spatialite.pc | |
119 | ||
120 | %files static | |
121 | %defattr(644,root,root,755) | |
122 | %{_libdir}/libspatialite.a | |
123 | ||
124 | %if %{with apidocs} | |
125 | %files apidocs | |
126 | %defattr(644,root,root,755) | |
127 | %doc html/* | |
128 | %endif |