1 # TODO: sfcgal support (sfcgal-config, >= 1.1.0)
2 %define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
5 %bcond_without raster # disable raster support
6 %bcond_without doc # HTML documentation
7 %bcond_without gui # data import GUI
9 Summary: Geographic Information Systems Extensions to PostgreSQL
10 Summary(pl.UTF-8): Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
16 Group: Applications/Databases
17 Source0: https://download.osgeo.org/postgis/source/%{name}-%{version}%{subver}.tar.gz
18 # Source0-md5: 725019e3a67ac52ccef4d00031cb0c77
19 Patch0: install-lwgeom.patch
20 URL: http://postgis.refractions.net/
21 %{?with_raster:BuildRequires: gdal-devel >= 1.8.0}
22 BuildRequires: geos-devel >= 3.5.0
23 BuildRequires: json-c-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: libxml2-devel >= 2.0
26 BuildRequires: pcre-devel
27 BuildRequires: perl-base
28 BuildRequires: postgresql-backend-devel >= 9.1
29 BuildRequires: postgresql-devel >= 9.1
30 BuildRequires: proj-devel >= 4.6.0
32 BuildRequires: ImageMagick
33 BuildRequires: docbook-style-xsl
34 BuildRequires: libxml2-progs
35 BuildRequires: libxslt-progs
36 # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
39 BuildRequires: gtk+2-devel >= 2:2.8.0
40 BuildRequires: pkgconfig
42 %{?with_raster:Requires: gdal >= 1.8.0}
43 Requires: liblwgeom = %{version}-%{release}
44 Requires: postgresql >= %{pg_version}
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define specflags_x86_64 -fPIC
49 # oh well... I also don't understand this... ;)
52 This package contains a module which implements GIS simple features,
53 ties the features to rtree indexing, and provides some spatial
54 functions for accessing and analyzing geographic data.
56 %description -l pl.UTF-8
57 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
58 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
62 Summary: Data import GUI for PostGIS
63 Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGIS-a
64 Group: X11/Applications
65 Requires: %{name} = %{version}-%{release}
66 Requires: gtk+2 >= 2:2.8.0
69 Data import GUI for PostGIS.
71 %description gui -l pl.UTF-8
72 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
75 Summary: lwgeom library (a part of PostGIS project)
76 Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS)
78 Requires: geos >= 3.5.0
79 Requires: proj >= 4.6.0
80 Conflicts: postgis < 2.0.0-2
82 %description -n liblwgeom
83 lwgeom library (a part of PostGIS project).
85 %description -n liblwgeom -l pl.UTF-8
86 Biblioteka lwgeom (część projektu PostGIS).
88 %package -n liblwgeom-devel
89 Summary: Header file for lwgeom library
90 Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom
91 Group: Development/Libraries
92 Requires: geos-devel >= 3.5.0
93 Requires: liblwgeom = %{version}-%{release}
94 Requires: proj-devel >= 4.6.0
96 %description -n liblwgeom-devel
97 Header file for lwgeom library.
99 %description -n liblwgeom-devel -l pl.UTF-8
100 Plik nagłówkowy biblioteki lwgeom.
102 %package -n liblwgeom-static
103 Summary: Static lwgeom library
104 Summary(pl.UTF-8): Statyczna biblioteka lwgeom
105 Group: Development/Libraries
106 Requires: liblwgeom-devel = %{version}-%{release}
108 %description -n liblwgeom-static
109 Static lwgeom library.
111 %description -n liblwgeom-static -l pl.UTF-8
112 Statyczna biblioteka lwgeom.
115 %setup -q -n %{name}-%{version}%{subver}
119 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
121 %{?with_gui:--with-gui} \
122 %{!?with_raster:--without-raster}
127 rm -rf $RPM_BUILD_ROOT
130 DESTDIR=$RPM_BUILD_ROOT
132 # Fix icons and desktop file locations
133 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
134 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
136 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40
139 rm -rf $RPM_BUILD_ROOT
141 %post -n liblwgeom -p /sbin/ldconfig
142 %postun -n liblwgeom -p /sbin/ldconfig
145 %defattr(644,root,root,755)
146 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
147 %attr(755,root,root) %{_bindir}/pgsql2shp
148 %attr(755,root,root) %{_bindir}/shp2pgsql
149 %attr(755,root,root) %{_libdir}/postgresql/postgis-3.so
150 %attr(755,root,root) %{_libdir}/postgresql/postgis_raster-3.so
151 %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-3.so
152 %{_datadir}/postgresql/contrib/postgis-3.0
154 %attr(755,root,root) %{_bindir}/raster2pgsql
155 %{_datadir}/postgresql/extension/postgis*.control
156 %{_datadir}/postgresql/extension/postgis*.sql
158 %{_libdir}/postgresql/address_standardizer-3.so
159 %{_datadir}/postgresql/extension/address_standardizer*.sql
160 %{_datadir}/postgresql/extension/address_standardizer*.control
161 %dir %{_libdir}/postgresql/bitcode
162 %{_libdir}/postgresql/bitcode/address_standardizer-3.index.bc
163 %dir %{_libdir}/postgresql/bitcode/address_standardizer-3/
164 %{_libdir}/postgresql/bitcode/address_standardizer-3/*.bc
165 %{_libdir}/postgresql/bitcode/postgis-3.index.bc
166 %dir %{_libdir}/postgresql/bitcode/postgis-3
167 %{_libdir}/postgresql/bitcode/postgis-3/*.bc
168 %{_libdir}/postgresql/bitcode/postgis_raster-3.index.bc
169 %dir %{_libdir}/postgresql/bitcode/postgis_raster-3
170 %{_libdir}/postgresql/bitcode/postgis_raster-3/*.bc
171 %{_libdir}/postgresql/bitcode/postgis_topology-3.index.bc
172 %dir %{_libdir}/postgresql/bitcode/postgis_topology-3
173 %{_libdir}/postgresql/bitcode/postgis_topology-3/*.bc
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
179 %{_desktopdir}/shp2pgsql-gui.desktop
180 %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/liblwgeom-3.0.so.*.*.*
186 %attr(755,root,root) %ghost %{_libdir}/liblwgeom-3.0.so.0
188 %files -n liblwgeom-devel
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_libdir}/liblwgeom.so
191 %{_libdir}/liblwgeom.la
192 %{_includedir}/liblwgeom.h
193 %{_includedir}/liblwgeom_topo.h
195 %files -n liblwgeom-static
196 %defattr(644,root,root,755)
197 %{_libdir}/liblwgeom.a