1 # TODO: sfcgal support (sfcgal-config)
2 %define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
6 %bcond_without raster # disable raster support
7 %bcond_without doc # HTML documentation
8 %bcond_without gui # data import GUI
10 Summary: Geographic Information Systems Extensions to PostgreSQL
11 Summary(pl.UTF-8): Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
16 Group: Applications/Databases
17 Source0: http://download.osgeo.org/postgis/source/%{name}-%{version}%{beta}.tar.gz
18 # Source0-md5: f35307c201caf04e7028f95b649cf6e7
19 URL: http://postgis.refractions.net/
20 %{?with_raster:BuildRequires: gdal-devel >= 1.8.0}
21 BuildRequires: geos-devel >= 3.3.2
22 BuildRequires: json-c-devel
23 BuildRequires: libstdc++-devel
24 BuildRequires: libxml2-devel
25 BuildRequires: perl-base
26 BuildRequires: postgresql-backend-devel >= 9.0
27 BuildRequires: postgresql-devel >= 9.0
28 BuildRequires: proj-devel >= 4.6.0
30 BuildRequires: ImageMagick
31 BuildRequires: docbook-style-xsl
32 BuildRequires: libxml2-progs
33 BuildRequires: libxslt-progs
36 BuildRequires: gtk+2-devel >= 2:2.8.0
37 BuildRequires: pkgconfig
39 %{?with_raster:Requires: gdal >= 1.8.0}
40 Requires: liblwgeom = %{version}-%{release}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define specflags_x86_64 -fPIC
45 # oh well... I also don't understand this... ;)
48 This package contains a module which implements GIS simple features,
49 ties the features to rtree indexing, and provides some spatial
50 functions for accessing and analyzing geographic data.
52 %description -l pl.UTF-8
53 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
54 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
58 Summary: Data import GUI for PostGIS
59 Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGIS-a
60 Group: X11/Applications
61 Requires: %{name} = %{version}-%{release}
62 Requires: gtk+2 >= 2:2.8.0
65 Data import GUI for PostGIS.
67 %description gui -l pl.UTF-8
68 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
71 Summary: lwgeom library (a part of PostGIS project)
72 Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS)
74 Requires: geos >= 3.3.2
75 Requires: proj >= 4.6.0
76 Conflicts: postgis < 2.0.0-2
78 %description -n liblwgeom
79 lwgeom library (a part of PostGIS project).
81 %description -n liblwgeom -l pl.UTF-8
82 Biblioteka lwgeom (część projektu PostGIS).
84 %package -n liblwgeom-devel
85 Summary: Header file for lwgeom library
86 Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom
87 Group: Development/Libraries
88 Requires: geos-devel >= 3.3.2
89 Requires: liblwgeom = %{version}-%{release}
90 Requires: proj-devel >= 4.6.0
92 %description -n liblwgeom-devel
93 Header file for lwgeom library.
95 %description -n liblwgeom-devel -l pl.UTF-8
96 Plik nagłówkowy biblioteki lwgeom.
98 %package -n liblwgeom-static
99 Summary: Static lwgeom library
100 Summary(pl.UTF-8): Statyczna biblioteka lwgeom
101 Group: Development/Libraries
102 Requires: liblwgeom-devel = %{version}-%{release}
104 %description -n liblwgeom-static
105 Static lwgeom library.
107 %description -n liblwgeom-static -l pl.UTF-8
108 Statyczna biblioteka lwgeom.
111 %setup -q -n %{name}-%{version}%{beta}
116 --with-geos-libdir=/usr/%{_lib} \
117 %{?with_gui:--with-gui} \
119 --with-proj=%{_prefix} \
120 --with-proj-libdir=/usr/%{_lib} \
121 %{!?with_raster:--without-raster}
126 rm -rf $RPM_BUILD_ROOT
129 DESTDIR=$RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
134 %post -n liblwgeom -p /sbin/ldconfig
135 %postun -n liblwgeom -p /sbin/ldconfig
138 %defattr(644,root,root,755)
139 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
140 %attr(755,root,root) %{_bindir}/pgsql2shp
141 %attr(755,root,root) %{_bindir}/shp2pgsql
142 %attr(755,root,root) %{_libdir}/postgresql/postgis-2.1.so
143 %{_datadir}/postgresql/contrib/postgis-2.1
145 %attr(755,root,root) %{_bindir}/raster2pgsql
146 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.1.so
147 %{_datadir}/postgresql/extension/postgis*.control
148 %{_datadir}/postgresql/extension/postgis*.sql
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/liblwgeom-?.?.?.so
161 %files -n liblwgeom-devel
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/liblwgeom.so
164 %{_libdir}/liblwgeom.la
165 %{_includedir}/liblwgeom.h
167 %files -n liblwgeom-static
168 %defattr(644,root,root,755)
169 %{_libdir}/liblwgeom.a