]>
Commit | Line | Data |
---|---|---|
32e16a3a | 1 | %define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel) |
f2588acb | 2 | %define beta %{nil} |
7045685f | 3 | # |
fc587bde | 4 | # Conditional build: |
7045685f JB |
5 | %bcond_without raster # disable raster support |
6 | %bcond_without doc # HTML documentation | |
7 | %bcond_without gui # data import GUI | |
8 | # | |
32e16a3a | 9 | Summary: Geographic Information Systems Extensions to PostgreSQL |
11d12754 | 10 | Summary(pl.UTF-8): Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne |
32e16a3a | 11 | Name: postgis |
7d744938 | 12 | Version: 2.1.3 |
9d5295c5 | 13 | Release: 4 |
4203f720 | 14 | License: GPL v2+ |
32e16a3a | 15 | Group: Applications/Databases |
6157b8c2 | 16 | Source0: http://download.osgeo.org/postgis/source/%{name}-%{version}%{beta}.tar.gz |
7d744938 | 17 | # Source0-md5: 104e4468429ea0882259fc268c62d6c7 |
83cabce9 | 18 | Patch0: json-c-0.12.patch |
32e16a3a | 19 | URL: http://postgis.refractions.net/ |
fc587bde | 20 | %{?with_raster:BuildRequires: gdal-devel >= 1.6.0} |
83cabce9 | 21 | BuildRequires: gdal-devel |
8455414f | 22 | BuildRequires: geos-devel >= 3.3.2 |
7045685f JB |
23 | BuildRequires: json-c-devel |
24 | BuildRequires: libstdc++-devel | |
def64c02 | 25 | BuildRequires: libxml2-devel |
a6fb65b0 | 26 | BuildRequires: perl-base |
7045685f JB |
27 | BuildRequires: postgresql-backend-devel >= 8.3 |
28 | BuildRequires: postgresql-devel >= 8.3 | |
29 | BuildRequires: proj-devel >= 4.5.0 | |
30 | %if %{with doc} | |
31 | BuildRequires: ImageMagick | |
32 | BuildRequires: docbook-style-xsl | |
33 | BuildRequires: libxml2-progs | |
34 | BuildRequires: libxslt-progs | |
35 | %endif | |
36 | %if %{with gui} | |
37 | BuildRequires: gtk+2-devel >= 2:2.8.0 | |
38 | BuildRequires: pkgconfig | |
39 | %endif | |
92489202 | 40 | %{?with_raster:Requires: gdal >= 1.6.0} |
7045685f | 41 | Requires: liblwgeom = %{version}-%{release} |
32e16a3a MM |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
def64c02 | 44 | %define specflags_x86_64 -fPIC |
45 | ||
32e16a3a MM |
46 | # oh well... I also don't understand this... ;) |
47 | ||
48 | %description | |
49 | This package contains a module which implements GIS simple features, | |
50 | ties the features to rtree indexing, and provides some spatial | |
51 | functions for accessing and analyzing geographic data. | |
52 | ||
c7a5e637 JR |
53 | %description -l pl.UTF-8 |
54 | Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z | |
55 | indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych | |
32e16a3a MM |
56 | geograficznych. |
57 | ||
7045685f JB |
58 | %package gui |
59 | Summary: Data import GUI for PostGIS | |
60 | Summary(pl.UTF-8): Graficzny interfejs użytkownika importujący dane dla PostGIS-a | |
61 | Group: X11/Applications | |
62 | Requires: %{name} = %{version}-%{release} | |
fc59c3d1 | 63 | Requires: gtk+2 >= 2:2.8.0 |
7045685f JB |
64 | |
65 | %description gui | |
66 | Data import GUI for PostGIS. | |
67 | ||
68 | %description gui -l pl.UTF-8 | |
69 | Graficzny interfejs użytkownika importujący dane dla PostGIS-a. | |
70 | ||
71 | %package -n liblwgeom | |
72 | Summary: lwgeom library (a part of PostGIS project) | |
73 | Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS) | |
74 | Group: Libraries | |
8455414f | 75 | Requires: geos >= 3.3.2 |
7045685f JB |
76 | Requires: proj >= 4.5.0 |
77 | Conflicts: postgis < 2.0.0-2 | |
78 | ||
79 | %description -n liblwgeom | |
80 | lwgeom library (a part of PostGIS project). | |
81 | ||
82 | %description -n liblwgeom -l pl.UTF-8 | |
83 | Biblioteka lwgeom (część projektu PostGIS). | |
84 | ||
85 | %package -n liblwgeom-devel | |
86 | Summary: Header file for lwgeom library | |
87 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki lwgeom | |
88 | Group: Development/Libraries | |
8455414f | 89 | Requires: geos-devel >= 3.3.2 |
7045685f JB |
90 | Requires: liblwgeom = %{version}-%{release} |
91 | Requires: proj-devel >= 4.5.0 | |
92 | ||
93 | %description -n liblwgeom-devel | |
94 | Header file for lwgeom library. | |
95 | ||
96 | %description -n liblwgeom-devel -l pl.UTF-8 | |
97 | Plik nagłówkowy biblioteki lwgeom. | |
98 | ||
99 | %package -n liblwgeom-static | |
100 | Summary: Static lwgeom library | |
101 | Summary(pl.UTF-8): Statyczna biblioteka lwgeom | |
102 | Group: Development/Libraries | |
103 | Requires: liblwgeom-devel = %{version}-%{release} | |
104 | ||
105 | %description -n liblwgeom-static | |
106 | Static lwgeom library. | |
107 | ||
108 | %description -n liblwgeom-static -l pl.UTF-8 | |
109 | Statyczna biblioteka lwgeom. | |
110 | ||
32e16a3a | 111 | %prep |
7045685f | 112 | %setup -q -n %{name}-%{version}%{beta} |
83cabce9 | 113 | %patch0 -p1 |
32e16a3a MM |
114 | |
115 | %build | |
81e2cdad | 116 | %configure \ |
117 | --with-geos \ | |
9dd90af9 | 118 | --with-geos-libdir=/usr/%{_lib} \ |
7045685f | 119 | %{?with_gui:--with-gui} \ |
81e2cdad | 120 | --with-pgsql \ |
42e18f0f | 121 | --with-proj=%{_prefix} \ |
fc587bde | 122 | --with-proj-libdir=/usr/%{_lib} \ |
123 | %{!?with_raster:--without-raster} | |
9dd90af9 | 124 | |
da374675 | 125 | %{__make} |
32e16a3a MM |
126 | |
127 | %install | |
128 | rm -rf $RPM_BUILD_ROOT | |
1393aae1 | 129 | |
7045685f JB |
130 | %{__make} install \ |
131 | DESTDIR=$RPM_BUILD_ROOT | |
1393aae1 | 132 | |
32e16a3a MM |
133 | %clean |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
7045685f JB |
136 | %post -n liblwgeom -p /sbin/ldconfig |
137 | %postun -n liblwgeom -p /sbin/ldconfig | |
138 | ||
32e16a3a MM |
139 | %files |
140 | %defattr(644,root,root,755) | |
92489202 | 141 | %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html} |
7045685f JB |
142 | %attr(755,root,root) %{_bindir}/pgsql2shp |
143 | %attr(755,root,root) %{_bindir}/shp2pgsql | |
94b1d95e | 144 | %attr(755,root,root) %{_libdir}/postgresql/postgis-2.1.so |
145 | %{_datadir}/postgresql/contrib/postgis-2.1 | |
7045685f JB |
146 | %if %{with raster} |
147 | %attr(755,root,root) %{_bindir}/raster2pgsql | |
94b1d95e | 148 | %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.1.so |
7045685f JB |
149 | %{_datadir}/postgresql/extension/postgis*.control |
150 | %{_datadir}/postgresql/extension/postgis*.sql | |
151 | %endif | |
152 | ||
153 | %if %{with gui} | |
154 | %files gui | |
155 | %defattr(644,root,root,755) | |
156 | %attr(755,root,root) %{_bindir}/shp2pgsql-gui | |
157 | %endif | |
158 | ||
159 | %files -n liblwgeom | |
160 | %defattr(644,root,root,755) | |
fdd6c2b3 | 161 | %attr(755,root,root) %{_libdir}/liblwgeom-?.?.?.so |
7045685f JB |
162 | |
163 | %files -n liblwgeom-devel | |
164 | %defattr(644,root,root,755) | |
165 | %attr(755,root,root) %{_libdir}/liblwgeom.so | |
166 | %{_libdir}/liblwgeom.la | |
167 | %{_includedir}/liblwgeom.h | |
168 | ||
169 | %files -n liblwgeom-static | |
170 | %defattr(644,root,root,755) | |
171 | %{_libdir}/liblwgeom.a |