From bc1ef49879e045a5e4e4bb0fa0b32bbc7176aec1c8650e3954d809a50964ea7b Mon Sep 17 00:00:00 2001 From: Raymund Will Date: Thu, 27 Feb 2020 10:57:33 +0000 Subject: [PATCH] Accepting request 779525 from home:rwill:branches:hardware:nvdimm Fix creation (and packaging) of man-pages. [bsc#1158619] OBS-URL: https://build.opensuse.org/request/show/779525 OBS-URL: https://build.opensuse.org/package/show/hardware:nvdimm/ipmctl?expand=0&rev=36 --- ipmctl.changes | 6 ++++++ ipmctl.spec | 17 ++++++++++++++++- mkSafeC | 11 ++++------- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ipmctl.changes b/ipmctl.changes index b76549a..140ea77 100644 --- a/ipmctl.changes +++ b/ipmctl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 26 15:25:31 UTC 2020 - rw@suse.com + +- Fix creation (and packaging) of man-pages. [bsc#1158619] +- Improve spec-file for upcoming update. + ------------------------------------------------------------------- Tue Feb 18 15:28:47 UTC 2020 - rw@suse.com diff --git a/ipmctl.spec b/ipmctl.spec index c191c24..34348a1 100644 --- a/ipmctl.spec +++ b/ipmctl.spec @@ -53,6 +53,12 @@ BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libndctl) >= 58.2 BuildRequires: pkgconfig(systemd) +# required for man-pages +%if %{defined rubygem(asciidoctor)} +BuildRequires: rubygem(asciidoctor) +%else +BuildRequires: asciidoc +%endif # for SafeC BuildRequires: autoconf BuildRequires: automake @@ -109,6 +115,13 @@ API for development of Intel Optane DC persistent memory management utilities. %setup -q -n %{name}-%{version}%{vgit} -a 10 %patch1 -p1 +perl -pi.00 -e ' + s[(CMAKE_INSTALL_)DATAROOT(DIR\})/ipmctl][${1}SYSCONF${2}]; +' CMakeLists.txt +#diff -u CMakeLists.txt{.00,} || sleep 2 +perl -pi.00 -e 's{/usr/share/ipmctl}{/etc}' src/os/ini/ini.c +#diff -u src/os/ini/ini.c{.00,} || sleep 4 + ! grep -lri 'INTEL CONFIDENTIAL' || exit 1 %if %{with precompiledSafeC} @@ -139,6 +152,7 @@ ln -sf service %{buildroot}%{_sbindir}/rc%{name}-monitor rm -f %{buildroot}%{_datadir}/doc/ipmctl/ipmctl_default.conf rm -f %{buildroot}%{_libdir}/*.so.%{abi} install -m 444 -p "%{SOURCE1}" . +rm -f %{buildroot}%{_mandir}/man1/*.tmp.* %post -p /sbin/ldconfig @@ -159,9 +173,10 @@ install -m 444 -p "%{SOURCE1}" . %files %defattr(-,root,root) %license LICENSE contrib/COPYING.* -%doc README.md CONTRIBUTING.md Documentation/ipmctl/ipmctl.txt +%doc README.md CONTRIBUTING.md %doc ChangeLog.xz %{_bindir}/%{name} +%{_mandir}/man1/* #files data %doc output/release/%{name}_default.conf diff --git a/mkSafeC b/mkSafeC index 202b0f5..3546c4e 100644 --- a/mkSafeC +++ b/mkSafeC @@ -6,17 +6,14 @@ SafeCpatches="$1"; shift [ -r CMakeLists.txt ] -perl -pi.00 -e ' +perl -pi.10 -e ' s<(\$\{CMAKE_THREAD_LIBS_INIT\})>; if (!$f) { $f=1 if (s<(\$\{LIBSAFEC)(_LIBRARIES)>); } - s[(CMAKE_INSTALL_)DATAROOT(DIR\})/ipmctl][${1}SYSCONF${2}]; $_ .= " RENAME ipmctl\n" if (m{/logrotate\.d}); ' CMakeLists.txt -#diff -u CMakeLists.txt{.00,} || sleep 2 -perl -pi.00 -e 's{/usr/share/ipmctl}{/etc}' src/os/ini/ini.c -#diff -u src/os/ini/ini.c{.00,} || sleep 4 +#diff -u CMakeLists.txt{.10,} || sleep 2 CONTRIB=$PWD/contrib if [ -d $CONTRIB/include ]; then @@ -51,10 +48,10 @@ if [ -n "$SafeCpatches" -a -s "$SafeCpatches" ]; then done else echo "$SafeCver" > .tarball-version - perl -pi.00 -e ' + perl -pi.10 -e ' s{\[libsafec\]}{[safec-'"$API"']} ' configure.ac - diff -u configure.ac{.00,} || sleep 4 + diff -u configure.ac{.10,} || sleep 4 fi autoreconf -Wall --install || exit