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: 87608a7f01a50c5bae72a00ba3314e2d
19 URL: http://postgis.refractions.net/
20 %{?with_raster:BuildRequires: gdal-devel >= 1.8.0}
21 BuildRequires: geos-devel >= 3.5.0
22 BuildRequires: json-c-devel
23 BuildRequires: libstdc++-devel
24 BuildRequires: libxml2-devel >= 2.0
25 BuildRequires: pcre-devel
26 BuildRequires: perl-base
27 BuildRequires: postgresql-backend-devel >= 9.1
28 BuildRequires: postgresql-devel >= 9.1
29 BuildRequires: proj-devel >= 4.6.0
31 BuildRequires: ImageMagick
32 BuildRequires: docbook-style-xsl
33 BuildRequires: libxml2-progs
34 BuildRequires: libxslt-progs
35 # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
38 BuildRequires: gtk+2-devel >= 2:2.8.0
39 BuildRequires: pkgconfig
41 %{?with_raster:Requires: gdal >= 1.8.0}
42 Requires: liblwgeom = %{version}-%{release}
43 Requires: postgresql >= %{pg_version}
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define specflags_x86_64 -fPIC
48 # oh well... I also don't understand this... ;)
51 This package contains a module which implements GIS simple features,
52 ties the features to rtree indexing, and provides some spatial
53 functions for accessing and analyzing geographic data.
55 %description -l pl.UTF-8
56 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
57 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
61 Summary: Data import GUI for PostGIS
62 Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGIS-a
63 Group: X11/Applications
64 Requires: %{name} = %{version}-%{release}
65 Requires: gtk+2 >= 2:2.8.0
68 Data import GUI for PostGIS.
70 %description gui -l pl.UTF-8
71 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
74 Summary: lwgeom library (a part of PostGIS project)
75 Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS)
77 Requires: geos >= 3.5.0
78 Requires: proj >= 4.6.0
79 Conflicts: postgis < 2.0.0-2
81 %description -n liblwgeom
82 lwgeom library (a part of PostGIS project).
84 %description -n liblwgeom -l pl.UTF-8
85 Biblioteka lwgeom (część projektu PostGIS).
87 %package -n liblwgeom-devel
88 Summary: Header file for lwgeom library
89 Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom
90 Group: Development/Libraries
91 Requires: geos-devel >= 3.5.0
92 Requires: liblwgeom = %{version}-%{release}
93 Requires: proj-devel >= 4.6.0
95 %description -n liblwgeom-devel
96 Header file for lwgeom library.
98 %description -n liblwgeom-devel -l pl.UTF-8
99 Plik nagłówkowy biblioteki lwgeom.
101 %package -n liblwgeom-static
102 Summary: Static lwgeom library
103 Summary(pl.UTF-8): Statyczna biblioteka lwgeom
104 Group: Development/Libraries
105 Requires: liblwgeom-devel = %{version}-%{release}
107 %description -n liblwgeom-static
108 Static lwgeom library.
110 %description -n liblwgeom-static -l pl.UTF-8
111 Statyczna biblioteka lwgeom.
114 %setup -q -n %{name}-%{version}%{subver}
118 %{?with_gui:--with-gui} \
119 %{!?with_raster:--without-raster}
124 rm -rf $RPM_BUILD_ROOT
127 DESTDIR=$RPM_BUILD_ROOT
129 # Fix icons and desktop file locations
130 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
131 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
134 rm -rf $RPM_BUILD_ROOT
136 %post -n liblwgeom -p /sbin/ldconfig
137 %postun -n liblwgeom -p /sbin/ldconfig
140 %defattr(644,root,root,755)
141 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
142 %attr(755,root,root) %{_bindir}/pgsql2shp
143 %attr(755,root,root) %{_bindir}/shp2pgsql
144 %attr(755,root,root) %{_libdir}/postgresql/postgis-2.4.so
145 %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-2.4.so
146 %{_datadir}/postgresql/contrib/postgis-2.4
148 %attr(755,root,root) %{_bindir}/raster2pgsql
149 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.4.so
150 %{_datadir}/postgresql/extension/postgis*.control
151 %{_datadir}/postgresql/extension/postgis*.sql
153 %{_libdir}/postgresql/address_standardizer-2.4.so
154 %{_datadir}/postgresql/extension/address_standardizer*.sql
155 %{_datadir}/postgresql/extension/address_standardizer*.control
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
161 %{_desktopdir}/shp2pgsql-gui.desktop
162 %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/liblwgeom-2.4.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/liblwgeom-2.4.so.0
170 %files -n liblwgeom-devel
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/liblwgeom.so
173 %{_libdir}/liblwgeom.la
174 %{_includedir}/liblwgeom.h
175 %{_includedir}/liblwgeom_topo.h
177 %files -n liblwgeom-static
178 %defattr(644,root,root,755)
179 %{_libdir}/liblwgeom.a