Summary: yaplot - an easy 3D modeller and animator
Name: yaplot
Version: 3.3
Release: 2%{?_dist_release}
Source: yaplot-%{version}.tar.bz2
Patch1: yaplot-common.patch
Patch2: yaplot-include.patch
Patch3: yaplot-config.patch
Patch4: yaplot-deltatime.patch
Patch5: yaplot-3.3-cache.patch
Patch6: yaplot-3.3-fix.patch
License: distributable
Group: Applications/Engineering
URL: http://www.chem.nagoya-u.ac.jp/matto/yaplot/
Packager: KOBAYASHI R. Taizo <tkoba@ike-dyn.ritsumei.ac.jp>
Requires: gtk+
BuildRequires: gtk+-devel automake16
Buildroot: %{_tmppath}/%{name}-root

Vendor: Project Vine
Distribution: Vine Linux

%description
yaplot is an easy 3D modeller and animator for visualizing the results
from computer simulation easily. You can browse the motion of the
3 dimentional wire frame model with text labels and some marks on the
cheap PC based X terminals. Data format is simple and intuitive.
It is the least beautiful and not durable for presentation,
but enough quick and smooth for daily use. (Do not expect much to yaplot!) 

%prep
%setup -q
%patch1 -p1 -b .common
%patch2 -p1 -b .include
%patch3 -p0 -b .conf
%patch4 -p0 -b .delta
%patch5 -p1 -b .cache
%patch6 -p1 -b .fix

for i in `grep -lr /usr/local/bin/perl *`
do
	perl -pi -e "s@/usr/local/bin/perl@/usr/bin/perl@g" $i
done
perl -pi -e "s@/usr/local/@/usr/@g" common.h


%build
aclocal
automake -a
autoconf
%configure --datadir=/usr/share
make

%install
rm -rf $RPM_BUILD_ROOT
#mkdir -p $RPM_BUILD_ROOT/usr/{bin,share/yaplot}

make DESTDIR=$RPM_BUILD_ROOT install
#install -m 755 -s yaplot_gtk $RPM_BUILD_ROOT/usr/bin/yaplot

%clean
rm -rf $RPM_BUILD_ROOT

%post
#ln -s /usr/bin/yaplot_gtk /usr/bin/yaplot

%preun
#rm -f /usr/bin/yaplot

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README* WelcomeJ.html samples/* utils/*
%{_bindir}/*
%{_datadir}/yaplot/*

%changelog
* Mon Jun 15 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.3-2
- add Patch6 to fix build failure (unsigned/singed int et al.)

* Tue Oct 07 2008 KOBAYASHI Taizo <tkoba@vinelinux.org> 3.3-1
- applied new versioning policy

* Wed Nov 28 2007 Shu KONNO <owa@bg.wakwak.com> 3.3-0vl4
- added Patch5: yaplot-3.3-cache.patch (for x86_64)

* Tue Nov 27 2007 KOBAYASHI <tkoba@vinelinux.org> 3.3-0vl3
- build for VineSeed Plus

* Tue Nov 27 2007 KOBAYASHI <tkoba@vinelinux.org> 3.3-0vl2
- added deltatime patch

* Fri Sep 08 2006 KOBAYASHI <tkoba@vinelinux.org> 3.3-0vl1
- source update

* Fri Jul 21 2006 KOBAYASHI <tkoba@vinelinux.org> 3.0-0vl4
- rebuild

* Wed Mar 10 2004 KOBAYASHI <tkoba@vinelinux.org> 3.0-0vl3
- rebuild

* Wed Feb 13 2002 KOBAYASHI <tkoba@vinelinux.org> 3.0-0vl2
- fixed Group: section (by sagami@mwc.biglobe.ne.jp [VineSeed:05647])
- rebuild on XF86-4

* Tue Dec 11 2001 KOBAYASHI <tkoba@vinelinux.org>
- update to yaplot-3.0

* Thu Jan 20 2000 T.R. Kobayashi <tkoba@ike-dyn.ritsumei.ac.jp>
- yaplot-2-1
- first release

