]> git.pld-linux.org Git - packages/postgis.git/blob - postgis.spec
70bc8f2dd8a0d8169b89777cf1f899b21d38b58e
[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:        2.4.4
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:  87608a7f01a50c5bae72a00ba3314e2d
19 URL:            http://postgis.refractions.net/
20 %{?with_raster:BuildRequires:   gdal-devel >= 1.8.0}
21 BuildRequires:  geos-devel >= 3.5.0
22 BuildRequires:  json-c-devel
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libxml2-devel >= 2.0
25 BuildRequires:  pcre-devel
26 BuildRequires:  perl-base
27 BuildRequires:  postgresql-backend-devel >= 9.1
28 BuildRequires:  postgresql-devel >= 9.1
29 BuildRequires:  proj-devel >= 4.6.0
30 %if %{with doc}
31 BuildRequires:  ImageMagick
32 BuildRequires:  docbook-style-xsl
33 BuildRequires:  libxml2-progs
34 BuildRequires:  libxslt-progs
35 # TODO: mathml DTD (http://www.w3.org/Math/DTD/mathml2/mathml2.dtd, e.g. /usr/share/xml/schema/w3c/mathml/dtd)
36 %endif
37 %if %{with gui}
38 BuildRequires:  gtk+2-devel >= 2:2.8.0
39 BuildRequires:  pkgconfig
40 %endif
41 %{?with_raster:Requires:        gdal >= 1.8.0}
42 Requires:       liblwgeom = %{version}-%{release}
43 Requires:       postgresql >= %{pg_version}
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         specflags_x86_64        -fPIC
47
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
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
58 geograficznych.
59
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}
65 Requires:       gtk+2 >= 2:2.8.0
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
77 Requires:       geos >= 3.5.0
78 Requires:       proj >= 4.6.0
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
91 Requires:       geos-devel >= 3.5.0
92 Requires:       liblwgeom = %{version}-%{release}
93 Requires:       proj-devel >= 4.6.0
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
113 %prep
114 %setup -q -n %{name}-%{version}%{subver}
115
116 %build
117 %configure \
118         %{?with_gui:--with-gui} \
119         %{!?with_raster:--without-raster}
120
121 %{__make} -j1
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %{__make} install \
127         DESTDIR=$RPM_BUILD_ROOT
128
129 # Fix icons and desktop file locations
130 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
131 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %post   -n liblwgeom -p /sbin/ldconfig
137 %postun -n liblwgeom -p /sbin/ldconfig
138
139 %files
140 %defattr(644,root,root,755)
141 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
142 %attr(755,root,root) %{_bindir}/pgsql2shp
143 %attr(755,root,root) %{_bindir}/shp2pgsql
144 %attr(755,root,root) %{_libdir}/postgresql/postgis-2.4.so
145 %attr(755,root,root) %{_libdir}/postgresql/postgis_topology-2.4.so
146 %{_datadir}/postgresql/contrib/postgis-2.4
147 %if %{with raster}
148 %attr(755,root,root) %{_bindir}/raster2pgsql
149 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.4.so
150 %{_datadir}/postgresql/extension/postgis*.control
151 %{_datadir}/postgresql/extension/postgis*.sql
152 %endif
153 %{_libdir}/postgresql/address_standardizer-2.4.so
154 %{_datadir}/postgresql/extension/address_standardizer*.sql
155 %{_datadir}/postgresql/extension/address_standardizer*.control
156
157 %if %{with gui}
158 %files gui
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
161 %{_desktopdir}/shp2pgsql-gui.desktop
162 %{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
163 %endif
164
165 %files -n liblwgeom
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/liblwgeom-2.4.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/liblwgeom-2.4.so.0
169
170 %files -n liblwgeom-devel
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/liblwgeom.so
173 %{_libdir}/liblwgeom.la
174 %{_includedir}/liblwgeom.h
175 %{_includedir}/liblwgeom_topo.h
176
177 %files -n liblwgeom-static
178 %defattr(644,root,root,755)
179 %{_libdir}/liblwgeom.a
This page took 0.053163 seconds and 2 git commands to generate.