Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > a615737f3c69c521cae1d1fbd25b94b7 > files > 3

plotutils-2.6-1mdv2010.0.src.rpm

%define name plotutils
%define version 2.6
%define release %mkrel 1
%define major 2

%define libname %mklibname %name %major
%define develname %mklibname %name -d

Summary: GNU Plotting Utilities
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Group: Graphics
Source: %{name}-%{version}.tar.gz
Patch0: plotutils-2.5.1-fix-str-fmt.patch
URL: http://www.gnu.org/software/plotutils/plotutils.html
Requires: ghostscript-fonts >= 4 texinfo >= 3.9
Buildroot: %{_tmppath}/%{name}-buildroot
BuildRequires: flex
BuildRequires: Xaw3d-devel
BuildRequires: zlib1-devel
BuildRequires: png-devel
BuildRequires: libtool
BuildRequires: bison
BuildRequires: libxaw-devel

%description 
The GNU plotting utilities, sometimes called 'plotutils', include: 
(1) GNU libplot, a shared library for exporting 2-D vector graphics files
and for performing vector graphics animation under the X Window System.
Its output file formats include the new WebCGM format, pseudo-GIF, PNM,
Adobe Illustrator, Postscript (editable with the free 'idraw' drawing
editor), Fig (editable with the free 'xfig' drawing editor), PCL 5, HP-GL
and HP-GL/2, Tektronix, and GNU metafile format.  Many Postscript, PCL, and
Hershey fonts are supported.  A separate class library, 'libplotter',
provides a C++ binding to libplot's functionality.  (2) Sample command-line
applications 'graph', 'plot', 'tek2plot', 'pic2plot', and 'plotfont', which
are built on top of GNU libplot.  'graph' is a powerful utility for XY
plotting, 'plot' translates GNU metafiles to other formats, 'tek2plot'
translates legacy Tektronix data, 'pic2plot' translates box-and-arrow
diagrams in the pic language, and 'plotfont' plots character maps.
(3) Command-line applications 'spline', 'double', and 'ode', which are useful
in scientific plotting.  'spline' does spline interpolation of input data
of arbitrary dimensionality.  It uses cubic splines, splines under tension,
or cubic Bessel interpolation.  'ode' is an interactive program that can
integrate a user-specified system of ordinary differential equations.

%package -n %libname
Summary: Main library for %{name}
Group: Graphics
Provides: lib%name = %version-%release

%description -n %libname
This package contains the library needed to run programs dynamically
linked with %{name}.

%package -n %{develname}
Summary: Headers for developing programs that will use %{name}
Group: Development/Other
Requires: %{libname} = %{version}-%{release}
Provides: lib%{name}-devel = %{version}-%{release}
Provides: %{name}-devel = %{version}
Obsoletes: %{libname}-devel

%description -n %{develname}
This package contains the headers that programmers will need to develop
applications which will use %{name}.

%prep
%setup -q
%patch0 -p0

%build
%configure2_5x --enable-libplotter
%make LIBTOOL=/usr/bin/libtool

