%global bootstrap 1 Name: chicken Version: 4.9.0 Release: 2%{?dist} Summary: A practical and portable Scheme system Group: Development/Languages License: BSD URL: http://call-cc.org Source0: http://code.call-cc.org/releases/4.8.0/%{name}-%{version}.tar.gz Patch0: make_cflags_work.patch BuildRequires: chrpath Requires: chicken-libs%{?_isa} = %{version}-%{release} # Old docs subpackage, which is no longer a subpackage Obsoletes: chicken-doc < 4.8.0.5-3 Provides: chicken-doc = %{version}-%{release} %if 0%{?rhel} BuildRequires: net-tools %else BuildRequires: hostname %endif %if %{bootstrap} == 0 BuildRequires: chicken %endif %package libs Summary: Chicken Scheme runtime library %description libs The Chicken Scheme runtime library, linked to by programs compiled with Chicken. %description CHICKEN is a compiler 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. %prep %setup -q -n %{name}-%{version} %patch0 -p1 %build %if %{bootstrap} == 0 # This removes all C code from the repo, and leaves us only with Scheme code. # Otherwise, it will try to compile C, defeating the point of bootstrapping. make PLATFORM=linux spotless # The above command nukes a necessary buildtag file, and there's no way that # I can find to regenerate it - so instead we just generate it ourselves. echo "#define C_BUILD_TAG \"compiled $(date '+%Y-%m-%d') on $(hostname)\"" > buildtag.h %endif # Chicken's build system is freaking horrible. # So, Fedora requires that we use optflags here - makes sense, they contain # some security related flags, etc. The issue is that Chicken uses the same # flags that it was compiled with when it compiles code for the end-user. # So if we pass -Wall here, it'll give the user a bunch of warnings when they # compile anything at all with `csc`. So that's lovely. -codeblock make CFLAGS="$(echo "%{optflags}" | sed 's/-Wall//') -Wformat" \ PREFIX=%{_prefix} \ BINDIR=%{_bindir} \ LIBDIR=%{_libdir} \ DATADIR=%{_datadir}/chicken \ INCLUDEDIR=%{_includedir}/chicken \ INFODIR=%{_infodir}/chicken \ TOPMANDIR=%{_mandir} \ DOCDIR=%{_docdir}/chicken \ PLATFORM=linux %install make CFLAGS="$(echo "%{optflags}" | sed 's/-Wall//') -Wformat" \ PREFIX=%{_prefix} \ BINDIR=%{_bindir} \ LIBDIR=%{_libdir} \ DATADIR=%{_datadir}/chicken \ INCLUDEDIR=%{_includedir}/chicken \ INFODIR=%{_infodir}/chicken \ TOPMANDIR=%{_mandir} \ DOCDIR=%{_docdir}/chicken \ DESTDIR=%{buildroot} \ PLATFORM=linux install rm -f %{buildroot}/%{_docdir}/%{name}/LICENSE %{buildroot}/%{_docdir}/%{name}/README find %{buildroot} -name \*.so -exec chrpath --delete \{\} \; find %{buildroot} -name \*.a -exec rm \{\} \; chrpath --delete %{buildroot}/%{_bindir}/* %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %doc README LICENSE %dir %{_datadir}/chicken %{_datadir}/chicken/setup.defaults %{_bindir}/chicken* %{_bindir}/csc %{_bindir}/csi %dir %{_includedir}/chicken %{_includedir}/chicken/chicken-config.h %{_includedir}/chicken/chicken.h %dir %{_libdir}/chicken %dir %{_libdir}/chicken/7 %{_libdir}/chicken/7/* %{_mandir}/man1/* %{_docdir}/chicken/manual %files libs %{_libdir}/libchicken.so* %changelog * Sat Jun 07 2014 Ricky Elrod - 4.9.0-3 - Bootstrap for el7. * Sat Jun 07 2014 Fedora Release Engineering - 4.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Jun 4 2014 Ricky Elrod - 4.9.0-1 - Latest upstream release. * Tue May 20 2014 Ricky Elrod - 4.8.0.6-2 - Patch for CVE-2014-3776. * Thu Apr 24 2014 Ricky Elrod - 4.8.0.6-1 - Upstream 4.8.0.6. * Sat Dec 14 2013 Ricky Elrod - 4.8.0.5-3 - Get rid of docs subpackage. - Add a -libs subpackage for the runtime library. * Sun Dec 8 2013 Ricky Elrod - 4.8.0.5-2 - Add -Wformat for BZ #1037013. * Sun Nov 24 2013 Ricky Elrod - 4.8.0.5-1 - Upstream 4.8.0.5. * Fri Sep 27 2013 Ricky Elrod - 4.8.0.4-4 - Add upstream patch for CVE-2013-4385, until 4.8.0.5 is released. http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commitdiff;h=cd1b9775005ebe220ba11265dbf5396142e65f26 * Mon Sep 02 2013 Ricky Elrod - 4.8.0.4-3 - Nuke -Wall from optflags. * Sat Aug 03 2013 Fedora Release Engineering - 4.8.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jul 17 2013 Ricky Elrod 4.8.0.4-1 - Upstream 4.8.0.4. * Sat May 11 2013 Ricky Elrod 4.8.0.3-4 - Bootstrap again, with working CFLAGS. * Wed May 08 2013 Ricky Elrod 4.8.0.3-3 - Bootstrap. * Wed May 08 2013 Ricky Elrod 4.8.0.3-2 - Fix BuildRequires for RHEL building. * Sun May 05 2013 Ricky Elrod 4.8.0.3-1 - Clean spec file up a lot. - Bump to latest upstream release. * Thu May 03 2012 J R Jones 4.7.0-2 - Separated into separate sub-packages * Thu May 03 2012 J R Jones 4.7.0-1 - Specfile created.