SHA256
1
0
forked from pool/gnuplot

Accepting request 725853 from home:StefanBruens:branches:Publishing

Split and cleanup
Also see https://build.opensuse.org/request/show/725852

OBS-URL: https://build.opensuse.org/request/show/725853
OBS-URL: https://build.opensuse.org/package/show/Publishing/gnuplot?expand=0&rev=106
This commit is contained in:
Martin Pluskal 2019-08-26 01:27:25 +00:00 committed by Git OBS Bridge
parent 61197ddcc1
commit 6dda9cd3df
4 changed files with 111 additions and 122 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>doc</package>
</multibuild>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0535c31cf7c8b4417ac88eedd3e5133048c43a0226c6bcb495d44c66a2534381
size 52480

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon Aug 5 17:02:18 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Use _multibuild for documentation subpackage. The documentation requires
TeX and emacs, which significantly add to the build dependencies (emacs
depends on webkit2gtk, which depends on rust).
- Split Gnuplot mode files for emacs from the gnuplot package. The
gnuplot mode packages has no build dependency on gnuplot, while
the split removes the emacs build dependency from gnuplot.
- Disable KDE3 era DCOP support
- Move man pages to main package
- Do not package figure_*.pdf build artifacts, created for PDF manual
- Cleanup spec file:
* Fix RPM Group for doc package
* Remove support for openSUSE 13.1 (Qt4)
* Remove support for X11 installed in /usr/X11R6/
* Remove defattr macro use
* Disable (S)VGA terminal (requires unvailable libvga)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 31 07:29:54 UTC 2019 - Dr. Werner Fink <werner@suse.de> Fri May 31 07:29:54 UTC 2019 - Dr. Werner Fink <werner@suse.de>

View File

