Add fixes to install econftool and man pages

This commit is contained in:
Neal Gompa 2021-07-08 06:46:46 -04:00
parent 2b39c5627f
commit 22324b9be3
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From 82bd1d76a50c0f7557578b18d601c69c10e50950 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Thu, 8 Jul 2021 05:42:04 -0400
Subject: [PATCH 1/2] cmake: Install econftool
This was missed in bce4976bd6bd933ca415f3bf765d80a887b832a4.
---
util/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
index ce3fca8..08cc5f0 100644
--- a/util/CMakeLists.txt
+++ b/util/CMakeLists.txt
@@ -1,3 +1,7 @@
# Create the binary/executable
add_executable(econftool econftool.c)
target_link_libraries(econftool PRIVATE econf)
+
+install(TARGETS econftool
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
--
2.31.1

View File

@ -0,0 +1,23 @@
From 5fbe0aed4622d4c94c4e541c6b013be7ae4616a3 Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Thu, 8 Jul 2021 05:49:41 -0400
Subject: [PATCH 2/2] cmake: Install man pages
---
doc/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 0e47ccc..726183a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -20,3 +20,6 @@ if(BUILD_DOCUMENTATION)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc)
endif()
+
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/libeconf.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man/econftool.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
--
2.31.1

View File

@ -12,6 +12,10 @@ License: MIT
URL: https://github.com/openSUSE/libeconf
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# Proposed upstream: https://github.com/openSUSE/libeconf/pull/151
Patch0101: 0001-cmake-Install-econftool.patch
Patch0102: 0002-cmake-Install-man-pages.patch
BuildRequires: cmake >= 3.12
BuildRequires: gcc
BuildRequires: make
@ -31,6 +35,15 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package utils
Summary: Utilities for manipulating config files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description utils
The %{name}-utils package contains utilities for manipulating
configuration files from applications that use %{name}.
%prep
%autosetup -p1
@ -59,11 +72,16 @@ developing applications that use %{name}.
%{_libdir}/%{name}.so
%{_libdir}/cmake/%{name}/
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/%{name}.3*
%files utils
%{_bindir}/econftool
%{_mandir}/man8/econftool.8*
%changelog
* Thu Jul 08 2021 Neal Gompa <ngompa13@gmail.com> - 0.4.0-1
- Update to 0.4.0 (RH#1980289)
- Add fixes to install econftool and man pages
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild