]> git.pld-linux.org Git - packages/postgis.git/blob - postgis.spec
- updated to 3.3.2 (new liblwgeom soname)
[packages/postgis.git] / postgis.spec
1 # TODO: sfcgal support (sfcgal-config, >= 1.3.1)
2 # xml2pot for translations
3 %define pg_version      %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
4 #
5 # Conditional build:
6 %bcond_without  raster  # disable raster support
7 %bcond_without  doc     # HTML documentation
8 %bcond_without  gui     # data import GUI
9 #
10 Summary:        Geographic Information Systems Extensions to PostgreSQL
11 Summary(pl.UTF-8):      Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
12 Name:           postgis
13 Version:        3.3.2
14 Release:        1
15 License:        GPL v2+
16 Group:          Applications/Databases
17 Source0:        https://download.osgeo.org/postgis/source/%{name}-%{version}.tar.gz
18 # Source0-md5:  bf93409054c46c6306f9991989214e8d
19 Patch0:         install-lwgeom.patch
20 URL:            http://postgis.refractions.net/
21 BuildRequires:  bison
22 BuildRequires:  clang
23 BuildRequires:  flex
24 %{?with_raster:BuildRequires:   gdal-devel >= 2.0.0}
25 BuildRequires:  geos-devel >= 3.6.0
26 BuildRequires:  json-c-devel
27 BuildRequires:  libstdc++-devel >= 6:4.7
28 BuildRequires:  libxml2-devel >= 2.0
29 BuildRequires:  pcre2-8-devel
30 BuildRequires:  perl-base
31 BuildRequires:  pkgconfig
32 BuildRequires:  postgresql-backend-devel >= 11
33 BuildRequires:  postgresql-devel >= 11
34 BuildRequires:  proj-devel >= 4.9.0
35 BuildRequires:  protobuf-c-devel >= 1.1.0
36 %if %{with doc}
37 BuildRequires:  ImageMagick
38 BuildRequires:  docbook-style-xsl
39 BuildRequires:  libxml2-progs
40 BuildRequires:  libxslt-progs
41 # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
42 %endif
43 %if %{with gui}
44 BuildRequires:  gtk+2-devel >= 2:2.8.0
45 BuildRequires:  pkgconfig
46 %endif
47 %{?with_raster:Requires:        gdal >= 2.0.0}
48 Requires:       liblwgeom = %{version}-%{release}
49 Requires:       postgresql >= %{pg_version}
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         specflags_x86_64        -fPIC
53
54 # clang can't parse this
55 %define         filterout               -fvar-tracking-assignments
56
57 # oh well... I also don't understand this... ;)
58
59 %description
60 This package contains a module which implements GIS simple features,
61 ties the features to rtree indexing, and provides some spatial
62 functions for accessing and analyzing geographic data.
63
64 %description -l pl.UTF-8
65 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
66 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
67 geograficznych.
68
69 %package gui
70 Summary:        Data import GUI for PostGIS
71 Summary(pl.UTF-8):      Graficzny interfejs użytkownika importujący dane dla PostGIS-a
72 Group:          X11/Applications
73 Requires:       %{name} = %{version}-%{release}
74 Requires:       gtk+2 >= 2:2.8.0
75
76 %description gui
77 Data import GUI for PostGIS.
78
79 %description gui -l pl.UTF-8
80 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
81
82 %package -n liblwgeom
83 Summary:        lwgeom library (a part of PostGIS project)
84 Summary(pl.UTF-8):      Biblioteka lwgeom (część projektu PostGIS)
85 Group:          Libraries
86 Requires:       geos >= 3.6.0
87 Requires:       proj >= 4.9.0
88 Conflicts:      postgis < 2.0.0-2
89
90 %description -n liblwgeom
91 lwgeom library (a part of PostGIS project).
92
93 %description -n liblwgeom -l pl.UTF-8
94 Biblioteka lwgeom (część projektu PostGIS).
95
96 %package -n liblwgeom-devel
97 Summary:        Header file for lwgeom library
98 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki lwgeom
99 Group:          Development/Libraries
100 Requires:       geos-devel >= 3.6.0
101 Requires:       liblwgeom = %{version}-%{release}
102 Requires:       proj-devel >= 4.9.0
103
104 %description -n liblwgeom-devel
105 Header file for lwgeom library.
106
107 %description -n liblwgeom-devel -l pl.UTF-8
108 Plik nagłówkowy biblioteki lwgeom.
109
110 %package -n liblwgeom-static
111 Summary:        Static lwgeom library
112 Summary(pl.UTF-8):      Statyczna biblioteka lwgeom
113 Group:          Development/Libraries
114 Requires:       liblwgeom-devel = %{version}-%{release}
115
116 %description -n liblwgeom-static
117 Static lwgeom library.
118
119 %description -n liblwgeom-static -l pl.UTF-8
120 Statyczna biblioteka lwgeom.
121
122 %prep
123 %setup -q
124 %patch0 -p1
125
126 %build
127 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
128 %configure \
129         %{?with_gui:--with-gui} \
130         %{!?with_raster:--without-raster}
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136
137 %{__make} install \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 %{__sed} -e '/#include .*/d' postgis_config.h > $RPM_BUILD_ROOT%{_includedir}/postgis_config.h
141 %{__sed} -i -e 's/#include.*postgis_config.*/#include "postgis_config.h"/' $RPM_BUILD_ROOT%{_includedir}/liblwgeom.h
142
143 # Fix icons and desktop file locations
144 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
145 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
146
147 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %post   -n liblwgeom -p /sbin/ldconfig
153 %postun -n liblwgeom -p /sbin/ldconfig
154
155 %files
156 %defattr(644,root,root,755)
157 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
158 %attr(755,root,root) %{_bindir}/pgsql2shp
159 %attr(755,root,root) %{_bindir}/pgtopo_export
160 %attr(755,root,root) %{_bindir}/pgtopo_import
161 %attr(755,root,root) %{_bindir}/shp2pgsql
162 %attr(755,root,root) %{_libdir}/postgresql/address_standardizer-3.so
163 %attr(755,root,root) %{_libdir}/postgresql/postgis-3.so
164 %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-3.so
165 %dir %{_libdir}/postgresql/bitcode
166 %{_libdir}/postgresql/bitcode/address_standardizer-3.index.bc
167 %dir %{_libdir}/postgresql/bitcode/address_standardizer-3
168 %{_libdir}/postgresql/bitcode/address_standardizer-3/*.bc
169 %{_libdir}/postgresql/bitcode/postgis-3.index.bc
170 %dir %{_libdir}/postgresql/bitcode/postgis-3
171 %{_libdir}/postgresql/bitcode/postgis-3/*.bc
172 %{_libdir}/postgresql/bitcode/postgis_topology-3.index.bc
173 %dir %{_libdir}/postgresql/bitcode/postgis_topology-3
174 %{_libdir}/postgresql/bitcode/postgis_topology-3/*.bc
175 %{_datadir}/postgresql/contrib/postgis-3.3
176 %{_datadir}/postgresql/extension/address_standardizer*.sql
177 %{_datadir}/postgresql/extension/address_standardizer*.control
178 %{_datadir}/postgresql/extension/postgis*.control
179 %{_datadir}/postgresql/extension/postgis*.sql
180 %if %{with raster}
181 %attr(755,root,root) %{_bindir}/raster2pgsql
182 %attr(755,root,root) %{_libdir}/postgresql/postgis_raster-3.so
183 %{_libdir}/postgresql/bitcode/postgis_raster-3.index.bc
184 %dir %{_libdir}/postgresql/bitcode/postgis_raster-3
185 %{_libdir}/postgresql/bitcode/postgis_raster-3/*.bc
186 %endif
187
188 %if %{with gui}
189 %files gui
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
192 %{_desktopdir}/shp2pgsql-gui.desktop
193 %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
194 %endif
195
196 %files -n liblwgeom
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/liblwgeom-3.3.so.*.*.*
199 %attr(755,root,root) %ghost %{_libdir}/liblwgeom-3.3.so.0
200
201 %files -n liblwgeom-devel
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_libdir}/liblwgeom.so
204 %{_libdir}/liblwgeom.la
205 %{_includedir}/liblwgeom.h
206 %{_includedir}/liblwgeom_topo.h
207 %{_includedir}/lwinline.h
208 %{_includedir}/postgis_config.h
209
210 %files -n liblwgeom-static
211 %defattr(644,root,root,755)
212 %{_libdir}/liblwgeom.a
This page took 0.076633 seconds and 3 git commands to generate.