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