1 %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
15 Group: Applications/Databases
16 Source0: http://download.osgeo.org/postgis/source/%{name}-%{version}%{beta}.tar.gz
17 # Source0-md5: 9d9dc316f7d68dacd242cac6c305fe65
18 URL: http://postgis.refractions.net/
19 %{?with_raster:BuildRequires: gdal-devel >= 1.6.0}
20 BuildRequires: geos-devel >= 3.3.2
21 BuildRequires: json-c-devel
22 BuildRequires: libstdc++-devel
23 BuildRequires: libxml2-devel
24 BuildRequires: perl-base
25 BuildRequires: postgresql-backend-devel >= 8.3
26 BuildRequires: postgresql-devel >= 8.3
27 BuildRequires: proj-devel >= 4.5.0
29 BuildRequires: ImageMagick
30 BuildRequires: docbook-style-xsl
31 BuildRequires: libxml2-progs
32 BuildRequires: libxslt-progs
35 BuildRequires: gtk+2-devel >= 2:2.8.0
36 BuildRequires: pkgconfig
38 %{?with_raster:Requires: gdal >= 1.6.0}
39 Requires: liblwgeom = %{version}-%{release}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define specflags_x86_64 -fPIC
44 # oh well... I also don't understand this... ;)
47 This package contains a module which implements GIS simple features,
48 ties the features to rtree indexing, and provides some spatial
49 functions for accessing and analyzing geographic data.
51 %description -l pl.UTF-8
52 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
53 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
57 Summary: Data import GUI for PostGIS
58 Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGIS-a
59 Group: X11/Applications
60 Requires: %{name} = %{version}-%{release}
61 Requires: gtk+2 >= 2:2.8.0
64 Data import GUI for PostGIS.
66 %description gui -l pl.UTF-8
67 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
70 Summary: lwgeom library (a part of PostGIS project)
71 Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS)
73 Requires: geos >= 3.3.2
74 Requires: proj >= 4.5.0
75 Conflicts: postgis < 2.0.0-2
77 %description -n liblwgeom
78 lwgeom library (a part of PostGIS project).
80 %description -n liblwgeom -l pl.UTF-8
81 Biblioteka lwgeom (część projektu PostGIS).
83 %package -n liblwgeom-devel
84 Summary: Header file for lwgeom library
85 Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom
86 Group: Development/Libraries
87 Requires: geos-devel >= 3.3.2
88 Requires: liblwgeom = %{version}-%{release}
89 Requires: proj-devel >= 4.5.0
91 %description -n liblwgeom-devel
92 Header file for lwgeom library.
94 %description -n liblwgeom-devel -l pl.UTF-8
95 Plik nagłówkowy biblioteki lwgeom.
97 %package -n liblwgeom-static
98 Summary: Static lwgeom library
99 Summary(pl.UTF-8): Statyczna biblioteka lwgeom
100 Group: Development/Libraries
101 Requires: liblwgeom-devel = %{version}-%{release}
103 %description -n liblwgeom-static
104 Static lwgeom library.
106 %description -n liblwgeom-static -l pl.UTF-8
107 Statyczna biblioteka lwgeom.
110 %setup -q -n %{name}-%{version}%{beta}
115 --with-geos-libdir=/usr/%{_lib} \
116 %{?with_gui:--with-gui} \
118 --with-proj=%{_prefix} \
119 --with-proj-libdir=/usr/%{_lib} \
120 %{!?with_raster:--without-raster}
125 rm -rf $RPM_BUILD_ROOT
128 DESTDIR=$RPM_BUILD_ROOT
131 rm -rf $RPM_BUILD_ROOT
133 %post -n liblwgeom -p /sbin/ldconfig
134 %postun -n liblwgeom -p /sbin/ldconfig
137 %defattr(644,root,root,755)
138 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
139 %attr(755,root,root) %{_bindir}/pgsql2shp
140 %attr(755,root,root) %{_bindir}/shp2pgsql
141 %attr(755,root,root) %{_libdir}/postgresql/postgis-2.1.so
142 %{_datadir}/postgresql/contrib/postgis-2.1
144 %attr(755,root,root) %{_bindir}/raster2pgsql
145 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.1.so
146 %{_datadir}/postgresql/extension/postgis*.control
147 %{_datadir}/postgresql/extension/postgis*.sql
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/liblwgeom-?.?.?.so
160 %files -n liblwgeom-devel
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/liblwgeom.so
163 %{_libdir}/liblwgeom.la
164 %{_includedir}/liblwgeom.h
166 %files -n liblwgeom-static
167 %defattr(644,root,root,755)
168 %{_libdir}/liblwgeom.a