]> git.pld-linux.org Git - packages/libspatialite.git/blob - libspatialite.spec
725fb4f81ae61ff1c6ebdf945f1c036300371034
[packages/libspatialite.git] / libspatialite.spec
1 #
2 # Conditional build:
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 #
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
10 Version:        4.2.0
11 Release:        1
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
15 # Source0-md5:  83305ed694a77152120d1f74c5151779
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
20 %{?with_lwgeom:BuildRequires:   liblwgeom-devel}
21 %{?with_libxml2:BuildRequires:  libxml2-devel >= 2.0}
22 BuildRequires:  proj-devel >= 4
23 BuildRequires:  sqlite3-devel >= 3.7.3
24 BuildRequires:  zlib-devel
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
44 %{?with_lwgeom:Requires:        liblwgeom-devel}
45 %{?with_libxml2:Requires:       libxml2-devel >= 2.0}
46 Requires:       proj-devel >= 4
47 Requires:       sqlite3-devel >= 3.7.3
48 Requires:       zlib-devel
49
50 %description devel
51 Header files for spatialite library.
52
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki spatialite.
55
56 %package static
57 Summary:        Static spatialite library
58 Summary(pl.UTF-8):      Statyczna biblioteka spatialite
59 Group:          Development/Libraries
60 Requires:       %{name}-devel = %{version}-%{release}
61
62 %description static
63 Static spatialite library.
64
65 %description static -l pl.UTF-8
66 Statyczna biblioteka spatialite.
67
68 %package apidocs
69 Summary:        spatialite API documentation
70 Summary(pl.UTF-8):      Dokumentacja API biblioteki spatialite
71 Group:          Documentation
72
73 %description apidocs
74 API and internal documentation for spatialite library.
75
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API biblioteki spatialite.
78
79 %prep
80 %setup -q
81
82 %build
83 %configure \
84         --enable-geocallbacks \
85         --enable-geopackage \
86         %{?with_libxml2:--enable-libxml2} \
87         %{?with_lwgeom:--enable-lwgeom}
88
89 %{__make}
90
91 %{?with_apidocs:doxygen}
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %{__make} install \
97         DESTDIR=$RPM_BUILD_ROOT
98
99 # loadable module
100 %{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_spatialite.la
101 # obsoleted by pkg-config
102 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libspatialite.la
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post   -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS README
113 %attr(755,root,root) %{_libdir}/libspatialite.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libspatialite.so.7
115 # sqlite3 module
116 %attr(755,root,root) %{_libdir}/mod_spatialite.so*
117
118 %files devel
119 %defattr(644,root,root,755)
120 %attr(755,root,root) %{_libdir}/libspatialite.so
121 %{_includedir}/spatialite
122 %{_includedir}/spatialite.h
123 %{_pkgconfigdir}/spatialite.pc
124
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/libspatialite.a
128
129 %if %{with apidocs}
130 %files apidocs
131 %defattr(644,root,root,755)
132 %doc html/*
133 %endif
This page took 0.076487 seconds and 2 git commands to generate.