%install
export PATH=/usr/bin/X11:/usr/X11/bin:$PATH
make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT%{_libdir}/X11/fonts/misc
cp -p fonts/pcf/*.pcf $RPM_BUILD_ROOT%{_libdir}/X11/fonts/misc

%clean 
rm -rf $RPM_BUILD_ROOT

%post
export PATH=/sbin:/usr/bin/X11:/usr/X11/bin:/usr/bin:$PATH
install-info /usr/share/info/plotutils.info %{_infodir}/dir
cd %{_libdir}/X11/fonts/misc
mkfontdir
if ! test -f %{_libdir}/X11/fonts/Type1/a010013l.pfb ; then
if test -f %{_datadir}/ghostscript/fonts/a010013l.pfb ; then
cd %{_datadir}/ghostscript/fonts
for i in *.pfb ; do
ln -s %{_datadir}/ghostscript/fonts/$i %{_libdir}/X11/fonts/Type1/$i
done
cd %{_libdir}/X11/fonts/Type1
echo 'a010013l.pfb -adobe-itc avant garde gothic-book-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'a010015l.pfb -adobe-itc avant garde gothic-demi-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'a010033l.pfb -adobe-itc avant garde gothic-book-o-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'a010035l.pfb -adobe-itc avant garde gothic-demi-o-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'b018012l.pfb -adobe-itc bookman-light-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'b018015l.pfb -adobe-itc bookman-demi-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'b018032l.pfb -adobe-itc bookman-light-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'b018035l.pfb -adobe-itc bookman-demi-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'c059013l.pfb -adobe-new century schoolbook-medium-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'c059016l.pfb -adobe-new century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'c059033l.pfb -adobe-new century schoolbook-medium-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'c059036l.pfb -adobe-new century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'd050000l.pfb -adobe-itc zapf dingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific' >> fonts.scale
echo 'n019003l.pfb -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019004l.pfb -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019023l.pfb -adobe-helvetica-medium-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019024l.pfb -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019043l.pfb -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019044l.pfb -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019063l.pfb -adobe-helvetica-medium-i-narrow--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n019064l.pfb -adobe-helvetica-bold-i-narrow--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n021003l.pfb -adobe-times-medium-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n021004l.pfb -adobe-times-bold-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n021023l.pfb -adobe-times-medium-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n021024l.pfb -adobe-times-bold-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'n022003l.pfb -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1' >> fonts.scale
echo 'n022004l.pfb -adobe-courier-bold-r-normal--0-0-0-0-m-0-iso8859-1' >> fonts.scale
echo 'n022023l.pfb -adobe-courier-medium-o-normal--0-0-0-0-m-0-iso8859-1' >> fonts.scale
echo 'n022024l.pfb -adobe-courier-bold-o-normal--0-0-0-0-m-0-iso8859-1' >> fonts.scale
echo 'p052003l.pfb -adobe-palatino-medium-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'p052004l.pfb -adobe-palatino-bold-r-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'p052023l.pfb -adobe-palatino-medium-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 'p052024l.pfb -adobe-palatino-bold-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
echo 's050000l.pfb -adobe-symbol-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific' >> fonts.scale
echo 'z003034l.pfb -adobe-itc zapf chancery-medium-i-normal--0-0-0-0-p-0-iso8859-1' >> fonts.scale
mkfontdir
fi
fi
if test "$DISPLAY" != "" ; then xset fp rehash 2> /dev/null ; fi

%preun
export PATH=/sbin:/usr/bin:$PATH
if [ $1 = 0 ]; then
install-info --delete /usr/info/plotutils.info /usr/info/dir
fi

%postun
export PATH=/sbin:/usr/bin/X11:/usr/X11/bin:$PATH
cd %{_libdir}/X11/fonts/misc
mkfontdir
if test "$DISPLAY" != "" ; then xset fp rehash 2> /dev/null ; fi

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files
%defattr (-,root,root)
%doc AUTHORS INSTALL.fonts KNOWN_BUGS NEWS ONEWS PROBLEMS README THANKS
%{_bindir}/*
%{_libdir}/X11/fonts/misc/*
%{_mandir}/man1/*
%{_infodir}/*
%dir %{_datadir}/ode
%{_datadir}/ode/*
%dir %{_datadir}/tek2plot
%{_datadir}/tek2plot/*
%dir %{_datadir}/pic2plot
%{_datadir}/pic2plot/*

%files -n %{libname}
%defattr (-,root,root)
%{_libdir}/*so.%{major}*

%files -n %{develname}
%defattr (-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%dir %{_datadir}/libplot
%{_datadir}/libplot/*   
%doc README




%changelog
* Sun Sep 27 2009 Frederik Himpe <fhimpe@mandriva.org> 2.6-1mdv2010.0
+ Revision: 449725
- Update to new version 2.6

* Tue Sep 15 2009 Thierry Vignaud <tvignaud@mandriva.com> 2.5.1-3mdv2010.0
+ Revision: 441879
- rebuild

* Sun Mar 29 2009 Funda Wang <fundawang@mandriva.org> 2.5.1-2mdv2009.1
+ Revision: 362047
- BR bison
- BR libtool
- fix str fmt

* Mon Aug 25 2008 Emmanuel Andry <eandry@mandriva.org> 2.5.1-1mdv2009.0
+ Revision: 275837
- New version
- apply devel policy
- check major

* Fri Aug 01 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.5-5mdv2009.0
+ Revision: 259101
- rebuild

* Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.5-4mdv2009.0
+ Revision: 247025
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Mon Jan 21 2008 Lev Givon <lev@mandriva.org> 2.5-2mdv2008.1
+ Revision: 155641
- Build plotter devel libraries.

* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 2.5-1mdv2008.1
+ Revision: 136426
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request


* Sun Feb 25 2007 Emmanuel Andry <eandry@mandriva.org> 2.5-1mdv2007.0
+ Revision: 125491
- buildrequires libxaw-devel
- New version 2.5

* Tue Aug 08 2006 Olivier Thauvin <nanardon@mandriva.org> 2.4.1-14mdv2007.0
+ Revision: 54220
- bump release
- rebuild
- Import plotutils

* Sun Jul 09 2006 Emmanuel Andry <eandry@mandriva.org> 2.4.1-12mdv2007.0
- %%mkrel

* Fri Jan 20 2006 Marcel Pol <mpol@mandriva.org> 2.4.1-11mdk
- fix postinstall scripts for x86_64