]> git.pld-linux.org Git - packages/postgis.git/blob - postgis.spec
77744d043315473272edeb9dc7ed586c2c87509a
[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.2
13 Release:        1
14 License:        GPL v2+
15 Group:          Applications/Databases
16 Source0:        http://download.osgeo.org/postgis/source/%{name}-%{version}%{beta}.tar.gz
17 # Source0-md5:  9d9dc316f7d68dacd242cac6c305fe65
18 URL:            http://postgis.refractions.net/
19 %{?with_raster:BuildRequires:   gdal-devel >= 1.6.0}
20 BuildRequires:  geos-devel >= 3.3.2
21 BuildRequires:  json-c-devel
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  libxml2-devel
24 BuildRequires:  perl-base
25 BuildRequires:  postgresql-backend-devel >= 8.3
26 BuildRequires:  postgresql-devel >= 8.3
27 BuildRequires:  proj-devel >= 4.5.0
28 %if %{with doc}
29 BuildRequires:  ImageMagick
30 BuildRequires:  docbook-style-xsl
31 BuildRequires:  libxml2-progs
32 BuildRequires:  libxslt-progs
33 %endif
34 %if %{with gui}
35 BuildRequires:  gtk+2-devel >= 2:2.8.0
36 BuildRequires:  pkgconfig
37 %endif
38 %{?with_raster:Requires:        gdal >= 1.6.0}
39 Requires:       liblwgeom = %{version}-%{release}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         specflags_x86_64        -fPIC
43
44 # oh well... I also don't understand this... ;)
45
46 %description
47 This package contains a module which implements GIS simple features,
48 ties the features to rtree indexing, and provides some spatial
49 functions for accessing and analyzing geographic data.
50
51 %description -l pl.UTF-8
52 Pakiet ten zawiera moduł implementujący proste funkcje GIS, wiąże je z
53 indeksowaniem rtree oraz dostarcza funkcje dostępu oraz analizy danych
54 geograficznych.
55
56 %package gui
57 Summary:        Data import GUI for PostGIS
58 Summary(pl.UTF-8):      Graficzny interfejs użytkownika importujący dane dla PostGIS-a
59 Group:          X11/Applications
60 Requires:       %{name} = %{version}-%{release}
61 Requires:       gtk+2 >= 2:2.8.0
62
63 %description gui
64 Data import GUI for PostGIS.
65
66 %description gui -l pl.UTF-8
67 Graficzny interfejs użytkownika importujący dane dla PostGIS-a.
68
69 %package -n liblwgeom
70 Summary:        lwgeom library (a part of PostGIS project)
71 Summary(pl.UTF-8):      Biblioteka lwgeom (część projektu PostGIS)
72 Group:          Libraries
73 Requires:       geos >= 3.3.2
74 Requires:       proj >= 4.5.0
75 Conflicts:      postgis < 2.0.0-2
76
77 %description -n liblwgeom
78 lwgeom library (a part of PostGIS project).
79
80 %description -n liblwgeom -l pl.UTF-8
81 Biblioteka lwgeom (część projektu PostGIS).
82
83 %package -n liblwgeom-devel
84 Summary:        Header file for lwgeom library
85 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki lwgeom
86 Group:          Development/Libraries
87 Requires:       geos-devel >= 3.3.2
88 Requires:       liblwgeom = %{version}-%{release}
89 Requires:       proj-devel >= 4.5.0
90
91 %description -n liblwgeom-devel
92 Header file for lwgeom library.
93
94 %description -n liblwgeom-devel -l pl.UTF-8
95 Plik nagłówkowy biblioteki lwgeom.
96
97 %package -n liblwgeom-static
98 Summary:        Static lwgeom library
99 Summary(pl.UTF-8):      Statyczna biblioteka lwgeom
100 Group:          Development/Libraries
101 Requires:       liblwgeom-devel = %{version}-%{release}
102
103 %description -n liblwgeom-static
104 Static lwgeom library.
105
106 %description -n liblwgeom-static -l pl.UTF-8
107 Statyczna biblioteka lwgeom.
108
109 %prep
110 %setup -q -n %{name}-%{version}%{beta}
111
112 %build
113 %configure \
114         --with-geos \
115         --with-geos-libdir=/usr/%{_lib} \
116         %{?with_gui:--with-gui} \
117         --with-pgsql \
118         --with-proj=%{_prefix} \
119         --with-proj-libdir=/usr/%{_lib} \
120         %{!?with_raster:--without-raster}
121
122 %{__make}
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126
127 %{__make} install \
128         DESTDIR=$RPM_BUILD_ROOT
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   -n liblwgeom -p /sbin/ldconfig
134 %postun -n liblwgeom -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
139 %attr(755,root,root) %{_bindir}/pgsql2shp
140 %attr(755,root,root) %{_bindir}/shp2pgsql
141 %attr(755,root,root) %{_libdir}/postgresql/postgis-2.1.so
142 %{_datadir}/postgresql/contrib/postgis-2.1
143 %if %{with raster}
144 %attr(755,root,root) %{_bindir}/raster2pgsql
145 %attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.1.so
146 %{_datadir}/postgresql/extension/postgis*.control
147 %{_datadir}/postgresql/extension/postgis*.sql
148 %endif
149
150 %if %{with gui}
151 %files gui
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/shp2pgsql-gui
154 %endif
155
156 %files -n liblwgeom
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/liblwgeom-?.?.?.so
159
160 %files -n liblwgeom-devel
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/liblwgeom.so
163 %{_libdir}/liblwgeom.la
164 %{_includedir}/liblwgeom.h
165
166 %files -n liblwgeom-static
167 %defattr(644,root,root,755)
168 %{_libdir}/liblwgeom.a
This page took 0.145943 seconds and 2 git commands to generate.