%define pkg_name    chicken
%define pkg_version 4.11.0
%define pkg_release 1%{?_dist_release}

Summary: Practical and portable Scheme system - compiler
Name:    %{pkg_name}
Version: %{pkg_version}
Release: %{pkg_release}

License: BSD-style
Group:   Applications/Languages
URL:     https://www.call-cc.org/
Source:  http://code.call-cc.org/releases/%{version}/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root

Vendor: Project Vine
Distribution: Vine Linux
Packager: ara_t

%description
CHICKEN is a compiler for the Scheme programming language.
It produces portable and efficient C and supports the R5RS
and R7RS (work in progress) standards, and many extensions.


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

%build
%{__make} \
 PLATFORM=linux \
 PREFIX=%{_prefix} \
 IDOCDIR=%{_docdir}/%{name}-%{version}

%install
%{__make} install \
 PLATFORM=linux \
 PREFIX=%{_prefix} \
 IDOCDIR=%{_docdir}/%{name}-%{version} \
 DESTDIR=${RPM_BUILD_ROOT}

%check
%{__make} check PLATFORM=linux

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

%post -p %{_syssbindir}/ldconfig
%postun -p %{_syssbindir}/ldconfig


%files
%defattr(-, root, root)
%{_bindir}/
%{_includedir}/
/usr/lib/libchicken.so*
/usr/lib//libchicken.a
/usr/lib/chicken
%{_datadir}/chicken
%{_mandir}/man1/
%{_docdir}/%{name}-%{version}


%changelog
* Sun Jun 19 2016 Toshiaki Ara <ara_t@384.jp> 4.11.0-1
- update to 4.11.0
- add %{__make} check for VineSeed

* Fri May 13 2016 Toshiaki Ara <ara_t@384.jp> 4.10.0-1
- new package
