%define pkg_name    JAGS
%define pkg_version 4.3.0
%define pkg_release 1%{?_dist_release}

Summary:     Just Another Gibbs Sampler
Summary(ja): もう１つのギブスサンプラー
Name:        %{pkg_name}
Version:     %{pkg_version}
Release:     %{pkg_release}

License: GPLv2
Group:   Applications/Edutainment
URL:     http://mcmc-jags.sourceforge.net/
Source0: %{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: blas-devel lapack-devel
Requires: blas lapack

Vendor: Project Vine
Distribution: Vine Linux
Packager: ara_t


%description
JAGS is Just Another Gibbs Sampler.
It is a program for analysis of Bayesian hierarchical models
using Markov Chain Monte Carlo (MCMC) simulation
not wholly unlike BUGS.

%description -l ja
JAGSはもう１つのギブスサンプラーであり、
マルコフ連鎖モンテカルロミュレーション（MCMC）を用いた
階層ベイズモデルの解析のためのプログラムです。


%prep
%{__rm} -rf ${RPM_BUILD_ROOT}
%setup -q

%{configure}

%build
%{__make} %{?_smp_mflags}

%install
%{make_install}
%{__rm} ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
%{__rm} ${RPM_BUILD_ROOT}%{_libdir}/JAGS/modules-4/*.la

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/
%{_includedir}/
%{_libdir}/lib*.so*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/JAGS/modules-4/*.so
%{_libexecdir}/
%{_mandir}/man1/


%changelog
* Fri Sep 15 2017 Toshiaki Ara <ara_t@384.jp> 4.3.0-1
- new upstream release

* Tue Jun 28 2016 Toshiaki Ara <ara_t@384.jp> 4.2.0-2
- rebuild with gcc-5.4.0

* Sun May 15 2016 Toshiaki Ara <ara_t@384.jp> 4.2.0-1
- update to 4.2.0

* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 4.1.0-2
- delete *.la files
- correct SPEC file

* Thu Jan 28 2016 Toshiaki Ara <ara_t@384.jp> 4.1.0-1
- update to 4.1.0
- add %doc AUTHORS COPYING NEWS README

* Fri Oct 23 2015 Toshiaki Ara <ara_t@384.jp> 4.0.0-1
- update to 4.0.0

* Wed Jul 30 2014 Toshiaki Ara <ara_t@384.jp> 3.4.0-1
- new package
