File chicken.spec of Package chicken
#
# spec file for package chicken
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 toganm@opensuse.org
# Copyright (c) 2013 andrey.lisin@gmail.com
# Copyright (c) 2014-2017 dziltener@lyrion.ch
#
# Minor modifications by Moritz Wilhelmy
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: chicken
Version: 5.3.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
URL: http://www.call-cc.org/
Source: http://code.call-cc.org/releases/%version/%name-%version.tar.gz
Summary: Compiler and Interpreter for the Scheme programming language
License: BSD-2-Clause
Group: Development/Languages/Other
%description
CHICKEN is a compiler and interpreter for the Scheme programming language.
CHICKEN produces portable, efficient C, supports almost all of the R5RS Scheme
language standard, and includes many enhancements and extensions. CHICKEN runs
on Linux, MacOS X, Windows, and many Unix flavours.
%package devel
Summary: Include files and library for the Chicken Scheme system
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package contains C header files and library for Chicken Scheme.
%package doc
Summary: Documentation for Chicken
Group: Documentation/HTML
BuildArch: noarch
%description doc
The package contains HTML documentation for Chicken.
%global debug_package %{nil}
%global optflags %{optflags} -O2 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-label -Wno-unused-function -ffat-lto-objects
%prep
%setup -q
# NOTE for reviewers
# there is no configure option hence we build straight away
%build
CFLAGS="%optflags" make PLATFORM=linux PREFIX=%{_prefix} LIBDIR=%{_libdir} \
ARCH=${_arch} DOCDIR=%{_defaultdocdir}/%{name} \
C_COMPILER_OPTIMIZATION_OPTIONS="%optflags"
%install
CFLAGS="%optflags" make PLATFORM=linux DESTDIR=%{buildroot} \
PREFIX=%{_prefix} LIBDIR=%{_libdir} \
ARCH=${_arch} DOCDIR=%{_defaultdocdir}/%{name} install
#remove static files
find %{buildroot}%{_libdir} -name "*.la" -delete
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n %{name}-devel -p /sbin/ldconfig
%postun -n %{name}-devel -p /sbin/ldconfig
%files
%{_bindir}/*
%exclude %{_bindir}/feathers
%{_libdir}/%{name}/*
%doc %{_mandir}/man?/*
%{_datadir}/%{name}/setup.defaults
%dir %{_libdir}/%{name}
%dir %{_datadir}/%{name}
%exclude %{_defaultdocdir}/%{name}
%files devel
%{_bindir}/feathers
%{_datadir}/%{name}/feathers.tcl
%{_libdir}/libchicken.so
%{_libdir}/libchicken.so.*
%{_libdir}/libchicken.a
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%files doc
%{_defaultdocdir}/%{name}
%changelog