@ -16,81 +16,74 @@
# #
%bcond_without h3d_gridbox %global flavor @BUILD_FLAVOR@%{nil}
%if 0%{suse_version} > 1310 %global sname gnuplot
%define qtver 5 %if "%{flavor}" == ""
%else %else
%define qtver 4 %global psuffix -%{flavor}
%endif %endif
Name: gnuplot
%bcond_without h3d_gridbox
Name: gnuplot%{?psuffix}
BuildRequires: ImageMagick BuildRequires: ImageMagick
BuildRequires: automake BuildRequires: automake
BuildRequires: cairo-devel BuildRequires: cairo-devel
BuildRequires: emacs-nox BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gd-devel
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: libqt5-linguist-devel
BuildRequires: lua-devel
BuildRequires: netpbm BuildRequires: netpbm
BuildRequires: pango-devel BuildRequires: pango-devel
BuildRequires: plotutils-devel
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: pkgconfig(caca) BuildRequires: wxWidgets-devel >= 3
BuildRequires: pkgconfig(gdlib) BuildRequires: zziplib
BuildRequires: pkgconfig(x11)
%if %qtver >= 5
BuildRequires: libqt5-linguist-devel
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Svg)
%else BuildRequires: pkgconfig(caca)
BuildRequires: libqt4-devel >= 4.5
%endif
BuildRequires: fdupes
BuildRequires: latex2html
BuildRequires: lua-devel
BuildRequires: makeinfo
BuildRequires: plotutils-devel
BuildRequires: texlive-dvips
BuildRequires: texlive-epstopdf
BuildRequires: texlive-latex
BuildRequires: texlive-latexconfig
BuildRequires: texlive-tex
BuildRequires: texlive-tex4ht
BuildRequires: texlive-texinfo
BuildRequires: texlive-ucs
BuildRequires: texlive-ucs
BuildRequires: zziplib
BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gdlib)
BuildRequires: pkgconfig(libcerf) BuildRequires: pkgconfig(libcerf)
BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libpng16) BuildRequires: pkgconfig(libpng16)
BuildRequires: pkgconfig(x11)
%if "%{flavor}" == "doc"
BuildRequires: emacs-nox
BuildRequires: gnuplot
BuildRequires: latex2html
BuildRequires: makeinfo
BuildRequires: texlive-epstopdf
BuildRequires: texlive-latex
BuildRequires: texlive-latexconfig
BuildRequires: texlive-pdftex
BuildRequires: texlive-tex4ht
BuildRequires: texlive-texinfo
BuildRequires: texlive-ucs
BuildRequires: tex(fancyhdr.sty) BuildRequires: tex(fancyhdr.sty)
BuildRequires: tex(hyperref.sty) BuildRequires: tex(hyperref.sty)
BuildRequires: tex(pdftex.def) BuildRequires: tex(pdftex.def)
BuildRequires: tex(subfigure.sty) BuildRequires: tex(subfigure.sty)
%if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1310
BuildRequires: wxWidgets-devel
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%else
BuildRequires: wxWidgets-devel >= 3
%endif %endif
Url: http://www.gnuplot.info/ Url: http://www.gnuplot.info/
Version: 5.2.7 Version: 5.2.7
Release: 0 Release: 0
%if "%{flavor}" == ""
Summary: Function Plotting Utility and more Summary: Function Plotting Utility and more
License: SUSE-Gnuplot AND GPL-2.0-or-later License: SUSE-Gnuplot AND GPL-2.0-or-later
Group: Productivity/Graphics/Visualization/Graph Group: Productivity/Graphics/Visualization/Graph
%else
Summary: Documentation of GNUplot
License: SUSE-Gnuplot AND GPL-2.0-or-later
Group: Documentation/Other
%endif
Source0: http://downloads.sourceforge.net/project/gnuplot/gnuplot/%{version}/gnuplot-%{version}.tar.gz Source0: http://downloads.sourceforge.net/project/gnuplot/gnuplot/%{version}/gnuplot-%{version}.tar.gz
Source2: gnuplot-fr.doc.bz2 Source2: gnuplot-fr.doc.bz2
Source3: README.whynot Source3: README.whynot
# According to the gnuplot 5.0.0 release notes, the emacs .el should now be
# available at https://github.com/rudi/gnuplot-el but it doesn't exist anymore.
# Use the files from the lisp/ directory from gnuplot' CVS just before it was
# removed on 6 March 2014.
Source4: gnuplot-el.tar.bz2
# http://mirrors.ctan.org/macros/latex209/contrib/picins/picins.sty # http://mirrors.ctan.org/macros/latex209/contrib/picins/picins.sty
# That's a build requirement, not provided by Tex Live # That's a build requirement, not provided by Tex Live
Source5: picins.sty Source5: picins.sty
@ -103,22 +96,17 @@ Patch4: gnuplot-4.6.0-demo.diff
Patch5: gnuplot-wx3.diff Patch5: gnuplot-wx3.diff
Patch6: gnuplot-QtCore-PIC.dif Patch6: gnuplot-QtCore-PIC.dif
Patch7: gnuplot-gd.patch Patch7: gnuplot-gd.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%define _x11lib %{_exec_prefix}/%{_lib}
%define _x11data %{_exec_prefix}/lib/X11
%define _libx11 %{_x11data}
%define _x11inc %{_exec_prefix}/include
%define _appdef %{_x11data}/app-defaults
%else
%define _x11lib %{_libdir} %define _x11lib %{_libdir}
%define _x11data %{_datadir}/X11 %define _x11data %{_datadir}/X11
%define _libx11 %{_exec_prefix}/lib/X11 %define _libx11 %{_exec_prefix}/lib/X11
%define _x11inc %{_includedir}
%define _appdef %{_x11data}/app-defaults %define _appdef %{_x11data}/app-defaults
%endif
%define _gnplttex tex/latex/gnuplot %define _gnplttex tex/latex/gnuplot
%if "%{flavor}" == "doc"
Requires: %{sname}
Requires(post): %install_info_prereq
Requires(preun): %install_info_prereq
BuildArch: noarch
%endif
%description %description
GNUplot is a command line driven interactive function plotting utility. GNUplot is a command line driven interactive function plotting utility.
@ -126,25 +114,12 @@ GNUplot is a command line driven interactive function plotting utility.
printers (including many color devices and pseudodevices like LaTeX) printers (including many color devices and pseudodevices like LaTeX)
and can easily be extended to include new devices. and can easily be extended to include new devices.
%package doc %if "%{flavor}" == "doc"
Summary: Documentation of GNUplot %{sname} documentation files including the info pages.
Group: Productivity/Graphics/Visualization/Graph %endif
Requires: %{name}
Requires(post): %install_info_prereq
Requires(preun): %install_info_prereq
BuildArch: noarch
%description doc
GNUplot documentation files including the man and info pages. GNUplot
is a command line driven interactive function plotting utility.
GNUplot supports many different types of terminals, plotters, and
printers (including many color devices and pseudodevices like LaTeX)
and can easily be extended to include new devices.
%{name} documentation files including the man and info pages
%prep %prep
%setup -qa 4 %setup -q -n %{sname}-%{version}
bunzip2 -dc %{_sourcedir}/gnuplot-fr.doc.bz2 > docs/gnuplot-fr.doc bunzip2 -dc %{_sourcedir}/gnuplot-fr.doc.bz2 > docs/gnuplot-fr.doc
test $? -eq 0 || exit 1 test $? -eq 0 || exit 1
cp %{_sourcedir}/picins.sty docs cp %{_sourcedir}/picins.sty docs
@ -159,10 +134,9 @@ cp %{_sourcedir}/picins.sty docs
%build %build
autoreconf -fi autoreconf -fi
SECSVGA="-DSVGA_IS_SECURE=1" export CPPFLAGS="-I%{_includedir}/gd -DAppDefDir=\\\"%{_appdef}\\\""
export CPPFLAGS="-I%{_x11inc} -I%{_includedir}/gd -DAppDefDir=\\\"%{_appdef}\\\"" export CPPFLAGS="$CPPFLAGS -DGNUPLOT_LIB_DEFAULT=\\\"%{_docdir}/%{sname}/demo\\\""
export CPPFLAGS="$CPPFLAGS -DGNUPLOT_LIB_DEFAULT=\\\"%{_docdir}/%{name}/demo\\\"" export CFLAGS="${RPM_OPT_FLAGS} -pipe -D_GNU_SOURCE"
export CFLAGS="${RPM_OPT_FLAGS} -pipe ${SECSVGA} -D_GNU_SOURCE"
export CXXFLAGS="$CFLAGS -fno-strict-aliasing" export CXXFLAGS="$CFLAGS -fno-strict-aliasing"
export LDFLAGS="-L%{_x11lib} -Wl,--as-needed" export LDFLAGS="-L%{_x11lib} -Wl,--as-needed"
export ARCHLIB=%_lib export ARCHLIB=%_lib
@ -173,32 +147,22 @@ autoreconf -fi
export CFLAGS="$CFLAGS -DDIST_CONTACT='https://bugzilla.suse.com/'" export CFLAGS="$CFLAGS -DDIST_CONTACT='https://bugzilla.suse.com/'"
%endif %endif
%endif %endif
for f in docs/makefile*; do
test -e $f || continue
mv $f $f.bak
done
autoreconf -fi
# sed -i "s;bin/uic;bin/uic-qt5;g" ./configure
# sed -i "s;bin/moc;bin/moc-qt5;g" ./configure
# sed -i "s;bin/rcc;bin/rcc-qt5;g" ./configure
# sed -i "s;bin/lrelease;bin/lrelease-qt5;g" ./configure
# sed -i "s;UIC=uic;UIC=uic-qt5;g" ./configure
# sed -i "s;MOC=moc;MOC=moc-qt5;g" ./configure
# sed -i "s;RCC=rcc;RCC=rcc-qt5;g" ./configure
# sed -i "s;LRELEASE=lrelease;LRELEASE=lrelease-qt5;g" ./configure
%configure \ %configure \
--enable-stats \ --enable-stats \
--with-x \ --with-x \
--with-x-dcop \
--x-includes=%{_x11inc} \ --x-includes=%{_x11inc} \
--x-libraries=%{_x11lib}\ --x-libraries=%{_x11lib}\
--with-x-app-defaultdir=%{_appdef}\ --with-x-app-defaultdir=%{_appdef}\
--with-texdir=/usr/share/texmf/%{_gnplttex} \ --with-texdir=%{_datadir}/texmf/%{_gnplttex} \
--with-kpsexpand=%{_bindir}/kpsexpand \
%if "%{flavor}" == "doc"
--with-latex=yes \
%else
--with-latex=force \
%endif
--with-readline=gnu \ --with-readline=gnu \
--enable-history-file \ --enable-history-file \
--with-linux-vga \
--with-bitmap-terminals \ --with-bitmap-terminals \
--with-gpic \ --with-gpic \
--with-mif \ --with-mif \
@ -213,18 +177,17 @@ autoreconf -fi
--enable-backwards-compatibility\ --enable-backwards-compatibility\
--with-gd=%{_usr} \ --with-gd=%{_usr} \
--without-row-help \ --without-row-help \
--with-kpsexpand \
--with-caca \ --with-caca \
--with-qt=qt%{qtver} --with-qt=qt5
%if %{qtver} >= 5 %if "%{flavor}" == ""
make %{?_smp_mflags} UIC=/usr/bin/uic-qt5 MOC=/usr/bin/moc-qt5 RCC=/usr/bin/rcc-qt5 LRELEASE=/usr/bin/lrelease-qt5 make %{?_smp_mflags} UIC=/usr/bin/uic-qt5 MOC=/usr/bin/moc-qt5 RCC=/usr/bin/rcc-qt5 LRELEASE=/usr/bin/lrelease-qt5
%else
make %{?_smp_mflags}
%endif %endif
%if "%{flavor}" == "doc"
mv src/Makefile{,_INACESSIBLE}
pushd docs/ pushd docs/
make srcdir=. clean all html pdf make GNUPLOT_EXE=%{_bindir}/gnuplot srcdir=. clean html pdf
make srcdir=. gnuplot.texi make srcdir=. gnuplot.texi
patch -p0 < %{S:6} patch -p0 < %{S:6}
make srcdir=. info make srcdir=. info
@ -235,27 +198,30 @@ autoreconf -fi
pushd tutorial/ pushd tutorial/
make srcdir=. clean pdf make srcdir=. clean pdf
popd popd
pushd lisp/ %endif
for el_file in gnuplot.el gnuplot-gui.el; do
emacs -batch -q -no-site-file -l "dot.el" -f batch-byte-compile \
"$el_file"
done
popd
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%if "%{flavor}" == ""
make DESTDIR=%{buildroot} appdefaultdir=%{_appdef} install make DESTDIR=%{buildroot} appdefaultdir=%{_appdef} install
mkdir -p %{buildroot}/%{_infodir}
mkdir -p %{buildroot}/%{_mandir}/ja/man1 mkdir -p %{buildroot}/%{_mandir}/ja/man1
mv %{buildroot}/%{_mandir}/man1/gnuplot-ja.1 %{buildroot}/%{_mandir}/ja/man1/gnuplot.1
%endif
%if "%{flavor}" == "doc"
mkdir -p %{buildroot}/%{_infodir}
mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc
mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc/html mkdir -p %{buildroot}/%{_docdir}/gnuplot/doc/html
mkdir -p %{buildroot}/%{_docdir}/gnuplot/demo mkdir -p %{buildroot}/%{_docdir}/gnuplot/demo
mkdir -p %{buildroot}/%{_datadir}/emacs/site-lisp
rm -vf docs/htmldocs/images.{aux,idx,log,out,tex} rm -vf docs/htmldocs/images.{aux,idx,log,out,tex}
rm -vf docs/htmldocs/*.pl rm -vf docs/htmldocs/*.pl
rm -vf docs/htmldocs/*.aux
rm -vf docs/htmldocs/*.sty rm -vf docs/htmldocs/*.sty
rm -vf docs/htmldocs/WARNINGS rm -vf docs/htmldocs/WARNINGS
rm -vf docs/htmldocs/VERSION rm -vf docs/htmldocs/VERSION
rm -vf docs/figure_*.pdf
rm -vf tutorial/eg7.pdf
rm -rvf demo/html rm -rvf demo/html
install -m 0444 docs/*.info* %{buildroot}/%{_infodir}/ install -m 0444 docs/*.info* %{buildroot}/%{_infodir}/
install -m 0444 docs/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 docs/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/
@ -268,35 +234,39 @@ autoreconf -fi
install -m 0444 tutorial/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/ install -m 0444 tutorial/*.pdf %{buildroot}/%{_docdir}/gnuplot/doc/
install -m 0444 demo/*.* %{buildroot}/%{_docdir}/gnuplot/demo/ install -m 0444 demo/*.* %{buildroot}/%{_docdir}/gnuplot/demo/
install -m 0444 README* %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 README* %{buildroot}/%{_docdir}/gnuplot/
install -m 0444 Copyright %{buildroot}/%{_docdir}/gnuplot/
install -m 0444 VERSION %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 VERSION %{buildroot}/%{_docdir}/gnuplot/
install -m 0444 NEWS BUGS %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 NEWS BUGS %{buildroot}/%{_docdir}/gnuplot/
install -m 0444 %{SOURCE3} %{buildroot}/%{_docdir}/gnuplot/ install -m 0444 %{SOURCE3} %{buildroot}/%{_docdir}/gnuplot/
install -m 0444 lisp/gnuplot*.el* %{buildroot}/%{_datadir}/emacs/site-lisp/
mv %{buildroot}/%{_mandir}/man1/gnuplot-ja.1 %{buildroot}/%{_mandir}/ja/man1/gnuplot.1
rm -f %{buildroot}/%{_docdir}/gnuplot/demo/Makefile* rm -f %{buildroot}/%{_docdir}/gnuplot/demo/Makefile*
%endif
%fdupes -s %{buildroot} %fdupes -s %{buildroot}
%post doc %if "%{flavor}" == "doc"
%install_info --info-dir=.%{_infodir} .%{_infodir}/%{name}.info.gz %post
%install_info --info-dir=.%{_infodir} .%{_infodir}/%{sname}.info.gz
%preun doc %preun
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/%{name}.info.gz %install_info_delete --info-dir=.%{_infodir} .%{_infodir}/%{sname}.info.gz
%endif
%if "%{flavor}" == ""
%files %files
%defattr(-,root,root) %license Copyright
%{_bindir}/gnuplot %{_bindir}/gnuplot
%{_libexecdir}/gnuplot %{_libexecdir}/gnuplot
%{_datadir}/gnuplot %{_datadir}/gnuplot
%{_datadir}/texmf/%{_gnplttex}/ %dir %{_datadir}/texmf
%{_datadir}/emacs/site-lisp/ %{_datadir}/texmf/*
%dir %{_appdef}
%{_appdef}/Gnuplot %{_appdef}/Gnuplot
%files doc
%defattr(-,root,root,-)
%doc %{_docdir}/gnuplot/
%doc %{_infodir}/%{name}.info.gz
%doc %{_mandir}/man1/gnuplot.1.gz %doc %{_mandir}/man1/gnuplot.1.gz
%doc %{_mandir}/ja/man1/gnuplot.1.gz %doc %{_mandir}/ja/man1/gnuplot.1.gz
%endif
%if "%{flavor}" == "doc"
%files
%doc %{_docdir}/gnuplot/
%doc %{_infodir}/%{sname}.info.gz
%endif
%changelog %changelog