]>
Commit | Line | Data |
---|---|---|
9e8f98c3 | 1 | # TODO: sfcgal support (sfcgal-config, >= 1.1.0) |
32e16a3a | 2 | %define pg_version %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel) |
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 |
15bcb2cd | 12 | Version: 2.4.4 |
9e8f98c3 | 13 | %define subver %{nil} |
dab5b797 | 14 | Release: 2 |
4203f720 | 15 | License: GPL v2+ |
32e16a3a | 16 | Group: Applications/Databases |
15bcb2cd JR |
17 | Source0: https://download.osgeo.org/postgis/source/%{name}-%{version}%{subver}.tar.gz |
18 | # Source0-md5: 87608a7f01a50c5bae72a00ba3314e2d | |
32e16a3a | 19 | URL: http://postgis.refractions.net/ |
7d560dbb | 20 | %{?with_raster:BuildRequires: gdal-devel >= 1.8.0} |
7f47167e | 21 | BuildRequires: geos-devel >= 3.5.0 |
7045685f JB |
22 | BuildRequires: json-c-devel |
23 | BuildRequires: libstdc++-devel | |
9e8f98c3 JB |
24 | BuildRequires: libxml2-devel >= 2.0 |
25 | BuildRequires: pcre-devel | |
a6fb65b0 | 26 | BuildRequires: perl-base |
9e8f98c3 JB |
27 | BuildRequires: postgresql-backend-devel >= 9.1 |
28 | BuildRequires: postgresql-devel >= 9.1 | |
7d560dbb | 29 | BuildRequires: proj-devel >= 4.6.0 |
7045685f JB |
30 | %if %{with doc} |
31 | BuildRequires: ImageMagick | |
32 | BuildRequires: docbook-style-xsl | |
33 | BuildRequires: libxml2-progs | |
34 | BuildRequires: libxslt-progs | |
9e8f98c3 | 35 | # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd) |
7045685f JB |
36 | %endif |
37 | %if %{with gui} | |
38 | BuildRequires: gtk+2-devel >= 2:2.8.0 | |
39 | BuildRequires: pkgconfig | |
40 | %endif | |
7d560dbb | 41 | %{?with_raster:Requires: gdal >= 1.8.0} |
7045685f | 42 | Requires: liblwgeom = %{version}-%{release} |
9e8f98c3 | 43 | Requires: postgresql >= %{pg_version} |
32e16a3a MM |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
def64c02 | 46 | %define specflags_x86_64 -fPIC |
47 | ||
32e16a3a MM |
48 | # oh well... I also don't understand this... ;) |
49 | ||
50 | %description | |
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. | |
54 | ||
c7a5e637 JR |
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 | |
32e16a3a MM |
58 | geograficznych. |
59 | ||
7045685f JB |
60 | %package gui |
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} | |
fc59c3d1 | 65 | Requires: gtk+2 >= 2:2.8.0 |
7045685f JB |
66 | |
67 | %description gui | |
68 | Data import GUI for PostGIS. | |
69 | ||
70 | %description gui -l pl.UTF-8 | |
71 | Graficzny interfejs użytkownika importujący dane dla PostGIS-a. | |
72 | ||
73 | %package -n liblwgeom | |
74 | Summary: lwgeom library (a part of PostGIS project) | |
75 | Summary(pl.UTF-8): Biblioteka lwgeom (część projektu PostGIS) | |
76 | Group: Libraries | |
7f47167e | 77 | Requires: geos >= 3.5.0 |
7d560dbb | 78 | Requires: proj >= 4.6.0 |
7045685f JB |
79 | Conflicts: postgis < 2.0.0-2 |
80 | ||
81 | %description -n liblwgeom | |
82 | lwgeom library (a part of PostGIS project). | |
83 | ||
84 | %description -n liblwgeom -l pl.UTF-8 | |
85 | Biblioteka lwgeom (część projektu PostGIS). | |
86 | ||
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 | |
7f47167e | 91 | Requires: geos-devel >= 3.5.0 |
7045685f | 92 | Requires: liblwgeom = %{version}-%{release} |
7d560dbb | 93 | Requires: proj-devel >= 4.6.0 |
7045685f JB |
94 | |
95 | %description -n liblwgeom-devel | |
96 | Header file for lwgeom library. | |
97 | ||
98 | %description -n liblwgeom-devel -l pl.UTF-8 | |
99 | Plik nagłówkowy biblioteki lwgeom. | |
100 | ||
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} | |
106 | ||
107 | %description -n liblwgeom-static | |
108 | Static lwgeom library. | |
109 | ||
110 | %description -n liblwgeom-static -l pl.UTF-8 | |
111 | Statyczna biblioteka lwgeom. | |
112 | ||
32e16a3a | 113 | %prep |
9e8f98c3 | 114 | %setup -q -n %{name}-%{version}%{subver} |
32e16a3a MM |
115 | |
116 | %build | |
81e2cdad | 117 | %configure \ |
7045685f | 118 | %{?with_gui:--with-gui} \ |
fc587bde | 119 | %{!?with_raster:--without-raster} |
9dd90af9 | 120 | |
69ec2dd8 | 121 | %{__make} -j1 |
32e16a3a MM |
122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
1393aae1 | 125 | |
7045685f JB |
126 | %{__make} install \ |
127 | DESTDIR=$RPM_BUILD_ROOT | |
1393aae1 | 128 | |
15bcb2cd JR |
129 | # Fix icons and desktop file locations |
130 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons | |
131 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications | |
132 | ||
dab5b797 JR |
133 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40 |
134 | ||
32e16a3a MM |
135 | %clean |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
7045685f JB |
138 | %post -n liblwgeom -p /sbin/ldconfig |
139 | %postun -n liblwgeom -p /sbin/ldconfig | |
140 | ||
32e16a3a MM |
141 | %files |
142 | %defattr(644,root,root,755) | |
92489202 | 143 | %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html} |
7045685f JB |
144 | %attr(755,root,root) %{_bindir}/pgsql2shp |
145 | %attr(755,root,root) %{_bindir}/shp2pgsql | |
15bcb2cd JR |
146 | %attr(755,root,root) %{_libdir}/postgresql/postgis-2.4.so |
147 | %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-2.4.so | |
148 | %{_datadir}/postgresql/contrib/postgis-2.4 | |
7045685f JB |
149 | %if %{with raster} |
150 | %attr(755,root,root) %{_bindir}/raster2pgsql | |
15bcb2cd | 151 | %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.4.so |
7045685f JB |
152 | %{_datadir}/postgresql/extension/postgis*.control |
153 | %{_datadir}/postgresql/extension/postgis*.sql | |
154 | %endif | |
15bcb2cd JR |
155 | %{_libdir}/postgresql/address_standardizer-2.4.so |
156 | %{_datadir}/postgresql/extension/address_standardizer*.sql | |
157 | %{_datadir}/postgresql/extension/address_standardizer*.control | |
7045685f JB |
158 | |
159 | %if %{with gui} | |
160 | %files gui | |
161 | %defattr(644,root,root,755) | |
162 | %attr(755,root,root) %{_bindir}/shp2pgsql-gui | |
15bcb2cd JR |
163 | %{_desktopdir}/shp2pgsql-gui.desktop |
164 | %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png | |
7045685f JB |
165 | %endif |
166 | ||
167 | %files -n liblwgeom | |
168 | %defattr(644,root,root,755) | |
15bcb2cd JR |
169 | %attr(755,root,root) %{_libdir}/liblwgeom-2.4.so.*.*.* |
170 | %attr(755,root,root) %ghost %{_libdir}/liblwgeom-2.4.so.0 | |
7045685f JB |
171 | |
172 | %files -n liblwgeom-devel | |
173 | %defattr(644,root,root,755) | |
174 | %attr(755,root,root) %{_libdir}/liblwgeom.so | |
175 | %{_libdir}/liblwgeom.la | |
176 | %{_includedir}/liblwgeom.h | |
9e8f98c3 | 177 | %{_includedir}/liblwgeom_topo.h |
7045685f JB |
178 | |
179 | %files -n liblwgeom-static | |
180 | %defattr(644,root,root,755) | |
181 | %{_libdir}/liblwgeom.a |