]> git.pld-linux.org Git - packages/libspatialite.git/blob - libspatialite.spec
6d4a08777604c1ce57dc2934348fada3a1f8f59e
[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 %bcond_with     bootstrap       # bootstrap without postgis dependency
7
8 %if %{with bootstrap}
9 %undefine       with_lwgeom
10 %endif
11
12 Summary:        Spatial SQL database engine based on SQLite
13 Summary(pl.UTF-8):      Silnik przestrzennej bazy danych SQL oparty na SQLite
14 Name:           libspatialite
15 Version:        4.3.0a
16 Release:        10
17 License:        MPL v1.1 or GPL v2+ or LGPL v2.1+
18 Group:          Libraries
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)
36
37 %description
38 Spatial SQL database engine based on SQLite.
39
40 %description -l pl.UTF-8
41 Silnik przestrzennej bazy danych SQL oparty na SQLite.
42
43 %package devel
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
54 Requires:       zlib-devel
55
56 %description devel
57 Header files for spatialite library.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki spatialite.
61
62 %package static
63 Summary:        Static spatialite library
64 Summary(pl.UTF-8):      Statyczna biblioteka spatialite
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}-%{release}
67
68 %description static
69 Static spatialite library.
70
71 %description static -l pl.UTF-8
72 Statyczna biblioteka spatialite.
73
74 %package apidocs
75 Summary:        spatialite API documentation
76 Summary(pl.UTF-8):      Dokumentacja API biblioteki spatialite
77 Group:          Documentation
78 BuildArch:      noarch
79
80 %description apidocs
81 API and internal documentation for spatialite library.
82
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API biblioteki spatialite.
85
86 %prep
87 %setup -q
88 %patch0 -p1
89
90 %build
91 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
92 %configure \
93         --enable-geocallbacks \
94         --enable-geopackage \
95         %{?with_libxml2:--enable-libxml2} \
96         %{?with_lwgeom:--enable-lwgeom}
97
98 %{__make}
99
100 %{?with_apidocs:doxygen}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %{__make} install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 # loadable module
109 %{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_spatialite.la
110 # obsoleted by pkg-config
111 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libspatialite.la
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %post   -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
118
119 %files
120 %defattr(644,root,root,755)
121 %doc AUTHORS README
122 %attr(755,root,root) %{_libdir}/libspatialite.so.*.*.*
123 %attr(755,root,root) %ghost %{_libdir}/libspatialite.so.7
124 # sqlite3 module
125 %attr(755,root,root) %{_libdir}/mod_spatialite.so*
126
127 %files devel
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
133
134 %files static
135 %defattr(644,root,root,755)
136 %{_libdir}/libspatialite.a
137
138 %if %{with apidocs}
139 %files apidocs
140 %defattr(644,root,root,755)
141 %doc html/*
142 %endif
This page took 0.134815 seconds and 2 git commands to generate.