]> git.pld-linux.org Git - SPECS.git/blob - libspatialite.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / libspatialite.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  libxml2         # XML documents support
5
6 Summary:        Spatial SQL database engine based on SQLite
7 Summary(pl.UTF-8):      Silnik przestrzennej bazy danych SQL oparty na SQLite
8 Name:           libspatialite
9 Version:        5.0.1
10 Release:        1
11 # libspatialite itself is MPL v1.1 or GPL v2+ or LGPL v2.1+, but gcp and rttopo features enforce GPL
12 License:        GPL v2+
13 Group:          Libraries
14 Source0:        http://www.gaia-gis.it/gaia-sins/libspatialite-sources/%{name}-%{version}.tar.gz
15 # Source0-md5:  5f4a961afbb95dcdc715b5d7f8590573
16 URL:            https://www.gaia-gis.it/fossil/libspatialite
17 %{?with_apidocs:BuildRequires:  doxygen >= 1.7.3}
18 BuildRequires:  freexl-devel >= 1.0.1
19 BuildRequires:  geos-devel >= 3.7.0
20 BuildRequires:  librttopo-devel >= 1.1.0
21 %{?with_libxml2:BuildRequires:  libxml2-devel >= 2.0}
22 BuildRequires:  minizip-devel
23 BuildRequires:  proj-devel >= 4.8.0
24 BuildRequires:  rpm-build >= 4.6
25 BuildRequires:  sqlite3-devel >= 3.8.5
26 BuildRequires:  zlib-devel
27 Requires:       freexl >= 1.0.1
28 Requires:       geos >= 3.7.0
29 Requires:       librttopo >= 1.1.0
30 Requires:       proj >= 4.8.0
31 Requires:       sqlite3 >= 3.8.5
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Spatial SQL database engine based on SQLite.
36
37 %description -l pl.UTF-8
38 Silnik przestrzennej bazy danych SQL oparty na SQLite.
39
40 %package devel
41 Summary:        Header files for spatialite library
42 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki spatialite
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}-%{release}
45 Requires:       freexl-devel >= 1.0.1
46 Requires:       geos-devel >= 3.7.0
47 Requires:       librttopo-devel >= 1.1.0
48 %{?with_libxml2:Requires:       libxml2-devel >= 2.0}
49 Requires:       minizip-devel
50 Requires:       proj-devel >= 4.8.0
51 Requires:       sqlite3-devel >= 3.8.5
52 Requires:       zlib-devel
53
54 %description devel
55 Header files for spatialite library.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki spatialite.
59
60 %package static
61 Summary:        Static spatialite library
62 Summary(pl.UTF-8):      Statyczna biblioteka spatialite
63 Group:          Development/Libraries
64 Requires:       %{name}-devel = %{version}-%{release}
65
66 %description static
67 Static spatialite library.
68
69 %description static -l pl.UTF-8
70 Statyczna biblioteka spatialite.
71
72 %package apidocs
73 Summary:        spatialite API documentation
74 Summary(pl.UTF-8):      Dokumentacja API biblioteki spatialite
75 Group:          Documentation
76 BuildArch:      noarch
77
78 %description apidocs
79 API and internal documentation for spatialite library.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API biblioteki spatialite.
83
84 %prep
85 %setup -q
86
87 %build
88 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
89 %configure \
90         --enable-geocallbacks \
91         --enable-geopackage \
92         %{!?with_libxml2:--disable-libxml2}
93
94 %{__make}
95
96 %{?with_apidocs:doxygen}
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 # loadable module
105 %{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_spatialite.la
106 # obsoleted by pkg-config
107 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libspatialite.la
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post   -p /sbin/ldconfig
113 %postun -p /sbin/ldconfig
114
115 %files
116 %defattr(644,root,root,755)
117 %doc AUTHORS README
118 %attr(755,root,root) %{_libdir}/libspatialite.so.*.*.*
119 %attr(755,root,root) %ghost %{_libdir}/libspatialite.so.7
120 # sqlite3 module
121 %attr(755,root,root) %{_libdir}/mod_spatialite.so*
122
123 %files devel
124 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libspatialite.so
126 %{_includedir}/spatialite
127 %{_includedir}/spatialite.h
128 %{_pkgconfigdir}/spatialite.pc
129
130 %files static
131 %defattr(644,root,root,755)
132 %{_libdir}/libspatialite.a
133
134 %if %{with apidocs}
135 %files apidocs
136 %defattr(644,root,root,755)
137 %doc html/{search,*.css,*.html,*.js,*.png}
138 %endif
This page took 0.603405 seconds and 3 git commands to generate.