-
Notifications
You must be signed in to change notification settings - Fork 0
/
h3.spec
95 lines (82 loc) · 2.56 KB
/
h3.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Name: h3
Version: 3.7.2
Release: 1%{?dist}
Summary: H3 Hexagonal Hierarchical Geospatial Indexing System Package
Group: Development/Libraries
License: Apache License 2.0
URL: https://github.com/uber/h3/archive/refs/tags/v3.7.2.tar.gz
Source0: v%{version}.tar.gz
Patch0: h3.CMakeLists.txt.patch
BuildRequires: cmake3
BuildRequires: make
BuildRequires: gcc
BuildRequires: doxygen
BuildRequires: graphviz
%description
H3 is a Hexagonal Hierarchical Geospatial Indexing System.
%package devel
Summary: H3 Hexagonal Hierarchical Geospatial Indexing System Development Header Package
%description devel
H3 is a Hexagonal Hierarchical Geospatial Indexing System.
%prep
%setup -q
%patch0 -p1
%build
mkdir build
pushd build
cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DOCS=YES -DBUILD_SHARED_LIBS=true -DLIB_SUFFIX=64 ..
make %{?_smp_mflags}
FILE=src/h3lib/include/h3api.h
echo "The make docs command clobers the file $FILE"
cp $FILE $FILE.save
make docs
grep VERSION $FILE
cp $FILE.save $FILE
make kml
popd
%check
pushd build
make test
popd
%install
pushd build
make install DESTDIR=%{buildroot} LIB_SUFFIX=64
mkdir -p %{buildroot}%{_datadir}/%{name}/html/
cp dev-docs/_build/html/* %{buildroot}%{_datadir}/%{name}/html/
mkdir -p %{buildroot}%{_datadir}/%{name}/kml/
cp KML/*.kml %{buildroot}%{_datadir}/%{name}/kml/
#TODO how to do this in cmake/make
rm -r %{buildroot}%{_prefix}/lib/cmake
#find %{buildroot} -type f -o -type l
popd
%files
%defattr(0644,root,root,-)
%attr(0755,root,root) %{_bindir}/geoToH3
%attr(0755,root,root) %{_bindir}/h3ToComponents
%attr(0755,root,root) %{_bindir}/h3ToGeo
%attr(0755,root,root) %{_bindir}/h3ToGeoBoundary
%attr(0755,root,root) %{_bindir}/h3ToGeoBoundaryHier
%attr(0755,root,root) %{_bindir}/h3ToGeoHier
%attr(0755,root,root) %{_bindir}/h3ToHier
%attr(0755,root,root) %{_bindir}/h3ToLocalIj
%attr(0755,root,root) %{_bindir}/hexRange
%attr(0755,root,root) %{_bindir}/kRing
%attr(0755,root,root) %{_bindir}/localIjToH3
%{_libdir}/libh3.so.1
%{_libdir}/libh3.so
%doc %{_datadir}/%{name}/html/*
%doc %{_datadir}/%{name}/kml/*
%files devel
%defattr(0644,root,root,-)
%{_includedir}/h3/h3api.h
%changelog
* Fri Jun 24 2022 Michael R. Davis <mrdvt92@yahoo.com> - 3.7.2-1
- Updated to upstream 3.7.2
* Tue Nov 3 2020 Michael R. Davis <mrdvt92@yahoo.com> - 3.7.1-2
- Original SPEC Package
* Tue Nov 3 2020 Michael R. Davis <mrdvt92@yahoo.com> - 3.7.1-3
- Added .so
- Added docs .html and .kml
- Dropped .a
* Tue Nov 3 2020 Michael R. Davis <mrdvt92@yahoo.com> - 3.7.1-4
- Moved .h to devel package