]> git.pld-linux.org Git - packages/postgis.git/blob - postgis.spec
3f794033292d544d477c9a81c1aa30e62e4891c6
[packages/postgis.git] / postgis.spec
1 %define pg_version      %(rpm -q --queryformat '%{VERSION}' postgresql-backend-devel)
2 %define beta %{nil}
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.1.3
13 Release:        4
14 License:        GPL v2+
15 Group:          Applications/Databases
16 Source0:        http://download.osgeo.org/postgis/source/%{name}-%{version}%{beta}.tar.gz
17 # Source0-md5:  104e4468429ea0882259fc268c62d6c7
18 Patch0:         json-c-0.12.patch
19 URL:            http://postgis.refractions.net/
20 %{?with_raster:BuildRequires:   gdal-devel >= 1.6.0}
21 BuildRequires:  gdal-devel
22 BuildRequires:  geos-devel >= 3.3.2
23 BuildRequires:  json-c-devel
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libxml2-devel
26 BuildRequires:  perl-base
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
40 %{?with_raster:Requires:        gdal >= 1.6.0}
41 Requires:       liblwgeom = %{version}-%{release}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         specflags_x86_64        -fPIC
45
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
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
56 geograficznych.
57
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}
63 Requires:       gtk+2 >= 2:2.8.0
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
75 Requires:       geos >= 3.3.2
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
89 Requires:       geos-devel >= 3.3.2
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
111 %prep
112 %setup -q -n %{name}-%{version}%{beta}
113 %patch0 -p1
114
115 %build
116 %configure \
117         --with-geos \
118         --with-geos-libdir=/usr/%{_lib} \
119         %{?with_gui:--with-gui} \
120         --with-pgsql \
121         --with-proj=%{_prefix} \
122         --with-proj-libdir=/usr/%{_lib} \
123         %{!?with_raster:--without-raster}
124
125 %{__make}
126
127 %install
128 rm -rf $RPM_BUILD_ROOT
129
130 %{__make} install \
131         DESTDIR=$RPM_BUILD_ROOT
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.1.so
145 %{_datadir}/postgresql/contrib/postgis-2.1
146 %if %{with raster}
147 %attr(755,root,root) %{_bindir}/raster2pgsql
148 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.1.so
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)
161 %attr(755,root,root) %{_libdir}/liblwgeom-?.?.?.so
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
This page took 0.069849 seconds and 2 git commands to generate.