# Source: http://ccl.clozure.com/manual/chapter3.1.html#Platform-specific-filename-conventions # Retrieved: 2010-02-03T19:35+100 %ifarch %{ix86} %global kernel lx86cl %global full_image lx86cl.image %global boot_image x86-boot32 %global fasl .lx32fsl %global build_dir linuxx8632 %endif %ifarch x86_64 %global kernel lx86cl64 %global full_image lx86cl64.image %global boot_image x86-boot64 %global fasl .lx64fsl %global build_dir linuxx8664 %endif ## PPC support removed as of F13 # %%ifarch ppc # %%global kernel ppccl # %%global full_image ppccl.image # %%global boot_image ppc-boot # %%global fasl .pfsl # %%global build_dir linuxppc # %%endif # %%ifarch ppc64 # %%global kernel ppccl64 # %%global full_image ppccl64.image # %%global boot_image ppc-boot64 # %%global fasl .p64fsl # %%global build_dir linuxppc64 # %%endif %ifarch %{ix86} x86_64 %global arch_build_dir linuxx86/%{name} %endif ## PPC support removed as of F13 # %%ifarch ppc ppc64 # %%global arch_build_dir linuxppc/%{name} # %%endif %global ccl_home %{_libdir}/%{name} Name: ccl Version: 1.6 Release: 1%{?dist} Summary: Free Common Lisp implementation Group: Development/Languages License: LLGPL URL: http://trac.clozure.com/ccl # Upstream tarballs contain .svn dirs and separate architectures, hence using svn export # Source0: ftp://ftp.clozure.com/pub/release/%{version}/%{name}-%{version}-linuxx86.tar.gz ## PPC support removed as of F13 # Source1: ftp://ftp.clozure.com/pub/release/%{version}/%{name}-%{version}-linuxppc.tar.gz # Copy'n'paste for the lazy :) %if 0 (name=ccl; version=1.6 mkdir ${name}-${version} && cd ${name}-${version} \ && echo "Export is going to take a while, go make yourself some coffee" \ && svn export http://svn.clozure.com/publicsvn/openmcl/release/${version}/linuxx86 \ && find . -name \*.sh -exec chmod +x '{}' + \ && find . -name .cvsignore -exec rm -f '{}' + \ && cd .. && tar -cJvf ${name}-${version}{.tar.xz,} && rm -rf ${name}-${version}) ## PPC support removed as of F13 # && svn export http://svn.clozure.com/publicsvn/openmcl/release/${version}/linuxppc \ %endif Source0: %{name}-%{version}.tar.xz Source1: %{name}.rc Source2: %{name}.sh Source3: %{name}-install-clc.lisp Patch0: %{name}-%{version}-nostabs.patch # While binutils gets pulled in by gcc it's not on the list of omissible items BuildRequires: binutils BuildRequires: m4 BuildRequires: libxslt BuildRequires: xml-common BuildRequires: docbook-dtds BuildRequires: docbook-style-xsl Requires: common-lisp-controller Requires(post): common-lisp-controller Requires(preun): common-lisp-controller ## PPC support removed as of F13 ExcludeArch: ppc ppc64 %description Clozure CL is a fast, mature, open source Common Lisp implementation. It compiles to native code and supports multithreading using native OS threads. It includes a foreign-function interface, and supports both Lisp code that calls external code, and external code that calls Lisp code. Clozure CL can create standalone executables on all supported platforms. %package contrib Summary: Contributed code for %{name} Group: Development/Libraries License: LLGPL and Artistic clarified and Public Domain Requires: %{name} = %{version}-%{release} %description contrib The %{name}-contrib package contains user-contributed code for %{name}. %package examples Summary: Example code for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description examples The %{name}-examples package contains example code for %{name}. %prep %setup -q %patch0 -p1 -b .nostabs cd %{arch_build_dir} # Since we Fedorans are responsible for this build it is desirable to use # %{release} as part of the compiled-in version string, default for ccl is to # use the SVN revision instead (which is unavail for the `svn export'ed tarball # anyway). sed -i -r 's,\(defparameter \*openmcl-revision\*.*\),(defparameter *openmcl-revision* "%{release}"),' \ level-1/version.lisp sed -i -r \ -e 's|^COPT =.*|COPT = %{optflags}|' \ -e 's|^ASFLAGS = (.*)|ASFLAGS = -g $1|' \ lisp-kernel/%{build_dir}/Makefile sed -i -r 's,^CCL=.*,CCL="%{_builddir}/%{name}-%{version}/%{arch_build_dir}/%{kernel}",' \ doc/src/Makefile.fedora cat >> ccl << EOF #!/bin/sh if [ -z "\$CCL_DEFAULT_DIRECTORY" ]; then CCL_DEFAULT_DIRECTORY=%{ccl_home} fi export CCL_DEFAULT_DIRECTORY exec \${CCL_DEFAULT_DIRECTORY}/%{kernel} -l %{_sysconfdir}/%(basename %{S:1}) "\$@" EOF cp %{S:2} . sed -i -r 's,^CCL_HOME=.*,CCL_HOME="%{ccl_home}",' \ %(basename %{S:2}) %build cd %{arch_build_dir} # Building the kernel # Source: http://ccl.clozure.com/manual/chapter3.4.html#kernel-build-command # Retrieved: 2010-02-03T20:22+100 (cd lisp-kernel/%{build_dir} make --always-make %{?_smp_mflags}) # Generating a bootstrapping image # Source: http://ccl.clozure.com/manual/chapter3.5.html#Generating-a-bootstrapping-image # Retrieved: 2010-02-03T20:22+100 ./%{kernel} --eval '(handler-case (progn (ccl:xload-level-0 :force) (ccl:quit 0)) (error () (ccl:quit 1)))' \ --no-init # Generating fasl files # Source: http://ccl.clozure.com/manual/chapter3.5.html#Generating-fasl-files # Retrieved: 2010-02-03T20:22+100 ./%{kernel} --eval '(handler-case (progn (ccl:compile-ccl t) (ccl:quit 0)) (error () (ccl:quit 1)))' \ --no-init # Building a full image from a bootstrapping image # Source: http://ccl.clozure.com/manual/chapter3.5.html#Building-a-full_image-from-a-bootstrapping-image # Retrieved: 2010-02-03T20:32+100 echo '(handler-case (progn (ccl:save-application "%{full_image}") (ccl:quit 0)) (error () (ccl:quit 1)))' \ | ./%{kernel} --batch --image-name %{boot_image} --no-init (cd doc/src make %{?_smp_mflags} --always-make --file=Makefile.fedora install) %install cd %{arch_build_dir} mkdir -p $RPM_BUILD_ROOT%{ccl_home} cp -rp %{kernel} %{boot_image} level-1%{fasl} bin l1-fasls \ $RPM_BUILD_ROOT%{ccl_home}/ # These contain stuff required during runtime; see %{arch_build_dir}/ccl/lib/systems.lisp # Heads-up: ccl brings it own (pretty up-to-date) version of asdf cp -rp lib library tools x86-headers x86-headers64 xdump \ $RPM_BUILD_ROOT%{ccl_home}/ # Optional stuff (contrib and examples) cp -rp contrib examples $RPM_BUILD_ROOT%{ccl_home}/ rm -f $RPM_BUILD_ROOT%{ccl_home}/contrib/README rm -f $RPM_BUILD_ROOT%{ccl_home}/examples/README-OPENMCL-EXAMPLES mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m755 ccl $RPM_BUILD_ROOT%{_bindir}/ # clc requirements start ln -s %{kernel} $RPM_BUILD_ROOT%{ccl_home}/lisp-kernel ln -s %{boot_image} $RPM_BUILD_ROOT%{ccl_home}/boot.image cp -p %{full_image} $RPM_BUILD_ROOT%{ccl_home}/ccl-dist.image cp -p %{full_image} $RPM_BUILD_ROOT%{ccl_home}/ccl.image ln -s ccl.image $RPM_BUILD_ROOT%{ccl_home}/%{full_image} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} install -m644 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/common-lisp/bin install -m755 %(basename %{S:2}) $RPM_BUILD_ROOT%{_prefix}/lib/common-lisp/bin/ install -m644 %{S:3} $RPM_BUILD_ROOT%{ccl_home}/ # clc requirements stop %post %{_sbindir}/register-common-lisp-implementation ccl > /dev/null 2>&1 ||: %preun if [ $1 -eq 0 ]; then %{_sbindir}/unregister-common-lisp-implementation ccl > /dev/null 2>&1 ||: fi %files %defattr(-,root,root,-) %doc %{arch_build_dir}/doc/LICENSE %{arch_build_dir}/doc/LGPL %doc %{arch_build_dir}/doc/release* %{arch_build_dir}/doc/ccl-documentation.html %doc %{arch_build_dir}/doc/manual %{ccl_home} %exclude %{ccl_home}/contrib %exclude %{ccl_home}/examples %{_bindir}/ccl %config(noreplace) %{_sysconfdir}/ccl.rc %{_prefix}/lib/common-lisp/bin/ccl.sh %files contrib %defattr(-,root,root,-) %doc %{arch_build_dir}/contrib/README %{ccl_home}/contrib %files examples %defattr(-,root,root,-) %doc %{arch_build_dir}/examples/README-OPENMCL-EXAMPLES %{ccl_home}/examples %changelog * Sat Dec 11 2010 Alexander Kahl - 1.6-1 - update to 1.6 * Fri Nov 26 2010 Alexander Kahl - 1.5-3 - removed %%clean section - removed explicit BuildRoot - removed spurious executable bit from contrib/krueger/InterfaceProjects/Utilities/date.lisp - added ExcludeArch ppc, ppc64 * Thu Aug 5 2010 Alexander Kahl - 1.5-2 - removed/commented all ppc portions - added --no-init to all kernel calls to prevent user init side-effects * Wed Jul 21 2010 Alexander Kahl - 1.5-1 - update to 1.5 - fixed install-clc path - fixed install-clc script * Thu Feb 25 2010 Alexander Kahl - 1.4-2 - added patch0, removes borked DWARF-2 stab information - added -g to ASFLAGS to have correct debugging information created automatically - removed early stripping * Thu Dec 3 2009 Alexander Kahl - 1.4-1 - initial release