]> git.pld-linux.org Git - packages/postgis.git/blob - postgis.spec
927a899756df2850e9b01946d7b6aa4868407b1c
[packages/postgis.git] / postgis.spec
1 # TODO: sfcgal support (sfcgal-config, >= 1.1.0)
2 %define pg_version      %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
3 #
4 # Conditional build:
5 %bcond_without  raster  # disable raster support
6 %bcond_without  doc     # HTML documentation
7 %bcond_without  gui     # data import GUI
8 #
9 Summary:        Geographic Information Systems Extensions to PostgreSQL
10 Summary(pl.UTF-8):      Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
11 Name:           postgis
12 Version:        3.0.0
13 %define subver %{nil}
14 Release:        5
15 License:        GPL v2+
16 Group:          Applications/Databases
17 Source0:        https://download.osgeo.org/postgis/source/%{name}-%{version}%{subver}.tar.gz
18 # Source0-md5:  725019e3a67ac52ccef4d00031cb0c77
19 Patch0:         install-lwgeom.patch
20 URL:            http://postgis.refractions.net/
21 %{?with_raster:BuildRequires:   gdal-devel >= 1.8.0}
22 BuildRequires:  clang
23 BuildRequires:  geos-devel >= 3.5.0
24 BuildRequires:  json-c-devel
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libxml2-devel >= 2.0
27 BuildRequires:  pcre-devel
28 BuildRequires:  perl-base
29 BuildRequires:  postgresql-backend-devel >= 9.1
30 BuildRequires:  postgresql-devel >= 9.1
31 BuildRequires:  proj-devel >= 4.6.0
32 %if %{with doc}
33 BuildRequires:  ImageMagick
34 BuildRequires:  docbook-style-xsl
35 BuildRequires:  libxml2-progs
36 BuildRequires:  libxslt-progs
37 # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
38 %endif
39 %if %{with gui}
40 BuildRequires:  gtk+2-devel >= 2:2.8.0
41 BuildRequires:  pkgconfig
42 %endif
43 %{?with_raster:Requires:        gdal >= 1.8.0}
44 Requires:       liblwgeom = %{version}-%{release}
45 Requires:       postgresql >= %{pg_version}
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         specflags_x86_64        -fPIC
49
50 # clang can't parse this
51 %define         filterout               -fvar-tracking-assignments
52
53 # oh well... I also don't understand this... ;)
54
55 %description
56 This package contains a module which implements GIS simple features,
57 ties the features to rtree indexing, and provides some spatial
58 functions for accessing and analyzing geographic data.
59
60 %description -l pl.UTF-8
61 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
62 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
63 geograficznych.
64
65 %package gui
66 Summary:        Data import GUI for PostGIS
67 Summary(pl.UTF-8):      Graficzny interfejs użytkownika importujący dane dla PostGIS-a
68 Group:          X11/Applications
69 Requires:       %{name} = %{version}-%{release}
70 Requires:       gtk+2 >= 2:2.8.0
71
72 %description gui
73 Data import GUI for PostGIS.
74
75 %description gui -l pl.UTF-8
76 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
77
78 %package -n liblwgeom
79 Summary:        lwgeom library (a part of PostGIS project)
80 Summary(pl.UTF-8):      Biblioteka lwgeom (część projektu PostGIS)
81 Group:          Libraries
82 Requires:       geos >= 3.5.0
83 Requires:       proj >= 4.6.0
84 Conflicts:      postgis < 2.0.0-2
85
86 %description -n liblwgeom
87 lwgeom library (a part of PostGIS project).
88
89 %description -n liblwgeom -l pl.UTF-8
90 Biblioteka lwgeom (część projektu PostGIS).
91
92 %package -n liblwgeom-devel
93 Summary:        Header file for lwgeom library
94 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki lwgeom
95 Group:          Development/Libraries
96 Requires:       geos-devel >= 3.5.0
97 Requires:       liblwgeom = %{version}-%{release}
98 Requires:       proj-devel >= 4.6.0
99
100 %description -n liblwgeom-devel
101 Header file for lwgeom library.
102
103 %description -n liblwgeom-devel -l pl.UTF-8
104 Plik nagłówkowy biblioteki lwgeom.
105
106 %package -n liblwgeom-static
107 Summary:        Static lwgeom library
108 Summary(pl.UTF-8):      Statyczna biblioteka lwgeom
109 Group:          Development/Libraries
110 Requires:       liblwgeom-devel = %{version}-%{release}
111
112 %description -n liblwgeom-static
113 Static lwgeom library.
114
115 %description -n liblwgeom-static -l pl.UTF-8
116 Statyczna biblioteka lwgeom.
117
118 %prep
119 %setup -q -n %{name}-%{version}%{subver}
120 %patch0 -p1
121
122 %build
123 export CFLAGS="%{rpmcflags} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"
124 %configure \
125         %{?with_gui:--with-gui} \
126         %{!?with_raster:--without-raster}
127
128 %{__make}
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132
133 %{__make} install \
134         DESTDIR=$RPM_BUILD_ROOT
135
136 %{__sed} -e '/#include .*/d' postgis_config.h > $RPM_BUILD_ROOT%{_includedir}/postgis_config.h
137 %{__sed} -i -e 's/#include.*postgis_config.*/#include "postgis_config.h"/' $RPM_BUILD_ROOT%{_includedir}/liblwgeom.h
138
139 # Fix icons and desktop file locations
140 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
141 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
142
143 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/40x40
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post   -n liblwgeom -p /sbin/ldconfig
149 %postun -n liblwgeom -p /sbin/ldconfig
150
151 %files
152 %defattr(644,root,root,755)
153 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
154 %attr(755,root,root) %{_bindir}/pgsql2shp
155 %attr(755,root,root) %{_bindir}/shp2pgsql
156 %attr(755,root,root) %{_libdir}/postgresql/postgis-3.so
157 %attr(755,root,root) %{_libdir}/postgresql/postgis_raster-3.so
158 %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-3.so
159 %{_datadir}/postgresql/contrib/postgis-3.0
160 %if %{with raster}
161 %attr(755,root,root) %{_bindir}/raster2pgsql
162 %{_datadir}/postgresql/extension/postgis*.control
163 %{_datadir}/postgresql/extension/postgis*.sql
164 %endif
165 %{_libdir}/postgresql/address_standardizer-3.so
166 %{_datadir}/postgresql/extension/address_standardizer*.sql
167 %{_datadir}/postgresql/extension/address_standardizer*.control
168 %dir %{_libdir}/postgresql/bitcode
169 %{_libdir}/postgresql/bitcode/address_standardizer-3.index.bc
170 %dir %{_libdir}/postgresql/bitcode/address_standardizer-3/
171 %{_libdir}/postgresql/bitcode/address_standardizer-3/*.bc
172 %{_libdir}/postgresql/bitcode/postgis-3.index.bc
173 %dir %{_libdir}/postgresql/bitcode/postgis-3
174 %{_libdir}/postgresql/bitcode/postgis-3/*.bc
175 %{_libdir}/postgresql/bitcode/postgis_raster-3.index.bc
176 %dir %{_libdir}/postgresql/bitcode/postgis_raster-3
177 %{_libdir}/postgresql/bitcode/postgis_raster-3/*.bc
178 %{_libdir}/postgresql/bitcode/postgis_topology-3.index.bc
179 %dir %{_libdir}/postgresql/bitcode/postgis_topology-3
180 %{_libdir}/postgresql/bitcode/postgis_topology-3/*.bc
181
182 %if %{with gui}
183 %files gui
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
186 %{_desktopdir}/shp2pgsql-gui.desktop
187 %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
188 %endif
189
190 %files -n liblwgeom
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/liblwgeom-3.0.so.*.*.*
193 %attr(755,root,root) %ghost %{_libdir}/liblwgeom-3.0.so.0
194
195 %files -n liblwgeom-devel
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/liblwgeom.so
198 %{_libdir}/liblwgeom.la
199 %{_includedir}/liblwgeom.h
200 %{_includedir}/liblwgeom_topo.h
201 %{_includedir}/lwinline.h
202 %{_includedir}/postgis_config.h
203
204 %files -n liblwgeom-static
205 %defattr(644,root,root,755)
206 %{_libdir}/liblwgeom.a
This page took 0.162167 seconds and 2 git commands to generate.