1 |
%define major 2 |
2 |
%define libname %mklibname shp %{major} |
3 |
%define develname %mklibname shp -d |
4 |
|
5 |
Summary: C Library for Shapefile handling |
6 |
Name: shapelib |
7 |
Version: 1.5.0 |
8 |
%define subrel 1 |
9 |
Release: %mkrel 2 |
10 |
# The core library is dual-licensed LGPLv2 or MIT. |
11 |
# Some contributed files have different licenses: |
12 |
# - contrib/csv2shp.c: GPLv2+ |
13 |
# - contrib/dbfinfo.c: Public domain |
14 |
# - contrib/dbfcat.c: Public domain |
15 |
License: (LGPLv2+ or MIT) and GPLv2+ and Public Domain |
16 |
Group: Sciences/Geosciences |
17 |
URL: http://shapelib.maptools.org/ |
18 |
Source0: http://download.osgeo.org/%{name}/%{name}-%{version}.tar.gz |
19 |
Patch0: CVE-2022-0699.patch |
20 |
|
21 |
|
22 |
%description |
23 |
The Shapefile C Library provides the ability to write |
24 |
simple C programs for reading, writing and updating (to a |
25 |
limited extent) ESRI Shapefiles, and the associated |
26 |
attribute file (.dbf). |
27 |
|
28 |
%package -n %{libname} |
29 |
Summary: C Library for Shapefile handling |
30 |
Group: System/Libraries |
31 |
|
32 |
%description -n %{libname} |
33 |
The Shapefile C Library provides the ability to write |
34 |
simple C programs for reading, writing and updating (to a |
35 |
limited extent) ESRI Shapefiles, and the associated |
36 |
attribute file (.dbf). |
37 |
|
38 |
%package -n %{develname} |
39 |
Summary: Development files and headers for %{name} |
40 |
Group: Development/C |
41 |
Requires: %{libname} = %{version}-%{release} |
42 |
Provides: lib%{name}-devel = %{version}-%{release} |
43 |
Provides: %{name}-devel = %{version}-%{release} |
44 |
Obsoletes: %{_lib}shapelib-devel < 1.3.0 |
45 |
|
46 |
%description -n %{develname} |
47 |
The Shapefile C Library provides the ability to write |
48 |
simple C programs for reading, writing and updating (to a |
49 |
limited extent) ESRI Shapefiles, and the associated |
50 |
attribute file (.dbf). |
51 |
|
52 |
%prep |
53 |
%setup -q |
54 |
%autopatch -p1 |
55 |
|
56 |
%build |
57 |
|
58 |
%configure \ |
59 |
--disable-static |
60 |
%make_build |
61 |
|
62 |
%install |
63 |
%make_install |
64 |
|
65 |
# we don't want these |
66 |
find %{buildroot} -name "*.la" -delete |
67 |
|
68 |
%files -n %{name} |
69 |
%doc README.tree web/*.html |
70 |
%{_bindir}/* |
71 |
|
72 |
%files -n %{develname} |
73 |
%{_includedir}/shapefil.h |
74 |
%{_libdir}/pkgconfig/%{name}.pc |
75 |
%{_libdir}/libshp.so |
76 |
|
77 |
%files -n %{libname} |
78 |
%{_libdir}/libshp.so.%{major} |
79 |
%{_libdir}/libshp.so.%{major}.* |