gnuplot/gnuplot.spec

165 lines
5.6 KiB
RPMSpec
Raw Permalink Normal View History

2023-04-14 16:17:03 +08:00
%global major_minor 5.4
2020-02-18 09:59:27 +08:00
Name: gnuplot
Summary: a portable command-line driven graphing utility
2023-04-14 16:17:03 +08:00
Version: %{major_minor}.5
Release: 1
2020-02-18 09:59:27 +08:00
License: gnuplot and MIT
URL: http://www.gnuplot.info/
2023-04-14 16:17:03 +08:00
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
2020-02-18 09:59:27 +08:00
Patch1: gnuplot-4.2.0-fonts.patch
2023-04-14 16:17:03 +08:00
Patch3: gnuplot-4.6.1-plot-sigsegv.patch
Patch4: gnuplot-4.6.4-singlethread.patch
Patch5: gnuplot-5.0.0-lua_checkint.patch
Patch6: gnuplot-5.4.3-no-lena.patch
Patch7: gnuplot-5.2.2-doc.patch
Patch8: gnuplot-5.2.8-cmd-opts.patch
Patch9: gnuplot-config.patch
2020-02-18 09:59:27 +08:00
BuildRequires: cairo-devel latex2html emacs gd-devel giflib-devel libotf libpng-devel
BuildRequires: librsvg2 texinfo libX11-devel libXt-devel lua-devel m17n-lib tex-tex4ht
BuildRequires: tex(ecrm1000.tfm) tex(subfigure.sty) tex(cm-super-t1.enc)
2020-02-18 09:59:27 +08:00
BuildRequires: zlib-devel libjpeg-turbo-devel pango-devel qt5-linguist tex(latex)
BuildRequires: qt5-qtsvg-devel qt5-qtbase-devel /usr/bin/texi2dvi
Requires: tex-preview dejavu-sans-fonts
Requires: tex(latex) tex(cm-super-t1.enc) tex(ecrm1000.tfm) tex(utf8x.def)
2023-04-14 16:17:03 +08:00
Requires(post): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
2020-02-18 09:59:27 +08:00
Obsoletes: gnuplot-qt < 5.0.0-4
2023-04-14 16:17:03 +08:00
Obsoletes: %{name}-common < %{version}-%{release}
2020-02-18 09:59:27 +08:00
Provides: %{name}-common = %{version}-%{release}
2023-04-14 16:17:03 +08:00
Obsoletes: %{name}-minimal < %{version}-%{release}
Provides: %{name}-minimal = %{version}-%{release}
Obsoletes: %{name}-latex < %{version}-%{release}
2020-02-18 09:59:27 +08:00
Provides: %{name}-latex = %{version}-%{release}
Obsoletes: emacs-%{name} <= 5.0.0-3
Obsoletes: emacs-%{name}-el <= 5.0.0-3
%description
Gnuplot is a portable command-line driven graphing utility for Linux, OS/2, MS
Windows, OSX, VMS, and many other platforms. The source code is copyrighted but
freely distributed (i.e., you don't have to pay for it). It was originally
created to allow scientists and students to visualize mathematical functions and
data interactively, but has grown to support many non-interactive uses such as
web scripting. It is also used as a plotting engine by third-party applications
like Octave. Gnuplot has been supported and under active development since 1986.
%package_help
%prep
%autosetup -p1
2023-04-14 16:17:03 +08:00
rm -rf demo/lena*
2020-02-18 09:59:27 +08:00
sed -i -e 's:"/usr/lib/X11/app-defaults":"%{_datadir}/X11/app-defaults":' src/gplt_x11.c
2023-04-14 16:17:03 +08:00
chmod 644 src/getcolor.h
chmod 644 demo/html/webify.pl
chmod 644 demo/html/webify_svg.pl
chmod 644 demo/html/webify_canvas.pl
2020-02-18 09:59:27 +08:00
%build
2023-04-14 16:17:03 +08:00
rm -rf demo/plugin/*.so demo/plugin/*.o
2020-02-18 09:59:27 +08:00
%global configure_opts \\\
--with-readline=builtin \\\
--enable-history-file \\\
--with-texdir=/usr/share/texlive/texmf-dist/tex/latex/gnuplot
2020-02-18 09:59:27 +08:00
mkdir minimal
pushd minimal
cp -a ../configure .
%configure %{configure_opts} \
--disable-wxwidgets \
--without-qt
%make_build
popd
mkdir qt
pushd qt
cp -a ../configure .
%configure %{configure_opts} \
--disable-wxwidgets \
--enable-qt
%make_build
popd
2023-04-14 16:17:03 +08:00
%configure %{configure_opts}
2020-02-18 09:59:27 +08:00
ln -s ../minimal/src/%{name} src/
make -C docs info
2020-02-18 09:59:27 +08:00
export GNUPLOT_PS_DIR=../../term/PostScript
make -C docs/psdoc ps_symbols.ps ps_fontfile_doc.pdf
2023-04-14 16:17:03 +08:00
rm -rf docs/htmldocs/images.idx
2020-02-18 09:59:27 +08:00
%install
make -C qt install DESTDIR=%{buildroot} INSTALL='install -p'
2023-04-14 16:17:03 +08:00
mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-qt
2020-02-18 09:59:27 +08:00
install -p -m 755 minimal/src/%{name} %{buildroot}%{_bindir}/%{name}-minimal
make -C docs install-info DESTDIR=%{buildroot} INSTALL='install -p'
2023-04-14 16:17:03 +08:00
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
2020-02-18 09:59:27 +08:00
install -d %{buildroot}%{_datadir}/X11/app-defaults
2023-04-14 16:17:03 +08:00
mv %{buildroot}%{_datadir}/%{name}/%{major_minor}/app-defaults/Gnuplot %{buildroot}%{_datadir}/X11/app-defaults/Gnuplot
rm -rf $RPM_BUILD_ROOT%{_libdir}/
ln -s gnuplot.1 $RPM_BUILD_ROOT/%{_mandir}/man1/gnuplot-qt.1
2020-02-18 09:59:27 +08:00
touch %{buildroot}%{_bindir}/%{name}
%posttrans
%{_sbindir}/alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-qt 61
%{_sbindir}/alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-minimal 40
%post
[ -e %{_bindir}/texhash ] && %{_bindir}/texhash 2> /dev/null;
%preun
if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove %{name} %{_bindir}/%{name}-qt || :
%{_sbindir}/alternatives --remove %{name} %{_bindir}/%{name}-minimal || :
fi
%files
%ghost %attr(0755,-,-) %{_bindir}/%{name}
%{_bindir}/%{name}-qt
%{_libexecdir}/%{name}/%{major_minor}/%{name}_qt
%{_datadir}/%{name}/%{major_minor}/qt/
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/%{major_minor}
%dir %{_datadir}/%{name}/%{major_minor}/PostScript
%{_datadir}/%{name}/%{major_minor}/PostScript/*.ps
%{_datadir}/%{name}/%{major_minor}/PostScript/aglfn.txt
%dir %{_datadir}/%{name}/%{major_minor}/js
%{_datadir}/%{name}/%{major_minor}/js/*
%dir %{_datadir}/%{name}/%{major_minor}/lua/
%{_datadir}/%{name}/%{major_minor}/lua/%{name}-tikz.lua
%{_datadir}/%{name}/%{major_minor}/colors_*
%{_datadir}/%{name}/%{major_minor}/%{name}.gih
%{_datadir}/%{name}/%{major_minor}/%{name}rc
%dir %{_libexecdir}/%{name}
%dir %{_libexecdir}/%{name}/%{major_minor}
%{_libexecdir}/%{name}/%{major_minor}/%{name}_x11
%{_datadir}/X11/app-defaults/Gnuplot
2023-04-14 16:17:03 +08:00
%{_infodir}/%{name}.info*
2020-02-18 09:59:27 +08:00
%{_bindir}/%{name}-minimal
%{_datadir}/texlive/texmf-dist/tex/latex/%{name}/
2020-02-18 09:59:27 +08:00
%files help
2023-04-14 16:17:03 +08:00
%doc BUGS Copyright FAQ.pdf NEWS README RELEASE_NOTES
%{_mandir}/man1/gnuplot.1*
%{_mandir}/man1/gnuplot-qt.1*
2020-02-18 09:59:27 +08:00
%doc docs/psdoc/ps_guide.ps
%doc docs/psdoc/ps_symbols.ps
%doc docs/psdoc/ps_file.doc demo
%doc docs/psdoc/ps_fontfile_doc.pdf
%changelog
2023-04-14 16:17:03 +08:00
* Fri Apr 14 2023 liyanan <thistleslyn@163.com> - 5.4.5-1
- Update to 5.4.5
* Thu Feb 09 2023 Ge Wang <wangge20@h-partners.com> - 5.0.6-13
- Fix Missing texdir build failure due to texlive-base updated
2020-02-18 09:59:27 +08:00
* Mon Feb 17 2020 Tianfei <tianfei16@huawei.com> - 5.0.6-12
- Package init