move gen. of man pages to %install

This commit is contained in:
David Tardon 2016-01-13 15:27:26 +01:00
parent a17642e556
commit 06fbc2835b

View File

@ -47,17 +47,17 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
export LD_LIBRARY_PATH=`pwd`/src/lib/.libs${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
help2man -N -o wpd2raw.1 ./src/conv/raw/wpd2raw
help2man -N -o wpd2html.1 ./src/conv/html/wpd2html
help2man -N -o wpd2text.1 ./src/conv/text/wpd2text
%install
make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
# we install API docs directly from build
rm -rf $RPM_BUILD_ROOT/%{_docdir}/%{name}
# generate and install man pages
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
for tool in wpd2html wpd2raw wpd2text; do
help2man -N -o ${tool}.1 %{buildroot}%{_bindir}/${tool}
done
install -m 0755 -d %{buildroot}/%{_mandir}/man1
install -m 0644 wpd2*.1 %{buildroot}/%{_mandir}/man1