Add option to build docs (default for snapshot)

epel8
Mystro256 8 years ago
parent 37d5bdf016
commit fb9013626a

@ -15,7 +15,7 @@
%global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191 %global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
#What doc version to use with the snapshot (usually last release): #What doc version to use with the snapshot (usually last release):
%global docversion 3.0.2 %global builddocs 1
%endif %endif
Name: %{wxgtkname} Name: %{wxgtkname}
@ -30,9 +30,10 @@ URL: http://www.wxwidgets.org/
Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz Source0: https://github.com/%{srcname}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz
%else %else
Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2 Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2
%global docversion %{version}
%endif %endif
Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{docversion}/%{srcname}-%{docversion}-docs-html.tar.bz2 %if ! 0%{?builddocs}
Source1: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}-docs-html.tar.bz2
%endif
Source10: wx-config Source10: wx-config
# https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # https://bugzilla.redhat.com/show_bug.cgi?id=1225148
# remove abort when ABI check fails # remove abort when ABI check fails
@ -171,9 +172,9 @@ This package provides XML documentation for the %{srcname} library.
%prep %prep
%if 0%{?usesnapshot} %if 0%{?usesnapshot}
%autosetup -n %{srcname}-%{commit0} -a 1 -p1 %autosetup -n %{srcname}-%{commit0} %{!?builddocs:-a 1} -p1
%else %else
%autosetup -n %{srcname}-%{version} -a 1 -p1 %autosetup -n %{srcname}-%{version} %{!?builddocs:-a 1} -p1
%endif %endif
# patch some installed files to avoid conflicts with 2.8.* # patch some installed files to avoid conflicts with 2.8.*
@ -181,9 +182,14 @@ sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in
sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in sed -i -e 's|wxstd.mo|wxstd3.mo|' Makefile.in
sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in sed -i -e 's|wxmsw.mo|wxmsw3.mo|' Makefile.in
# rename docs directory #Docs
mv %{srcname}-%{docversion} html %if 0%{?builddocs}
export WX_SKIP_DOXYGEN_VERSION_CHECK=1
docs/doxygen/regen.sh html
mv docs/doxygen/out/html .
%else
mv %{srcname}-%{version} html
%endif
# fix plugin dir for 64-bit # fix plugin dir for 64-bit
sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure

Loading…
Cancel
Save