diff --git a/wxGTK3.spec b/wxGTK3.spec index 1eb8740..30ace97 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -15,7 +15,7 @@ %global commit0 9518d52ba80a22c6e6a6414e9137e66013d2d191 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) #What doc version to use with the snapshot (usually last release): -%global docversion 3.0.2 +%global builddocs 1 %endif 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 %else Source0: https://github.com/%{srcname}/%{srcname}/releases/download/v%{version}/%{srcname}-%{version}.tar.bz2 -%global docversion %{version} %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 # https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # remove abort when ABI check fails @@ -171,9 +172,9 @@ This package provides XML documentation for the %{srcname} library. %prep %if 0%{?usesnapshot} -%autosetup -n %{srcname}-%{commit0} -a 1 -p1 +%autosetup -n %{srcname}-%{commit0} %{!?builddocs:-a 1} -p1 %else -%autosetup -n %{srcname}-%{version} -a 1 -p1 +%autosetup -n %{srcname}-%{version} %{!?builddocs:-a 1} -p1 %endif # 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|wxmsw.mo|wxmsw3.mo|' Makefile.in -# rename docs directory -mv %{srcname}-%{docversion} html - +#Docs +%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 sed -i -e 's|/usr/lib\b|%{_libdir}|' wx-config.in configure