forked from pool/engauge-digitizer
Accepting request 591651 from home:StefanBruens:branches:science
- Fix build on Leap 42.x, remove space in OPENJPEG_INCLUDE - Cleanup spec file/build + Do not build source documentation in PDF format, drop TeXlive BuildRequires + Move source documentation to devel-doc subpackage + Move standalone HTML user manual to doc subpackage + Fix path to QCH help files + Shrink documentation images using optipng + trivial cleanups OBS-URL: https://build.opensuse.org/request/show/591651 OBS-URL: https://build.opensuse.org/package/show/science/engauge-digitizer?expand=0&rev=44
This commit is contained in:
@@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 27 04:03:59 UTC 2018 - stefan.bruens@rwth-aachen.de
|
||||||
|
|
||||||
|
- Fix build on Leap 42.x, remove space in OPENJPEG_INCLUDE
|
||||||
|
- Cleanup spec file/build
|
||||||
|
+ Do not build source documentation in PDF format, drop TeXlive
|
||||||
|
BuildRequires
|
||||||
|
+ Move source documentation to devel-doc subpackage
|
||||||
|
+ Move standalone HTML user manual to doc subpackage
|
||||||
|
+ Fix path to QCH help files
|
||||||
|
+ Shrink documentation images using optipng
|
||||||
|
+ trivial cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 2 18:21:57 UTC 2018 - crrodriguez@opensuse.org
|
Fri Mar 2 18:21:57 UTC 2018 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@@ -30,11 +30,8 @@ BuildRequires: fdupes
|
|||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: icns-utils
|
BuildRequires: icns-utils
|
||||||
|
BuildRequires: optipng
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: texlive-epstopdf-bin
|
|
||||||
BuildRequires: texlive-latex-bin
|
|
||||||
BuildRequires: texlive-makeindex-bin
|
|
||||||
BuildRequires: texlive-metafont-bin
|
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: pkgconfig(Qt5Core)
|
BuildRequires: pkgconfig(Qt5Core)
|
||||||
BuildRequires: pkgconfig(Qt5Gui)
|
BuildRequires: pkgconfig(Qt5Gui)
|
||||||
@@ -49,29 +46,9 @@ BuildRequires: pkgconfig(fftw3)
|
|||||||
BuildRequires: pkgconfig(libopenjp2)
|
BuildRequires: pkgconfig(libopenjp2)
|
||||||
BuildRequires: pkgconfig(log4cpp)
|
BuildRequires: pkgconfig(log4cpp)
|
||||||
BuildRequires: pkgconfig(poppler-qt5)
|
BuildRequires: pkgconfig(poppler-qt5)
|
||||||
BuildRequires: tex(8r.enc)
|
|
||||||
BuildRequires: tex(adjustbox.sty)
|
|
||||||
BuildRequires: tex(caption.sty)
|
|
||||||
BuildRequires: tex(colortbl.sty)
|
|
||||||
BuildRequires: tex(fancyhdr.sty)
|
|
||||||
BuildRequires: tex(float.sty)
|
|
||||||
BuildRequires: tex(geometry.sty)
|
|
||||||
BuildRequires: tex(helvet.sty)
|
|
||||||
BuildRequires: tex(hyperref.sty)
|
|
||||||
BuildRequires: tex(multirow.sty)
|
|
||||||
BuildRequires: tex(natbib.sty)
|
|
||||||
BuildRequires: tex(pcrr8t.tfm)
|
|
||||||
BuildRequires: tex(phvr8t.tfm)
|
|
||||||
BuildRequires: tex(sectsty.sty)
|
|
||||||
BuildRequires: tex(tabu.sty)
|
|
||||||
BuildRequires: tex(textcomp.sty)
|
|
||||||
BuildRequires: tex(tocloft.sty)
|
|
||||||
BuildRequires: tex(wasy7.tfm)
|
|
||||||
BuildRequires: tex(wasysym.sty)
|
|
||||||
BuildRequires: tex(xtab.sty)
|
|
||||||
Requires(post): desktop-file-utils
|
Requires(post): desktop-file-utils
|
||||||
Requires(postun): desktop-file-utils
|
Requires(postun): desktop-file-utils
|
||||||
Recommends: %{name}-doc
|
Suggests: %{name}-doc
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -89,18 +66,27 @@ BuildArch: noarch
|
|||||||
%description doc
|
%description doc
|
||||||
This package contains the documentation for Engauge Digitizer.
|
This package contains the documentation for Engauge Digitizer.
|
||||||
|
|
||||||
|
%package devel-doc
|
||||||
|
Summary: Development documentation for Engauge Digitizer
|
||||||
|
Group: Documentation/HTML
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel-doc
|
||||||
|
This package contains the development documentation for Engauge Digitizer.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# ADD JPEG2000 SUPPORT
|
# ADD JPEG2000 SUPPORT
|
||||||
export OPENJPEG_INCLUDE=$(pkg-config --cflags-only-I libopenjp2 | sed -e 's@-I@@g')
|
export OPENJPEG_INCLUDE=$(pkg-config --cflags-only-I libopenjp2 | sed -e 's@-I\(\S\+\).*@\1@g')
|
||||||
export OPENJPEG_LIB=%{_libdir}
|
export OPENJPEG_LIB=%{_libdir}
|
||||||
export POPPLER_INCLUDE=%{_includedir}/poppler/qt5
|
export POPPLER_INCLUDE=%{_includedir}/poppler/qt5
|
||||||
export POPPLER_LIB=%{_libdir}
|
export POPPLER_LIB=%{_libdir}
|
||||||
|
|
||||||
qmake-qt5 engauge.pro \
|
qmake-qt5 engauge.pro \
|
||||||
"DEFINES+=HELPDIR=%{_docdir}/%{name}/help" \
|
"DEFINES+=HELPDIR=%{_docdir}/%{name}/" \
|
||||||
QMAKE_CFLAGS="%optflags -fno-strict-aliasing" \
|
QMAKE_CFLAGS="%optflags -fno-strict-aliasing" \
|
||||||
QMAKE_CXXFLAGS="%optflags -fno-strict-aliasing" \
|
QMAKE_CXXFLAGS="%optflags -fno-strict-aliasing" \
|
||||||
CONFIG+="pdf jpeg2000"
|
CONFIG+="pdf jpeg2000"
|
||||||
@@ -108,34 +94,27 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
# HELP files
|
# HELP files
|
||||||
pushd help
|
pushd help
|
||||||
|
# CRLF -> LF
|
||||||
|
sed -i 's/\r$//' engauge.qhcp dateformats.css dateformats.html
|
||||||
|
optipng -o2 *png
|
||||||
qcollectiongenerator-qt5 engauge.qhcp -o engauge.qhc
|
qcollectiongenerator-qt5 engauge.qhcp -o engauge.qhc
|
||||||
mv engauge.qch ../bin/documentation
|
mv engauge.qch engauge.qhc ../
|
||||||
mv engauge.qhc ../bin/documentation
|
rm build build.mingw engauge.qhcp .gitignore
|
||||||
rm -f build
|
|
||||||
rm .gitignore
|
|
||||||
for f in engauge.qhcp dateformats.css
|
|
||||||
do
|
|
||||||
sed -i 's/\r$//' ${f}
|
|
||||||
done
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#HTML/Latex documentation files
|
# Generate source code documentation in HTML format
|
||||||
pushd src
|
pushd src
|
||||||
|
sed -i 's/\(GENERATE_LATEX.*\)=.*/\1 = NO/' Doxyfile
|
||||||
doxygen
|
doxygen
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd doc/doxygen/latex
|
|
||||||
make pdf
|
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -Dm 755 bin/engauge %{buildroot}%{_bindir}/engauge
|
install -Dm 755 bin/engauge %{buildroot}%{_bindir}/engauge
|
||||||
|
|
||||||
# INSTALL HI-RES ICONS
|
# INSTALL HI-RES ICONS
|
||||||
pushd src/img
|
pushd src/img
|
||||||
icns2png -x digitizer.icns
|
icns2png -x digitizer.icns
|
||||||
for sz in 16 32 128 256 512;
|
for sz in 16 32 128 256 512; do
|
||||||
do
|
|
||||||
install -Dm 0644 digitizer_${sz}x${sz}x32.png %{buildroot}%{_datadir}/icons/hicolor/${sz}x${sz}/apps/%{name}.png
|
install -Dm 0644 digitizer_${sz}x${sz}x32.png %{buildroot}%{_datadir}/icons/hicolor/${sz}x${sz}/apps/%{name}.png
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
@@ -146,10 +125,7 @@ popd
|
|||||||
install -Dm 0644 dev/gnome/engauge-digitizer.appdata.xml \
|
install -Dm 0644 dev/gnome/engauge-digitizer.appdata.xml \
|
||||||
%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
|
%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
|
||||||
|
|
||||||
#MANUALLY INSTALL DOC FILES TO BE ABLE TO CLEANUP DUPLICATES USING fdupes
|
%fdupes -s doc/doxygen/html
|
||||||
mkdir -p %{buildroot}%{_docdir}/%{name}-doc
|
|
||||||
cp -pr doc/doxygen/html %{buildroot}%{_docdir}/%{name}-doc/
|
|
||||||
%fdupes %{buildroot}%{_docdir}/%{name}-doc/html/
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%icon_theme_cache_post
|
%icon_theme_cache_post
|
||||||
@@ -161,7 +137,7 @@ cp -pr doc/doxygen/html %{buildroot}%{_docdir}/%{name}-doc/
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.md help bin/documentation/engauge.qhc bin/documentation/engauge.qch
|
%doc README.md engauge.qhc engauge.qch
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/engauge
|
%{_bindir}/engauge
|
||||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||||
@@ -170,7 +146,9 @@ cp -pr doc/doxygen/html %{buildroot}%{_docdir}/%{name}-doc/
|
|||||||
%{_datadir}/appdata/%{name}.appdata.xml
|
%{_datadir}/appdata/%{name}.appdata.xml
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/doxygen/latex/refman.pdf
|
%doc help
|
||||||
%{_docdir}/%{name}-doc/html
|
|
||||||
|
%files devel-doc
|
||||||
|
%doc doc/doxygen/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user