[PlanetCCRMA] [PATCH] jackmix on F11 Re: planetccrma-apps missing in F11 repo

David Cornette david at davidcornette.com
Wed Sep 23 22:09:19 PDT 2009


I have succeeded in getting jackmix to build on Fedora 11.  The issue that I
mentioned last time, where spaces were getting inserted into the compiler
flags, was relatively easy to fix.  There was another issue, though, which was
a bit trickier to figure out.  Jackmix requires the qt-devel package for qt4,
which I had installed.  However, Fedora contains both qt4 (which it calls qt)
and qt3.  That is fine, but the environment variable QTDIR is set for qt3, and
even worse, if qt3-devel is installed (it is a requirement of kdevelop), then
there will be a /usr/bin/moc which is from qt3, and a /usr/bin/moc-qt4 which
is from (obviously) qt4.  In order to build jackmix, scons needs to be told to
look for moc-qt4 instead of moc.

I haven't tested the resulting package at all, but I am attaching the modified
spec and patches that allowed jackmix to build.


On Wed, Sep 23, 2009 at 02:46:03AM -0400, David Cornette wrote:
> I decided to look at what dependencies were missing.  I looked at was required
> by planetccrma-apps on Fedora 8 (the previous version that I have installed)
> and looked for what was and wasn't missing from F11.  Here is the list I came
> up with:
> 
> cltl2
> cm-fomus-sbcl
> cm-clm-sbcl
> cmn-sbcl
> cm-sbcl
> freqtweak
> hyperspec
> jace
> jackmix
> jdelay
> planetccrma-menus
> 
> I downloaded the most recent version of the source rpms for these, and tried
> to build them.  Some worked ok, and others as expected had issues.  I was able
> to build cltl2, cmn-sbcl, hyperspec, jace, jdelay, and planetccrma-menus.
> 
> Freqtweak fails because it needs compat-wxGTK24-2-devel and
> compat-wxGTK24-2-xrc.  Fedora 11 has compat-wxGTK26-devel, which might (or
> might not) do to replace compat-wxGTK24-2-devel.  There does not appear to be
> a replacement for compat-wxGTK24-2-xrc.
> 
> Jackmix seems to have issues with its build scripts.  For some reason, the
> compiler argument "-fpic" is being changed to "- f p i c".  I would think it
> is probably some minor issue, but I don't know what exactly.
> 
> Finally, I tried building cm.  There were several issues with this one.
> First, it needed to have the versions of various other programs specified for
> Fedora 11.  I am not sure that I got them all right (I don't really understand
> the purpose of the "orig" versions)  Next, there was a change in sbcl that a
> one line change, for which I have a patch that seems to have worked.  After,
> that, I found that the packaging of portmidi had changed, so the build
> requirement should now be on portmidi-devel rather than on portmidi.  But then
> I ran into what would seem to be an sbcl bug.  Here is the message:
> 
> ; compiling file "/home/makerpm/rpmbuild/BUILD/cm/fomus/backend_xml.lisp" (written 22 AUG 2007 06:49:27 PM):
> 
> debugger invoked on a SB-INT:BUG in thread #<THREAD "initial thread" RUNNING {10028E8011}>:
>     failed AVER:
>       (ZEROP (HASH-TABLE-COUNT (FASL-OUTPUT-PATCH-TABLE FASL-OUTPUT)))
>   This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
>   corrupted by bad user code, e.g. by an undefined Lisp operation like
>   (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe
>   Lisp code; or there might be a bug in the OS or hardware that SBCL is running
>   on.) If it seems to be a bug in SBCL itself, the maintainers would like to
>   know about it. Bug reports are welcome on the SBCL mailing lists, which you
>   can find at <http://sbcl.sourceforge.net/>.
> 
> At this point, building pauses, and if I enter (SB-EXT:QUIT), or choose to
> accept the result, the build continues, and I get the following rpms:
> cm-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-clm-sbcl-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-cmn-sbcl-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-debuginfo-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-fomus-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-fomus-sbcl-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> cm-sbcl-2.11.0-0.20070607.cvs.10.fc11.x86_64.rpm
> 
> I don't know how functional any of these are.
> 
> I noticed that there are also other programs that are missing from the Fedora
> 11 repo, like bristol, but those are not required by planetccrma-apps.
> 
> Hopefully this information and patch are helpful.
> 
> On Tue, Sep 08, 2009 at 04:32:30PM -0700, Fernando Lopez-Lezcano wrote:
> > On Tue, 2009-09-08 at 16:08 -0400, David Cornette wrote:
> > > I have just installed fedora 11 on a new system, and I am in the process 
> > > of installing stuff.  However, I just noticed that the planetccrma-apps 
> > > metapackage is missing from the Fedora 11 repo.  Is this because there 
> > > are some apps that are still missing?  Or is it just an oversight?
> > 
> > Some apps are missing, I should probably take a look again at what is
> > missing and what will take to build them. Sorry, I have been busy...
> > 
> > -- Fernando
> > 

> diff -rupN cm/cm.asd cm.dlc/cm.asd
> --- cm/cm.asd	2009-09-23 00:48:20.689922466 -0400
> +++ cm.dlc/cm.asd	2009-09-23 00:53:28.443960731 -0400
> @@ -112,7 +112,7 @@
>    #+cmu (eq :directory (unix:unix-file-kind (namestring dir)))
>    #+ecl (eq ':directory (si::file-kind (pathname dir) nil))
>    #+lispworks (lw:file-directory-p dir)
> -  #+sbcl (eq :directory (sb-unix:unix-file-kind (namestring dir)))
> +  #+sbcl (eq :directory (sb-impl::native-file-kind (namestring dir)))
>    #-(or allegro clisp cmu lispworks sbcl ecl)
>    (probe-file (make-pathname :directory dir)))
>  

> # current version and release
> %define version 2.11.0
> %define cvsdate 20070402.113338
> %define rel     0.20070607.cvs.10
> 
> # versions of additional packages
> %define cffi_ver     070221
> %if "%{cvsdate}" != ""
> %define cm_gtk_ver   %{cvsdate}
> %define rts_ver      %{cvsdate}
> %else
> %define cm_gtk_ver   1.0.1
> %define rts_ver      2.0.0
> %endif
> %define portmidi_ver 2.0.2
> %define fomus_ver    0.2.28
> %define osc_ver      1.0.1
> 
> # on which lisps to build
> %define sbcl_build  1
> %define cmucl_build 0
> %define clisp_build 0
> 
> # does clm work on clisp?
> %define clm_clisp 0
> 
> # lisp versions
> %if 0%{?fedora} == 11
> %define cmucl_ver  19f
> %define sbcl_ver   1.0.30
> %define sbcl_rel   1
> %define clisp_ver  2.47
> %define cmucl_orig_ver 19e
> %define clisp_orig_ver 2.47
> %endif
> %if 0%{?fedora} == 10
> %define cmucl_ver  19e
> %define sbcl_ver   1.0.22
> %define sbcl_rel   1
> %define clisp_ver  2.46
> %define cmucl_orig_ver 19e
> %define clisp_orig_ver 2.46
> %endif
> %if 0%{?fedora} == 9
> %define cmucl_ver 19e
> %define sbcl_ver  1.0.22
> %define sbcl_rel  1
> %define clisp_ver 2.47
> %define cmucl_orig_ver 19d
> %define clisp_orig_ver 2.43
> %endif
> %if 0%{?fedora} == 8
> %define cmucl_ver 19e
> %define sbcl_ver  1.0.22
> %define sbcl_rel  1
> %define clisp_ver 2.43
> %define cmucl_orig_ver 19d
> %define clisp_orig_ver 2.43
> %endif
> %if 0%{?fedora} == 7
> %define cmucl_ver 19d
> %define sbcl_ver  1.0.13
> %define sbcl_rel  1
> %define clisp_ver 2.43
> %define cmucl_orig_ver 19d
> %define clisp_orig_ver 2.43
> %endif
> %if 0%{?fedora} == 6
> %define cmucl_ver 19c
> %define sbcl_ver  1.0.9
> %define sbcl_rel  1
> %define clisp_ver 2.41
> %define cmucl_orig_ver 19c
> %define clisp_orig_ver 2.41
> %endif
> %if 0%{?rhel} == 4
> %define cmucl_ver 19d
> %define sbcl_ver  1.0.5
> %define sbcl_rel  1
> %define cmucl_orig_ver 19d
> %endif
> %if 0%{?rhel} == 5
> %define cmucl_ver 19d
> %define sbcl_ver  1.0.13
> %define sbcl_rel  1
> %define clisp_ver 2.41
> %define cmucl_orig_ver 19d
> %define clisp_orig_ver 2.41
> %endif
> 
> # midishare is not longer supported as of fc2
> %if 0%{?fedora} >= 2 || 0%{?rhel} >= 4
> %define  midishare 0
> %else
> %define  midishare 1
> %endif
> 
> # midishare library versions
> %if "%{midishare}" == "1"
> %define midishareplayerlib libPlayer.so.1.0
> %define midisharelib       libMidiShare.so.1.0
> %endif
> 
> # various locations
> %define cmucl_lib_dir    %{_libdir}/cmucl/lib
> %define clisp_lib_dir    %{_libdir}/clisp
> %define sbcl_lib_dir     %{_libdir}/sbcl
> # binary and source directories
> %define cmucl_cm_bin_dir %{cmucl_lib_dir}/cm
> %define cmucl_subsystems %{cmucl_lib_dir}/subsystems
> %define clisp_cm_bin_dir %{clisp_lib_dir}/cm
> %define clisp_subsystems %{clisp_lib_dir}/subsystems
> %define sbcl_cm_bin_dir  %{sbcl_lib_dir}/cm
> %define sbcl_subsystems  %{_libdir}/sbcl/site-systems
> %define cm_src_dir       %{_datadir}/common-lisp/source/cm
> %define cl_src_dir       %{_datadir}/common-lisp/source
> 
> %ifarch x86_64
> %define mark64 ()(64bit)
> %endif
> 
> # on fedora >= 10 and i386 fasl files get written to the cache directory by the 
> # common-lisp-controller package, this is a workaround for that
> 
> %ifarch i386
> %if 0%{fedora} >= 10
> %define uid %(id -u)
> %define fasldir /var/cache/common-lisp-controller/%{uid}/sbcl/local/builddir/build/BUILD/cm/
> %else
> %define fasldir %{nil}
> %endif
> %else
> %define fasldir %{nil}
> %endif
> 
> Summary:      Common Music
> Name:         cm
> Version:      %{version}
> Release:      %{rel}%{?dist}
> License:      GPL
> Group:        Development/Languages
> URL:          http://www-ccrma.stanford.edu/software/cm
> Source0:      cm-%{?cvsdate:%{cvsdate}}%{!?cvsdate:%{version}}.tar.gz
> Patch0:       cm-2.7.0-paths.patch
> Patch1:       cm-gtk-libdir.patch
> Patch2:       osc-1.0.1-sockets.patch
> Patch3:       cm-file-kind.patch
> Source1:      cffi-%{cffi_ver}.tar.gz
> Source2:      portmidi-%{portmidi_ver}.tar.gz
> Source3:      cm-gtk-%{cm_gtk_ver}.tar.gz
> Source4:      rts-%{rts_ver}.tar.gz
> # Fomus: http://common-lisp.net/project/fomus/
> Source5:      http://common-lisp.net/project/fomus/download/fomus-%{fomus_ver}.tgz
> Source6:      osc-%{osc_ver}.tar.gz
> Source7:      cm-get-cvs
> BuildRoot:    %{_tmppath}/%{name}-%{version}-root
> Packager:     Fernando Lopez-Lezcano
> Vendor: Planet CCRMA
> Distribution: Planet CCRMA
> 
> # obsolete old packages
> Obsoletes:    cm-source
> 
> %if "%{cmucl_build}" == "1"
> BuildRequires: cmucl = %{cmucl_ver}
> %endif
> %if "%{clisp_build}" == "1"
> BuildRequires: clisp = %{clisp_ver}
> %endif
> %if "%{sbcl_build}" == "1"
> BuildRequires: sbcl = %{sbcl_ver}
> %endif
> BuildRequires: portmidi-devel, gtk2-devel
> 
> %description
> Common Music (CM), by Rick Taube, is an object-oriented music
> composition environment. It produces sound by transforming a
> high-level representation of musical structure into a variety of
> control protocols for sound synthesis and display. Common Music
> defines an extensive library of compositional tools and an API through
> which the composer can easily modify and extend the system.
> 
> This package contains Common Music (CM) source and documentation.
> 
> %package   cmucl
> Summary:   Common Music binaries for CMUCL
> Group:     Development/Languages
> Requires:  cmucl = %{cmucl_ver}
> Requires:  cm = %{version}-%{release}
> %if "%{midishare}" == "1"
> Requires:  %{midishareplayerlib}
> Requires:  %{midisharelib}
> BuildRequires: midishare-devel
> BuildRequires: midishare-player-devel
> %endif
> Obsoletes: cmucl-cm-clm cmucl-cm-clm-cmn
> 
> %description cmucl
> This package contains Common Music (CM) binaries built on top of CMUCL
> Common Lisp. To start Common Music run /usr/bin/cm-cmucl. 
> 
> %package   clm2-cmucl
> Summary:   Automatically start CLM2 when CM starts
> Group:     Development/Languages
> Requires:  cm-cmucl
> Requires:  clm2-cmucl
> 
> %description clm2-cmucl
> This package triggers the automatic loading of Common Lisp Music (CLM2)
> when Common Music (CM) starts. To start Common Music and Common Lisp
> Music run /usr/bin/cm-cmucl after installing this package. This is a
> backward compatibility package for the old version of CLM (2).
> 
> %package   clm-cmucl
> Summary:   Automatically start CLM when CM starts
> Group:     Development/Languages
> Requires:  cm-cmucl
> Requires:  clm-cmucl
> 
> %description clm-cmucl
> This package triggers the automatic loading of Common Lisp Music (CLM)
> when Common Music (CM) starts. To start Common Music and Common Lisp
> Music 2 run /usr/bin/cm-cmucl after installing this package.
> 
> %package   cmn-cmucl
> Summary:   Automatically start CMN when CM starts
> Group:     Development/Languages
> Requires:  cm-cmucl
> Requires:  cmn-cmucl
> 
> %description cmn-cmucl
> This package triggers the automatic loading of Common Music Notation (CMN)
> when Common Music (CM) starts. To start Common Music and Common Music
> Notation run /usr/bin/cm-cmucl after installing this package.
> 
> %package   clisp
> Summary:   Common Music binaries for CLISP
> Group:     Development/Languages
> Requires:  clisp = %{clisp_ver}
> Requires:  cm = %{version}-%{release}
> Obsoletes: clisp-cm-clm clisp-cm-clm-cmn
> 
> %description clisp
> This package contains Common Music (CM) binaries built on top of CLISP
> Common Lisp. To start Common Music run /usr/bin/cm-clisp.
> 
> %package   clm2-clisp
> Summary:   Automatically start CLM2 when CM starts
> Group:     Development/Languages
> Requires:  cm-clisp
> Requires:  clm2-clisp
> 
> %description clm2-clisp
> This package triggers the automatic loading of Common Lisp Music (CLM2)
> when Common Music (CM) starts. To start Common Music and Common Lisp
> Music 2 run /usr/bin/cm-clisp. This is a backward compatibility package 
> for the old version of CLM (2).
> 
> %package   clm-clisp
> Summary:   Automatically start CLM when CM starts
> Group:     Development/Languages
> Requires:  cm-clisp
> Requires:  clm-clisp
> 
> %description clm-clisp
> This package triggers the automatic loading of Common Lisp Music (CLM)
> when Common Music (CM) starts. To start Common Music and Common Lisp
> Music run /usr/bin/cm-clisp. 
> 
> %package   cmn-clisp
> Summary:   Automatically start CMN when CM starts
> Group:     Development/Languages
> Requires:  cm-clisp
> Requires:  cmn-clisp
> 
> %description cmn-clisp
> This package triggers the automatic loading of Common Music Notation (CMN)
> when Common Music (CM) starts. To start Common Music and Common Music
> Notation run /usr/bin/cm-clisp.
> 
> %package   sbcl
> Summary:   Common Music binaries for SBCL
> Group:     Development/Languages
> Requires:  sbcl >= %{sbcl_ver}-%{sbcl_rel}
> Requires:  cm = %{version}-%{release}
> # requirements for portmidi and cm-gtk, these are loaded at runtime
> # from lisp and cannot be automagically discovered by rpm
> Requires:  libportmidi.so.0%{?mark64}
> # see cm-gtk/gtkcffi-cmuclsbcl.lisp for the libraries being loaded
> Requires:  gtk2-devel
> 
> %description sbcl
> This package contains Common Music (CM) binaries built on top of SBCL
> Common Lisp. To start Common Music run /usr/bin/cm-sbcl.
> 
> %package   clm-sbcl
> Summary:   Automatically start CLM when CM starts
> Group:     Development/Languages
> Requires:  cm-sbcl
> Requires:  clm-sbcl
> 
> %description clm-sbcl
> This package triggers the automatic loading of Common Lisp Music (CLM)
> when Common Music (CM) starts. To start Common Music and Common Lisp
> Music 2 run /usr/bin/cm-sbcl after installing this package.
> 
> %package   cmn-sbcl
> Summary:   Automatically start CMN when CM starts
> Group:     Development/Languages
> Requires:  cm-sbcl
> Requires:  cmn-sbcl
> 
> %description cmn-sbcl
> This package triggers the automatic loading of Common Music Notation (CMN)
> when Common Music (CM) starts. To start Common Music and Common Music
> Notation run /usr/bin/cm-sbcl after installing this package.
> 
> %package   fomus
> Summary:   Music notation tool for computer music composers
> Group:     Development/Languages
> Requires:  cm
> 
> %description fomus
> FOMUS (FOrmat MUSic) is a music notation tool for computer music
> composers. Its purpose is to facilitate the conversion of "raw"
> algorithmic output data into readable music notation, a process that
> can be frustrating and time consuming since it often requires dumping
> data into some intermediary format (such as MIDI) and importing it
> into a notation program that only does a mediocre job of
> conversion. FOMUS integrates with Common Music, using some of its
> functionality if present and also functioning as a backend.
> 
> %package   fomus-sbcl
> Summary:   Music notation tool for computer music composers
> Group:     Development/Languages
> Requires:  cm-sbcl
> Requires:  cm-fomus
> 
> %description fomus-sbcl
> FOMUS (FOrmat MUSic) is a music notation tool for computer music
> composers. Its purpose is to facilitate the conversion of "raw"
> algorithmic output data into readable music notation, a process that
> can be frustrating and time consuming since it often requires dumping
> data into some intermediary format (such as MIDI) and importing it
> into a notation program that only does a mediocre job of
> conversion. FOMUS integrates with Common Music, using some of its
> functionality if present and also functioning as a backend.
> 
> %prep
> %setup -q -n %{name}
> %setup -q -T -D -a 1 -n %{name}
> %setup -q -T -D -a 2 -n %{name}
> %setup -q -T -D -a 3 -n %{name}
> %setup -q -T -D -a 4 -n %{name}
> %setup -q -T -D -a 5 -n %{name}
> %setup -q -T -D -a 6 -n %{name}
> %patch1 -p1
> %patch2 -p0
> %patch3 -p1
> 
> %build
> %if "%{midishare}" == "1"
> # load proper versions of midishare
> %{__perl} -p -i -e "s/libPlayer.so/%{midishareplayerlib}/g" midishare/Player-Interface.lisp
> %{__perl} -p -i -e "s/libMidiShare.so/%{midisharelib}/g" midishare/MidiShare-Interface.lisp
> %endif
> 
> # change name of cffi-* to just cffi
> mv cffi-%{cffi_ver} cffi
> 
> # make packages look for libraries in the right place for x86_64
> %ifarch x86_64
> %{__perl} -p -i -e "s|/usr/lib|/usr/lib64|g" portmidi/portmidi.asd
> %{__perl} -p -i -e "s|/usr/lib|/usr/lib64|g" portmidi/cffi-portmidi.lisp
> %{__perl} -p -i -e "s|/lib/|/lib64/|g" cm-gtk/gtkffi-cmusbcl.lisp
> %endif
> 
> # SBCL
> %if %{sbcl_build}
> # build the rts library
> cd rts
> ./configure
> %{__make}
> cd ../
> 
> # define the sbcl load program
> %{__cat} <<EOF >cm-sbcl-load.lisp
> ;;;
> ;;; SBCL Common Music (CM) startup code
> ;;;
> (declaim (sb-ext:muffle-conditions style-warning sb-ext:compiler-note))
> (declaim (sb-ext:muffle-conditions sb-ext:code-deletion-note))
> (setf *compile-print* nil)
> ;;;
> ;;; Load Common Music
> ;;;
> (format t ";;;~%;;; loading Common Music %{version}...~%;;;~%")
> (load "%{cm_src_dir}/src/cm.lisp")
> ;;; load portmidi
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-portmidi")
>    (use-system :portmidi :directory "%{sbcl_lib_dir}/portmidi/"))
> ;;; load osc
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-osc")
>    (sb-ext:without-package-locks
>       (use-system :osc :directory "%{sbcl_lib_dir}/osc/")))
> ;;; load cm-gtk
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-cm-gtk")
>    (use-system :cm-gtk :directory "%{sbcl_lib_dir}/cm-gtk/"))
> ;;; load rts
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-rts")
>    (use-system :rts :directory "%{sbcl_lib_dir}/rts/"))
> ;;; load fomus
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-fomus")
>    (use-system :fomus :directory "%{sbcl_lib_dir}/fomus/"))
> ;;;
> ;;; Load clm
> ;;;
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-clm")
>    (progn
>       (format t "~%;;;~%;;; loading CLM3...~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :clm)))
> ;;;
> ;;; Load cmn
> ;;;
> (if (probe-file "%{sbcl_cm_bin_dir}/use-system-cmn")
>    (progn
>       (format t ";;;~%;;; loading CMN... (be patient)~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :cmn)))
> 
> EOF
> 
> # build cm
> /usr/bin/sbcl <<EOF
> ;;; make compilation process less verbose...
> (declaim (sb-ext:muffle-conditions style-warning sb-ext:compiler-note))
> (declaim (sb-ext:muffle-conditions sb-ext:code-deletion-note))
> (setf *compile-print* nil)
> %if "%{midishare}" == "1"
> ;;; build the midishare interface
> (push :midishare *features*)
> (compile-file "midishare/MidiShare-Interface.lisp")
> (load "midishare/MidiShare-Interface")
> (compile-file "midishare/Player-Interface.lisp")
> (load "midishare/Player-Interface")
> %endif
> ;;; build Common Music
> ;;;
> ;;; we define the directories, otherwise cm.sh fails on the mach chroot
> ;;; because /dev/stderr is not there
> (defvar *cm-directory* "%{_builddir}/%{name}")
> (defvar *cm-bin-directory* "%{_builddir}/%{name}/bin/sbcl_bin/")
> (load "src/cm.lisp")
> ;;; the common music loader stub
> (compile-file "cm-sbcl-load.lisp")
> ;;; build cffi
> (sb-ext:without-package-locks
>    (use-system :cffi :directory (truename "./cffi")))
> ;;; build portmidi
> (use-system :portmidi :directory (truename "./portmidi"))
> ;;; build osc
> (sb-ext:without-package-locks
>    (use-system :osc :directory (truename "./osc")))
> ;;; build cm-gtk
> (use-system :cm-gtk :directory (truename "./cm-gtk"))
> ;;; build rts
> (use-system :rts :directory (truename "./rts"))
> ;;; build fomus
> (use-system :fomus :directory (truename "./fomus"))
> (quit)
> EOF
> # move binaries away
> mkdir cffi-bin-sbcl
> mv %{fasldir}cffi/src/*fasl cffi-bin-sbcl/
> mkdir portmidi-bin-sbcl
> mv %{fasldir}portmidi/*.fasl portmidi-bin-sbcl/
> mkdir osc-bin-sbcl
> mv %{fasldir}osc/*.fasl osc-bin-sbcl/
> mkdir cm-gtk-bin-sbcl
> mv %{fasldir}cm-gtk/*.fasl cm-gtk-bin-sbcl/
> mkdir rts-bin-sbcl
> mv %{fasldir}rts/*.fasl rts-bin-sbcl/
> mv rts/*.so rts-bin-sbcl/
> mkdir fomus-bin-sbcl
> mv %{fasldir}fomus/*.fasl fomus-bin-sbcl/
> %endif # SBCL
> 
> # CMUCL
> %if %{cmucl_build}
> %{__mkdir} bin-cmucl
> # define the cmucl load program, checks for clm and cmn use-system files
> %{__cat} <<EOF >cm-cmucl-load.lisp
> ;;;
> ;;; CMUCL Common Music (CM) startup code
> ;;;
> (setf *compile-print* nil)
> (ext:unlock-all-packages)
> (in-package :cl-user)
> ;;;
> ;;; Load Common Music
> ;;;
> (format t ";;;~%;;; loading Common Music %{version}...~%;;;~%")
> (load "%{cm_src_dir}/src/cm.lisp")
> ;;; load portmidi
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-portmidi")
>    (use-system :portmidi :directory "%{cmucl_lib_dir}/portmidi/"))
> ;;; load osc
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-osc")
>    (sb-ext:without-package-locks
>       (use-system :osc :directory "%{cmucl_lib_dir}/osc/")))
> ;;; load cm-gtk
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-cm-gtk")
>    (use-system :cm-gtk :directory "%{cmucl_lib_dir}/cm-gtk/"))
> ;;;
> ;;; Load clm, new version has priority
> ;;;
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-clm")
>    (progn
>       (format t "~%;;;~%;;; loading CLM3...~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :clm))
>   (if (probe-file "%{cmucl_cm_bin_dir}/use-system-clm2")
>       (progn
>          (format t "~%;;;~%;;; loading CLM2...~%;;;~%")
>          (setf *package* (find-package :cm))
>          (use-system :clm2))))
> ;;;
> ;;; Load cmn
> ;;;
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-cmn")
>    (progn
>       (format t ";;;~%;;; loading CMN... (be patient)~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :cmn)))
> EOF
> 
> # define a cmucl load program with clm2 priority for
> # recalcitrant old timers that won't migrate to 3 :-)
> %{__cat} <<EOF >cm-cmucl-load2.lisp
> ;;;
> ;;; CMUCL Common Music (CM) startup code
> ;;;
> (setf *compile-print* nil)
> (ext:unlock-all-packages)
> (in-package :cl-user)
> ;;;
> ;;; Load Common Music
> ;;;
> (format t ";;;~%;;; loading Common Music %{version}...~%;;;~%")
> (load "%{cm_src_dir}/src/cm.lisp")
> ;;; load portmidi
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-portmidi")
>    (use-system :portmidi :directory "%{cmucl_lib_dir}/portmidi/"))
> ;;; load osc
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-osc")
>    (sb-ext:without-package-locks
>       (use-system :osc :directory "%{cmucl_lib_dir}/osc/")))
> ;;; load cm-gtk
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-cm-gtk")
>    (use-system :cm-gtk :directory "%{cmucl_lib_dir}/cm-gtk/"))
> ;;;
> ;;; Load clm2
> ;;;
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-clm2")
>     (progn
>        (format t "~%;;;~%;;; loading CLM2...~%;;;~%")
>        (setf *package* (find-package :cm))
>        (use-system :clm2)))
> ;;;
> ;;; Load cmn
> ;;;
> (if (probe-file "%{cmucl_cm_bin_dir}/use-system-cmn")
>    (progn
>       (format t ";;;~%;;; loading CMN... (be patient)~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :cmn)))
> EOF
> 
> # build cm
> /usr/bin/lisp <<EOF
> ;;; make compilation process less verbose...
> (setf *compile-print* nil)
> (ext:unlock-all-packages)
> (in-package :cl-user)
> %if "%{midishare}" == "1"
> ;;; build the midishare interface
> (push :midishare *features*)
> (compile-file "midishare/MidiShare-Interface.lisp")
> (load "midishare/MidiShare-Interface")
> (compile-file "midishare/Player-Interface.lisp")
> (load "midishare/Player-Interface")
> %endif
> ;;; build Common Music
> ;;;
> ;;; we define the directories, otherwise cm.sh fails on the mach chroot
> ;;; because /dev/stderr is not there
> (defvar *cm-directory* "%{_builddir}/%{name}")
> (defvar *cm-bin-directory* "%{_builddir}/%{name}/bin/cmucl_bin/")
> (load "src/cm.lisp")
> ;;; build cffi
> (use-system :cffi :directory (truename "./cffi"))
> ;;; build portmidi
> (use-system :portmidi :directory (truename "./portmidi"))
> ;;; build osc
> (sb-ext:without-package-locks
>    (use-system :osc :directory (truename "./osc")))
> ;;; build cm-gtk
> (use-system :cm-gtk :directory (truename "./cm-gtk"))
> (quit)
> EOF
> # move binaries away
> mkdir cffi-bin-cmucl
> mv cffi/src/*x86f cffi-bin-cmucl/
> mkdir portmidi-bin-cmucl
> mv portmidi/*.x86f portmidi-bin-cmucl/
> mkdir osc-bin-cmucl
> mv osc/*.x86f osc-bin-cmucl/
> mkdir cm-gtk-bin-cmucl
> mv cm-gtk/*.x86f cm-gtk-bin-cmucl/
> %endif # CMUCL
> 
> # CLISP
> %if %{clisp_build}
> %{__mkdir} bin-clisp
> # define the clisp load program, checks for clm and cmn use-system files
> # we don't compile this as clisp insists on loading the requires at
> # compile time
> %{__cat} <<EOF >cm-clisp-load.lisp
> ;;;
> ;;; Clisp Common Music (CM) startup code
> ;;;
> (in-package :cl-user)
> ;;;
> ;;; Load Common Music
> ;;;
> (format t ";;;~%;;; loading Common Music %{version}...~%;;;~%")
> (load "%{cm_src_dir}/src/cm.lisp")
> ;;; load portmidi
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-portmidi")
>    (use-system :portmidi :directory "%{clisp_lib_dir}/portmidi/"))
> ;;; load osc
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-osc")
>    (sb-ext:without-package-locks
>       (use-system :osc :directory "%{clisp_lib_dir}/osc/")))
> ;;;
> ;;; Load clm, new version has priority
> ;;;
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-clm")
>    (progn
>       (format t "~%;;;~%;;; loading CLM3...~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :clm))
>   (if (probe-file "%{clisp_cm_bin_dir}/use-system-clm2")
>       (progn
>          (format t "~%;;;~%;;; loading CLM2...~%;;;~%")
>          (setf *package* (find-package :cm))
>          (use-system :clm2))))
> ;;;
> ;;; Load cmn
> ;;;
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-cmn")
>    (progn
>       (format t ";;;~%;;; loading CMN...~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :cmn)))
> ;;; initialize cm
> (cm)
> EOF
> 
> # define a clisp load program with clm2 priority for
> # recalcitrant old timers that won't migrate to 3 :-)
> %{__cat} <<EOF >cm-clisp-load2.lisp
> ;;;
> ;;; Clisp Common Music (CM) startup code
> ;;;
> (in-package :cl-user)
> ;;;
> ;;; Load Common Music
> ;;;
> (format t ";;;~%;;; loading Common Music %{version}...~%;;;~%")
> (load "%{cm_src_dir}/src/cm.lisp")
> ;;; load portmidi
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-portmidi")
>    (use-system :portmidi :directory "%{clisp_lib_dir}/portmidi/"))
> ;;; load osc
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-osc")
>    (sb-ext:without-package-locks
>       (use-system :osc :directory "%{clisp_lib_dir}/osc/")))
> ;;;
> ;;; Load clm2
> ;;;
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-clm2")
>     (progn
>        (format t "~%;;;~%;;; loading CLM2...~%;;;~%")
>        (setf *package* (find-package :cm))
>        (use-system :clm2)))
> ;;;
> ;;; Load cmn
> ;;;
> (if (probe-file "%{clisp_cm_bin_dir}/use-system-cmn")
>    (progn
>       (format t ";;;~%;;; loading CMN...~%;;;~%")
>       (setf *package* (find-package :cm))
>       (use-system :cmn)))
> ;;; initialize cm
> (cm)
> EOF
> 
> # build cm
> /usr/bin/clisp <<EOF
> (in-package :cl-user)
> (setf *compile-print* nil)
> (defvar *cm-directory* "%{_builddir}/%{name}")
> (defvar *cm-bin-directory* "%{_builddir}/%{name}/bin/clisp_bin/")
> ;;; clisp wants an absolute path here
> (load "%{_builddir}/%{name}/src/cm.lisp")
> ;;; build cffi
> (use-system :cffi :directory (truename "./cffi/"))
> ;;; build portmidi
> (use-system :portmidi :directory (truename "./portmidi/"))
> ;;; build osc
> (sb-ext:without-package-locks
>    (use-system :osc :directory (truename "./osc/")))
> (quit)
> EOF
> 
> # move binaries away
> mkdir cffi-bin-clisp
> mv cffi/src/*fas cffi-bin-clisp/
> mkdir portmidi-bin-clisp
> mv portmidi/*fas portmidi-bin-clisp/
> mkdir osc-bin-clisp
> mv osc/*fas osc-bin-clisp/
> %endif # CLISP
> 
> %install
> %{__rm} -rf %{buildroot}
> %{__mkdir} -p %{buildroot}%{_bindir}
> %{__mkdir} -p %{buildroot}%{_docdir}
> %{__mkdir} -p %{buildroot}%{cm_src_dir}
> 
> # copy the whole cm original source tree, includes cffi and friends if applicable
> (cd %{_builddir}/%{name}; %{__tar} cf - *)|(cd %{buildroot}%{cm_src_dir}; %{__tar} xpf -)
> 
> # common to ALL lisps
> %if "%{sbcl_build}" == "1" || "%{cmucl_build}" == "1" || "%{clisp_build}" == "1"
> # patch the runtime cm.asd to include hardwired paths for source and binaries
> (cd %{buildroot}%{cm_src_dir}; patch -p0 <%{PATCH0})
> # replace the templates patched in with the real paths
> # (this indirection exists so the patch is independent of potential changes in the paths)
> %{__perl} -p -i -e "s|CMSOURCEDIR|%{cm_src_dir}/|" %{buildroot}%{cm_src_dir}/cm.asd
> %{__perl} -p -i -e "s|CMSBCLBINDIR|%{sbcl_cm_bin_dir}/|" %{buildroot}%{cm_src_dir}/cm.asd
> %{__perl} -p -i -e "s|CMCMUCLBINDIR|%{cmucl_cm_bin_dir}/|" %{buildroot}%{cm_src_dir}/cm.asd
> %{__perl} -p -i -e "s|CMCLISPBINDIR|%{clisp_cm_bin_dir}/|" %{buildroot}%{cm_src_dir}/cm.asd
> # patch cm.asd to account for a "clm2" system present on cmucl and clisp only
> %{__perl} -p -i -e "s|\(when \(member name '\(\"clm\" \"cmn\"|\(when \(member name '\(\"clm\" \"cmn\" \#\+\(or cmu clisp\) \"clm2\"|" %{buildroot}%{cm_src_dir}/cm.asd
> %endif
> 
> # SBCL
> %if %{sbcl_build}
> %{__mkdir} -p %{buildroot}%{sbcl_cm_bin_dir}
> 
> # install common music binaries in target directory
> %if "%{fasldir}" != ""
> %{__mv} %{fasldir}/bin/sbcl_*/* %{buildroot}%{sbcl_cm_bin_dir}
> %else
> %{__mv} %{buildroot}%{cm_src_dir}/bin/sbcl_*/* %{buildroot}%{sbcl_cm_bin_dir}
> %endif
> # make sure they have a later date than the source
> touch %{buildroot}%{sbcl_cm_bin_dir}/*
> # make link to binaries for cm.sh
> DNAME=`basename %{buildroot}%{cm_src_dir}/bin/sbcl_*`
> rmdir %{buildroot}%{cm_src_dir}/bin/sbcl_*
> %{__ln_s} %{sbcl_cm_bin_dir} %{buildroot}%{cm_src_dir}/bin/${DNAME}
> %if "%{midishare}" == "1"
> # install midishare binaries in target directory
> %{__mv} %{buildroot}%{cm_src_dir}/src/midishare/*x86f %{buildroot}%{sbcl_cm_bin_dir}
> %endif
> 
> # create the use-system files (no clm2 under sbcl)
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-clm
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-cmn
> 
> # install the initial load program
> %{__mv} cm-sbcl-load.fasl %{buildroot}%{sbcl_cm_bin_dir}/cm-load.fasl
> 
> # the cm startup script
> %{__cat} <<EOF >%{buildroot}%{_bindir}/cm-sbcl
> #!/bin/bash
> # CM startup script for SBCL
> exec /usr/bin/sbcl --load "%{sbcl_cm_bin_dir}/cm-load" --eval "(cm)" \$@
> EOF
> %{__chmod} 0755 %{buildroot}%{_bindir}/cm-sbcl
> 
> # install cffi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/cffi/src
> %{__cp} -p cffi/cffi.asd %{buildroot}%{sbcl_lib_dir}/cffi/
> %{__mv} cffi-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/cffi/src/
> %{__cp} -p cffi/src/* %{buildroot}%{sbcl_lib_dir}/cffi/src/
> if [ -d "%{buildroot}%{cm_src_dir}/cffi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/cffi %{buildroot}%{cl_src_dir}/
> fi
> 
> # install portmidi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/portmidi
> %{__cp} -p portmidi/*lisp portmidi/portmidi* %{buildroot}%{sbcl_lib_dir}/portmidi/
> %{__mv} portmidi-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/portmidi/
> if [ -d "%{buildroot}%{cm_src_dir}/portmidi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/portmidi %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-portmidi
> 
> # install osc, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/osc
> %{__cp} -p osc/*lisp osc/osc* %{buildroot}%{sbcl_lib_dir}/osc/
> %{__mv} osc-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/osc/
> if [ -d "%{buildroot}%{cm_src_dir}/osc" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/osc %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-osc
> 
> # install cm-gtk, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/cm-gtk
> %{__cp} -p cm-gtk/*lisp cm-gtk/*asd %{buildroot}%{sbcl_lib_dir}/cm-gtk/
> %{__mv} cm-gtk-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/cm-gtk/
> if [ -d "%{buildroot}%{cm_src_dir}/cm-gtk" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/cm-gtk %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-cm-gtk
> 
> # install rts, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/rts
> %{__cp} -p rts/*lisp rts/*asd %{buildroot}%{sbcl_lib_dir}/rts/
> %{__mv} rts-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/rts/
> if [ -d "%{buildroot}%{cm_src_dir}/rts" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/rts %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-rts
> 
> # install fomus, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{sbcl_lib_dir}/fomus
> %{__cp} -p fomus/*lisp fomus/*asd %{buildroot}%{sbcl_lib_dir}/fomus/
> %{__mv} fomus-bin-sbcl/* %{buildroot}%{sbcl_lib_dir}/fomus/
> if [ -d "%{buildroot}%{cm_src_dir}/fomus" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/fomus %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{sbcl_cm_bin_dir}/use-system-fomus
> 
> # remove stray binary directories from source tree
> %{__rm} -rf %{buildroot}%{cm_src_dir}/*-bin-sbcl/
> %endif
> 
> # CMUCL
> %if %{cmucl_build}
> %{__mkdir} -p %{buildroot}%{cmucl_cm_bin_dir}
> 
> # install common music binaries in target directory
> %{__mv} %{buildroot}%{cm_src_dir}/bin/cmucl_*/* %{buildroot}%{cmucl_cm_bin_dir}
> # make sure they have a later date than the source
> touch %{buildroot}%{cmucl_cm_bin_dir}/*
> # make link to binaries for cm.sh
> # rmdir %{buildroot}%{cm_src_dir}/bin/cmucl_%{cmucl_orig_ver}_*
> %{__ln_s} %{cmucl_cm_bin_dir} %{buildroot}%{cm_src_dir}/bin/cmucl_%{cmucl_orig_ver}_linux-i686
> %if "%{midishare}" == "1"
> # install midishare binaries in target directory
> %{__mv} %{buildroot}%{cm_src_dir}/src/midishare/*x86f %{buildroot}%{cmucl_cm_bin_dir}
> %endif
> 
> # create the use-system files
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-clm2
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-clm
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-cmn
> 
> # install the initial load program
> %{__cp} -p cm-cmucl-load.lisp %{buildroot}%{cmucl_cm_bin_dir}/cm-load.lisp
> # install the loader with clm2 priority
> %{__cp} -p cm-cmucl-load2.lisp %{buildroot}%{cmucl_cm_bin_dir}/cm-load2.lisp
> 
> # the cm startup script
> %{__cat} <<EOF >%{buildroot}%{_bindir}/cm-cmucl
> #!/bin/bash
> # CM startup script for CMUCL
> exec /usr/bin/lisp -load "%{cmucl_cm_bin_dir}/cm-load.lisp" -eval "(cm)" $@
> EOF
> %{__chmod} 0755 %{buildroot}%{_bindir}/cm-cmucl
> 
> # cm startup script for clm2
> %{__cat} <<EOF >%{buildroot}%{_bindir}/cm-clm2-cmucl
> #!/bin/bash
> # CM startup script for CMUCL for clm2
> exec /usr/bin/lisp -load "%{cmucl_cm_bin_dir}/cm-load2.lisp" -eval "(cm)" $@
> EOF
> %{__chmod} 0755 %{buildroot}%{_bindir}/cm-clm2-cmucl
> 
> # install cffi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{cmucl_lib_dir}/cffi/src
> %{__cp} -p cffi/cffi.asd %{buildroot}%{cmucl_lib_dir}/cffi/
> %{__mv} cffi-bin-cmucl/* %{buildroot}%{cmucl_lib_dir}/cffi/src/
> %{__cp} -p cffi/src/* %{buildroot}%{cmucl_lib_dir}/cffi/src/
> if [ -d "%{buildroot}%{cm_src_dir}/cffi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/cffi %{buildroot}%{cl_src_dir}/
> fi
> 
> # install portmidi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{cmucl_lib_dir}/portmidi
> %{__cp} -p portmidi/portmidi* %{buildroot}%{cmucl_lib_dir}/portmidi/
> %{__mv} portmidi-bin-cmucl/* %{buildroot}%{cmucl_lib_dir}/portmidi/
> if [ -d "%{buildroot}%{cm_src_dir}/portmidi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/portmidi %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-portmidi
> 
> # install osc, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{cmucl_lib_dir}/osc
> %{__cp} -p osc/osc* %{buildroot}%{cmucl_lib_dir}/osc/
> %{__mv} osc-bin-cmucl/* %{buildroot}%{cmucl_lib_dir}/osc/
> if [ -d "%{buildroot}%{cm_src_dir}/osc" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/osc %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-osc
> 
> # install cm-gtk, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{cmucl_lib_dir}/cm-gtk
> %{__cp} -p cm-gtk/*lisp cm-gtk/*asd %{buildroot}%{cmucl_lib_dir}/cm-gtk/
> %{__mv} cm-gtk-bin-cmucl/* %{buildroot}%{cmucl_lib_dir}/cm-gtk/
> if [ -d "%{buildroot}%{cm_src_dir}/cm-gtk" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/cm-gtk %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{cmucl_cm_bin_dir}/use-system-cm-gtk
> 
> # remove stray binary directories from source tree
> %{__rm} -rf %{buildroot}%{cm_src_dir}/*-bin-cmucl/
> %endif
> 
> # CLISP
> %if %{clisp_build}
> %{__mkdir} -p %{buildroot}%{clisp_cm_bin_dir}
> 
> # move all the binaries except .lib files (which confuse the clm and cmn requires)
> find %{buildroot}%{cm_src_dir}/bin/clisp_* -type f ! -name \*.lib -exec mv {} %{buildroot}%{clisp_cm_bin_dir} \;
> # make sure they have a later date than the source
> touch %{buildroot}%{clisp_cm_bin_dir}/*
> # make link to binaries for cm.sh
> %{__rm} -f %{buildroot}%{cm_src_dir}/bin/clisp_*/*.lib
> rmdir %{buildroot}%{cm_src_dir}/bin/clisp_*
> %{__ln_s} %{clisp_cm_bin_dir}/ %{buildroot}%{cm_src_dir}/bin/clisp_%{clisp_orig_ver}_linux-i686
> 
> # create the use-system files
> touch %{buildroot}%{clisp_cm_bin_dir}/use-system-clm2
> touch %{buildroot}%{clisp_cm_bin_dir}/use-system-cmn
> %if %{clm_clisp}
> touch %{buildroot}%{clisp_cm_bin_dir}/use-system-clm
> %endif
> 
> # install the load program, we install the lisp source as we cannot
> # compile it, clisp insists on loading the requires at compile time.
> %{__cp} -p cm-clisp-load.lisp %{buildroot}%{clisp_cm_bin_dir}/cm-load.lisp
> # install the loader with clm2 priority
> %{__cp} -p cm-clisp-load2.lisp %{buildroot}%{clisp_cm_bin_dir}/cm-load2.lisp
> 
> # the cm startup script
> %{__cat} <<EOF >%{buildroot}%{_bindir}/cm-clisp
> #!/bin/bash
> # CM startup script for CLISP
> exec /usr/bin/clisp -I -i %{clisp_cm_bin_dir}/cm-load.lisp -p "CM" $@
> EOF
> %{__chmod} 0755 %{buildroot}%{_bindir}/cm-clisp
> 
> # cm startup script for clm2
> %{__cat} <<EOF >%{buildroot}%{_bindir}/cm-clm2-clisp
> #!/bin/bash
> # CM startup script for CLISP for clm2
> exec /usr/bin/clisp -I -i %{clisp_cm_bin_dir}/cm-load2.lisp -p "CM" $@
> EOF
> %{__chmod} 0755 %{buildroot}%{_bindir}/cm-clm2-clisp
> 
> # install cffi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{clisp_lib_dir}/cffi/src
> %{__cp} -p cffi/cffi.asd %{buildroot}%{clisp_lib_dir}/cffi/
> %{__mv} cffi-bin-clisp/* %{buildroot}%{clisp_lib_dir}/cffi/src/
> %{__cp} -p cffi/src/* %{buildroot}%{clisp_lib_dir}/cffi/src/
> if [ -d "%{buildroot}%{cm_src_dir}/cffi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/cffi %{buildroot}%{cl_src_dir}/
> fi
> 
> # install portmidi, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{clisp_lib_dir}/portmidi
> %{__cp} -p portmidi/portmidi* %{buildroot}%{clisp_lib_dir}/portmidi/
> %{__mv} portmidi-bin-clisp/* %{buildroot}%{clisp_lib_dir}/portmidi/
> if [ -d "%{buildroot}%{cm_src_dir}/portmidi" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/portmidi %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{clisp_cm_bin_dir}/use-system-portmidi
> 
> # install osc, both source and binaries are needed
> %{__mkdir_p} %{buildroot}%{clisp_lib_dir}/osc
> %{__cp} -p osc/osc* %{buildroot}%{clisp_lib_dir}/osc/
> %{__mv} osc-bin-clisp/* %{buildroot}%{clisp_lib_dir}/osc/
> if [ -d "%{buildroot}%{cm_src_dir}/osc" ] ; then
>     %{__mv} %{buildroot}%{cm_src_dir}/osc %{buildroot}%{cl_src_dir}/
> fi
> touch %{buildroot}%{clisp_cm_bin_dir}/use-system-osc
> %endif # CLISP
> 
> # get rid of CVS stuff
> CVSDIRS=`find %{buildroot}%{cm_src_dir} -type d -name CVS`
> if [ ! -z "${CVSDIRS}" ] ; then
>     for DIR in ${CVSDIRS} ; do
>       %{__rm} -rf ${DIR}
>     done
> fi
> 
> %clean
> %{__rm} -rf %{buildroot}
> 
> %files
> %defattr(-,root,root,-)
> %doc
> %{cm_src_dir}
> %if %{sbcl_build}
> %{cl_src_dir}/cffi
> %{cl_src_dir}/portmidi
> %{cl_src_dir}/osc
> %{cl_src_dir}/cm-gtk
> %{cl_src_dir}/rts
> %endif
> %if %{cmucl_build}
> %{cl_src_dir}/cffi
> %{cl_src_dir}/portmidi
> %{cl_src_dir}/osc
> %{cl_src_dir}/cm-gtk
> %exclude %{cm_src_dir}/bin/cmucl_%{cmucl_orig_ver}_linux-i686
> %endif
> %if %{clisp_build}
> %{cl_src_dir}/cffi
> %{cl_src_dir}/portmidi
> %{cl_src_dir}/osc
> %exclude %{cm_src_dir}/bin/clisp_%{clisp_orig_ver}_linux-i686
> %endif
> 
> %if %{cmucl_build}
> %files cmucl
> %defattr(-,root,root,-)
> %{_bindir}/cm-cmucl
> %{cmucl_cm_bin_dir}
> %exclude %{cmucl_cm_bin_dir}/cm-load2.lisp
> %exclude %{cmucl_cm_bin_dir}/use-system-clm
> %exclude %{cmucl_cm_bin_dir}/use-system-cmn
> %exclude %{cmucl_cm_bin_dir}/use-system-clm2
> %{cmucl_lib_dir}/cffi
> %{cmucl_lib_dir}/portmidi
> %{cmucl_cm_bin_dir}/use-system-portmidi
> %{cmucl_lib_dir}/osc
> %{cmucl_cm_bin_dir}/use-system-osc
> %{cmucl_lib_dir}/cm-gtk
> %{cmucl_cm_bin_dir}/use-system-cm-gtk
> %{cm_src_dir}/bin/cmucl_%{cmucl_orig_ver}_linux-i686
> 
> %files clm2-cmucl
> %defattr(-,root,root,-)
> %{_bindir}/cm-clm2-cmucl
> %{cmucl_cm_bin_dir}/cm-load2.lisp
> %{cmucl_cm_bin_dir}/use-system-clm2
> 
> %files clm-cmucl
> %defattr(-,root,root,-)
> %{cmucl_cm_bin_dir}/use-system-clm
> 
> %files cmn-cmucl
> %defattr(-,root,root,-)
> %{cmucl_cm_bin_dir}/use-system-cmn
> %endif
> 
> %if %{clisp_build}
> %files clisp
> %defattr(-,root,root,-)
> %{clisp_cm_bin_dir}
> %{_bindir}/*clisp
> %exclude %{clisp_cm_bin_dir}/cm-load2.lisp
> %exclude %{clisp_cm_bin_dir}/use-system-cmn
> %exclude %{clisp_cm_bin_dir}/use-system-clm2
> %if %{clm_clisp}
> %exclude %{clisp_cm_bin_dir}/use-system-clm
> %endif
> %{clisp_lib_dir}/cffi
> %{clisp_lib_dir}/portmidi
> %{clisp_cm_bin_dir}/use-system-portmidi
> %{clisp_lib_dir}/osc
> %{clisp_cm_bin_dir}/use-system-osc
> %{cm_src_dir}/bin/clisp_%{clisp_orig_ver}_linux-i686
> 
> %files clm2-clisp
> %defattr(-,root,root,-)
> %{_bindir}/cm-clm2-clisp
> %{clisp_cm_bin_dir}/cm-load2.lisp
> %{clisp_cm_bin_dir}/use-system-clm2
> 
> %if %{clm_clisp}
> %files clm-clisp
> %defattr(-,root,root,-)
> %{clisp_cm_bin_dir}/use-system-clm
> %endif
> 
> %files cmn-clisp
> %defattr(-,root,root,-)
> %{clisp_cm_bin_dir}/use-system-cmn
> %endif
> 
> %if %{sbcl_build}
> %files sbcl
> %defattr(-,root,root,-)
> %{sbcl_cm_bin_dir}
> %{_bindir}/*sbcl
> %exclude %{sbcl_cm_bin_dir}/use-system-clm
> %exclude %{sbcl_cm_bin_dir}/use-system-cmn
> %exclude %{sbcl_cm_bin_dir}/use-system-fomus
> %{sbcl_lib_dir}/cffi
> %{sbcl_lib_dir}/portmidi
> %{sbcl_cm_bin_dir}/use-system-portmidi
> %{sbcl_lib_dir}/osc
> %{sbcl_cm_bin_dir}/use-system-osc
> %{sbcl_lib_dir}/cm-gtk
> %{sbcl_cm_bin_dir}/use-system-cm-gtk
> %{sbcl_lib_dir}/rts
> %{sbcl_cm_bin_dir}/use-system-rts
> 
> %files clm-sbcl
> %defattr(-,root,root,-)
> %{sbcl_cm_bin_dir}/use-system-clm
> 
> %files cmn-sbcl
> %defattr(-,root,root,-)
> %{sbcl_cm_bin_dir}/use-system-cmn
> 
> %files fomus
> %defattr(-,root,root,-)
> %doc fomus/doc fomus/CHANGELOG fomus/COPYING fomus/README fomus/TODO
> %{cl_src_dir}/fomus
> 
> %files fomus-sbcl
> %defattr(-,root,root,-)
> %{sbcl_lib_dir}/fomus
> %{sbcl_cm_bin_dir}/use-system-fomus
> %endif
> 
> 
> %changelog
> * Wed Dec  3 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.10
> - updated versions for new sbcl on fc10
> 
> * Mon Dec  1 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.9
> - updated sbcl version for Fedora 8 to 1.0.22 (same for x86_64 in fc9)
> 
> * Thu Nov 27 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.9
> - on the sbcl that ships with fc10 the common-lisp-controller writes
>   compiled files to the cache directory, so create a fasldir define
>   to compensate for that, but only on i386 (!)
> - updated fomus to 0.2.28
> 
> * Wed Nov 26 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.9
> - update lisp versions on fc9, rebuild
> 
> * Tue Nov 25 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added support for fc10
> 
> * Fri Jul  4 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.8
> - rebuild on f8/9 for sbcl 1.0.17 and cmucl 19e
> 
> * Tue May 13 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added lisp versions for f9
> 
> * Fri Feb  1 2008 Arnaud Gomes-do-Vale <Arnaud.Gomes at ircam.fr>
> - rebuilt on CentOS
> 
> * Fri Jan 18 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.7
> - rebuild on f7/8 for sbcl 1.0.13
> 
> * Tue Dec  4 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.6
> - rebuild on f7/f8 for clisp 2.43
> 
> * Sun Dec  2 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.5
> - updated to portmidi 2.0.2
> - added osc-1.0.1-sockets.patch (patch2) to fix unknown function which is
>   otherwise defined in the sb-alien package
> 
> * Fri Nov 30 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.4
> - added osc tarball and support
> - had to disable package locks, see:
>   http://ccrma-mail.stanford.edu/pipermail/cmdist/2007-May/004084.html
> 
> * Wed Nov 14 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added lisp versions for f8
> 
> * Tue Sep  4 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.20070402.cvs.3
> - rebuild on sbcl 1.0.9/fc6
> 
> * Mon Jun 11 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.2.20070402.cvs
> - rebuild on sbcl 1.0.6/fc6
> 
> * Tue May  8 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added fc7 support
> 
> * Tue Apr  3 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.1.20070402.cvs
> - added Fomus, for now only supported in the sbcl build. Fomus creates
>   two additional packages that behave in the same way as the externally
>   built clm/cmn packages (cm-fomus and cm-fomus-sbcl).
> - fixed library lookup paths for x86_64, tag explicit dependencies as
>   64 bit in x86_64
> 
> * Mon Apr  2 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.11.0-0.1.20070402.cvs
> - updated to current cvs snapshot
> - added rts library for sbcl build
> - used portmidi 2.0.0 instead of cvs, cvs does not work with current
>   cm cvs
> - added explicit release dependency for sbcl to use the proper thread
>   enabled Planet CCRMA build of sbcl
> 
> * Sun Dec 18 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added clisp support, includes cffi and portmidi (but not cm-gtk),
>   clisp does not support threads either. 
> 
> * Fri Dec 16 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - add separate support for starting cm with clm2 instead of clm3
> - clisp support is completely obsolete right now
> 
> * Thu Dec 15 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.7.0-0.2.cvs
> - cvs 2005.12.15
> - changed autoload-* files to use-system-*, added portmidi and cm-gtk
> - include use-system-portmidi and use-system-cm-gtk in cm-sbcl package
>   so that they are always started, include .so requirements for portmidi
>   and gtk2 in cm-sbcl
> - propagated changes to cmucl build
> 
> * Wed Dec 14 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added cffi (sbcl)
> - added portmidi (sbcl)
> - added cm-gtk (sbcl)
> 
> * Mon Dec 12 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - started building new 2.7.x cvs package, see:
>   http://commonmusic.sourceforge.net/doc/install.html
>     export CVSROOT=":pserver:anonymous at cvs.sourceforge.net:/cvsroot/commonmusic" 
>     cvs login
>     cvs checkout -P cm
> 
> * Sat Jan  7 2005 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - fixed file lists and build to include full name of cmucl and clisp
>   binary directories, otherwise the links are not found
> - do not generate the clm-clisp package (clm3 does not run in clisp)
> 
> * Thu Dec 30 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - spec file cleanups
> 
> * Sun Nov  7 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added clm2 autoload for cmucl and clisp
> - fix exported clm symbols for clm3
> 
> * Wed Nov  3 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.4.2-3
> - rebuild for new version of base lisps
> - we need to split the release numbering for the different lisps
> 
> * Wed May 12 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - added buildrequires
> 
> * Tue Feb 10 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - added midishare-player library requires
> 
> * Wed Feb  4 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - factored (cm)(clm) initialization for cmucl in one function (cm-init), 
>   FC1 command line parsing was barfing on -eval when lisp code in the
>   command line had spaces in it. 
> 
> * Tue Feb  3 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
> - clisp: suppress redefinition warnings during load
> 
> * Mon Feb  2 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.4.2-1
> - updated to final 2.4.2 release
> 
> * Sat Jan 17 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2.4.1-1.cvs
> - switched to separate packages for CM/CLM/CMN but we are keeping in
>   this package the changelog for the old combined cm-clm-cmn package
> - added midishare support for CMUCL
> 
> * Tue Dec 16 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2003.12.16
> - updated to clm 2 of 12/15/2003
> - added PreReq's to avoid out of order installs with apt (you have to 
>   have the matching cmucl installed before installing clm and rebuilding
>   the ffi interface)
> 
> * Thu Dec 11 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2003.11.18
> - added new requirements for cmucl under 7.3
> - had to disable midishare when building under cmucl-3.1.4 on 7.3
> 
> * Sat Nov 15 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2003.11.04
> - removed old cm 2.3.4 source and "newcm" define
> - added patch for jack feature
> - removed old patches for cm
> 
> * Thu Nov 11 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2003.11.04
> - added new alsa api patch for sndlib in clm-2
> 
> * Sun Nov  9 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 2003.11.04
> - started versioning with release date
> 
> * Tue Aug 19 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-21
> - fixed dependency order for installs of the source packages, changed
>   the :Requires to PreReq: tags. "Requires" should also order packages
>   correctly at install time but it does not (at least when invoqued
>   through apt).
> 
> * Thu Aug 14 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-20
> - updated to clm of 08/18/2003, cm 2.4.0 of 06/28/2003, cmn of 08/15/2003
> - added release tags, did not change the doc directory name for cm/clm/cmn
> 
> * Wed Mar 19 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-18
> - updated to clm of 03/19/2003, cm 2.4.0 of 03/19/2003
> 
> * Tue Jan  7 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-18
> - updated to clm/cmn of 03/10/2003, cm 2.4.0 of 03/10/2003
> 
> * Tue Jan  7 2003 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-16
> - updated to clm/cmn of 01/07/2003, cm 2.4.0 of 01/02/2003
> - split source code into separate packages so that clisp and cmucl
>   installs can coexist, require the packages in the binary packages
> 
> * Tue Dec 23 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-15
> - more reorganization of the internals, new startup scripts
> 
> * Fri Dec 20 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-15
> - cmucl cores now stored in /usr/lib/cmucl
> - rearranged directory structure to match clisp and cmucl
> - create hack (see SOURCE4) to load cmn shared library for xcmnw
> 
> * Thu Dec 19 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-15
> - updated to cm 2.4.0 of 12/19/2002, clm-2 of 12/18/2002 and cmn of 
>   12/08/2002
> - changed location of sources to /usr/share/lisp/src
> 
> * Tue Oct 29 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-13
> - updated to clm of 10/21/2002, cmn of 10/22/2002
> - added compilation of the cmn viewer (xcmnw)
> 
> * Wed Aug 28 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-12
> - updated to clm of 08/28/2002, cmn of 07/30/2002
> - added workaround for clm under cmucl bug. When a clm cmucl package
>   is used on a different machine from the one it was compiled in there
>   is a small chance of the foreign function interface misbehaving and 
>   an error happening on startup. I observed this bug when crossing
>   processor family boundaries. For example, a cmucl-clm package compiled
>   on a Pentium III would work on Athlons, Pentium IVs and some Pentium IIs 
>   (Deschutes), but it would not work on Pentium Pros and some Pentium IIs
>   (Klamath). Very weird. The workaround involves recompiling the ffi.lisp
>   files at install time and reloading this customized version on startup. 
> 
> * Sat Jul 20 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-11
> - updated to clm of 07/23/2002
> 
> * Sat Jul 20 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-10
> - updated to clm of 07/20/2002 (with fix for cmucl reloads)
> 
> * Tue Jul 16 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-9.1
> - add require for gcc, clm would not be useful without that
> 
> * Sun Jul 14 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-9
> - updated to cmn and clm of 07/14/2002
> - more tweaks to the post scripts
> 
> * Wed Jul  3 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-8.1
> - fixed post and preun for cmucl, was not working for upgrades
> 
> * Tue Jul 02 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-8
> - updated to clm-2 of 06/27/2002, cmn of 06/29/2002
> 
> * Thu Jun 20 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-7
> - downloaded cm documentation patches for 2.3.4, added to setup
> 
> * Sun Jun 16 2002 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - alsa 0.5 no longer supported
> - change package naming, alsa no suffix, oss with "-oss" suffix
> - new versions of clm/cm/cmn
> 
> * Thu Sep 27 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-6
> - 1.0-6 release, official cm-2.2.1, cmn 09/12/2001, clm 09/26/2001
> - added %%{lisp} prefix to doc directories so that both cmucl and clisp
>   versions of a package can coexist
> - added trivial test scripts to verify the fm-violin can beep
> 
> * Tue Sep 25 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - changed build_oss to saner audio_api, appended all package names with
>   the sound api so that we can have oss, alsa0.5 and alsa0.9 packages
> - new, improved cm-2.2.1
> - added clm and cmn dates to package information
> 
> * Fri Sep 21 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-5
> - tried cm-2.2.1
> - added support to build cm and cmn under cmucl
> - changed naming scheme of packages: version number is no longer included
>   in the name of the package, otherwise it is not possible to easily
>   upgrade a package when there are major version number changes. This
>   means it is not possible to know which version of, let's say, cm, is
>   inside a package but I can't see a way around. The version info has
>   been added to the Summary and Description fields of the package. 
> - added cm-clm-cmn-build script in SOURCES, rebuilds all binary rpms, 
>   uses environment variables to control internal build options
> - added workaround for rpm BUG: sometimes rpm will create bad binary rpms
>   when (apparently?) packing the big cmucl core images, so compress them
>   before creating binaries, uncompress in a %%post and compress again in 
>   a %%preun. Arghhh... this happens in rpm 4.0.2 up to release 8 (latest
>   I found). Could not test with preliminary 4.0.3 because it triggers
>   a package upgrade storm. 
> 
> * Fri Sep 14 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-4
> - fixed alsa dependencies for oss packages. Doh!
> 
> - clm under clisp needs the saved-* files
> 
> * Thu Sep 13 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-3
> - added switches to generate oss packages
> - added separate sndplay package so that it does not conflict with the
>   snd-utils package (from snd)
> 
> * Wed Sep 12 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 1.0-2
> - cmn.tar.gz: Sep 12 2001
> - clm-2.tar.gz: Sep 10 2001
> - added sndplay to /usr/lib/lisp/bin
> 
> * Tue Sep 11 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - added proper logical startup path to cm
> - added all current patches to cm
> - changed package naming
> 
> * Sun Sep  9 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - changed to /usr/lib/lisp as base directory, renamed scripts so that
>   both clisp and cmucl versions can be installed at the same time
> - added cmn build, package cm-clm-cmn
> - the clm package has the real clm version, composite packages (cm-clm and
>   cm-clm-cmn) have an arbitrary version of 1.0, the name of the
>   package contains the version number of the programs that it
>   contains. The revision reflects the version of the underlying spec
>   file.
> 
> * Fri Sep  7 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - added restart-clm to the clm script for cmucl
> - added support for clisp
> - added alsa lib dependency and autodetection of api at build time
> - added cm support under clisp
> 
> * Thu Sep  6 2001 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
> - cmucl clm build. 

-------------- next part --------------
%define	desktop_vendor planetccrma

%define pkgver 0.4
%define dirver 0.4

Summary: A Jack based mixer application
Name: jackmix
Version: %{pkgver}
Release: 1%{?dist}
License: GPL
Group: Applications/Multimedia
URL: http://www.arnoldarts.de/drupal/?q=JackMix%3Aintro
Source0: http://www.arnoldarts.de/drupal/files/downloads/jackmix/jackmix-%{version}.tar.gz
Source1: jackmix.desktop
Patch0: jackmix-cxxflags.patch
Patch1: jackmix-moc-qt4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Packager: Fernando Lopez-Lezcano
Vendor: Planet CCRMA
Distribution: Planet CCRMA

BuildRequires: desktop-file-utils scons pkgconfig
BuildRequires: libjpeg-devel libpng-devel zlib-devel
BuildRequires: jack-audio-connection-kit-devel lash-devel
%if 0%{?fedora} >= 9
BuildRequires: qt-devel
%else
BuildRequires: qt4-devel
%endif
%if 0%{?fedora} >= 5 || 0%{?rhel} >= 5
BuildRequires: libX11-devel
%else
BuildRequires: XFree86-devel
%endif

%description
Jackmix is a mixer app for jack that looks exactly like the mixer you
would use if you had to connect your analog equipment.

%prep
%setup -q -n jackmix-%{dirver}
%patch0 -p1
%patch1 -p1

%install
%{__rm} -rf %{buildroot}
if [ -z "${QTDIR}" ] ; then
%if 0%{?rhel} == 5
    export QTDIR=`pkg-config --variable=prefix QtCore`
%else
    export QTDIR=`pkg-config --variable=prefix Qt`
%endif
    export PATH=${QTDIR}/bin:${PATH}
    echo PATH=$PATH
fi
scons

# install manually, install target in 0.4 does not work
%{__mkdir} -p %{buildroot}%{_bindir}
%{__install} -m 0755 jackmix/jackmix %{buildroot}%{_bindir}/

BASE="Application AudioVideo Audio"
XTRA="X-Jack X-Digital_Processing"

%{__mkdir} -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor %{desktop_vendor} \
  --dir %{buildroot}%{_datadir}/applications    \
  `for c in ${BASE} ${XTRA} ; do echo "--add-category $c " ; done` \
  %{SOURCE1}

# remove the original desktop entry
%{__rm} -f %{buildroot}%{_datadir}/applications/%{name}.desktop

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc 
%{_bindir}/*
%{_datadir}/applications/*%{name}.desktop


%changelog
* Thu Sep 24 2009 David Cornette <rpm at davidcornette.com>
- updated for Fedora 11

* Thu Jul 10 2008 Arnaud Gomes-do-Vale <Arnaud.Gomes at ircam.fr>
- built on CentOS 5

* Tue Jun 17 2008 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
- updated qt build dependencies for fc9

* Wed Nov 14 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 0.4-1
- updated to version 0.4
- updated desktop categories
- added lash-devel build requirement
- install binary manually, scons install target does not work

* Tue Jun 19 2007 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 0.3.1-1
- updated to version 0.3.1
- needs qt4, changed to use scons

* Wed Dec  6 2006 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 0.0.3-2
- spec file tweaks, build for fc6

* Sat May 13 2006 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 0.0.3-2
- added Planet CCRMA categories to desktop entry, more spec file cleanups

* Fri Mar 31 2006 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu>
- proper build dependencies for fc5

* Wed Dec 29 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 
- spec file cleanup

* Tue Jul 20 2004 Fernando Lopez-Lezcano <nando at ccrma.stanford.edu> 0.0.3-1
- initial build
-------------- next part --------------
diff -rupN jackmix-0.4/SConstruct jackmix-0.4.dlc/SConstruct
--- jackmix-0.4/SConstruct	2007-09-02 12:02:37.000000000 -0400
+++ jackmix-0.4.dlc/SConstruct	2009-09-23 20:35:13.546050533 -0400
@@ -28,7 +28,7 @@ env.Replace( LIBS="" )
 env.Replace( LIBPATH="" )
 
 #env['CXXFLAGS']+="-Wall -Werror -g -fpic"
-env['CXXFLAGS']+="-fpic"
+env.Append(CXXFLAGS = '-fpic')
 
 def CheckPKGConfig( context, pkgname, version="", all=False ):
 	import SCons.Util, os, string
-------------- next part --------------
diff -rupN jackmix-0.4/SConstruct jackmix-0.4.dlc/SConstruct
--- jackmix-0.4/SConstruct	2009-09-24 00:44:46.157923163 -0400
+++ jackmix-0.4.dlc/SConstruct	2009-09-24 00:43:47.199689298 -0400
@@ -23,6 +23,7 @@ if env['QTDIR'].find( '3' ) >= 0:
 	env['QTDIR'] = "/usr"
 	env['QT_CPPPATH'] = "";
 	env['QT_LIB'] = ""
+        env.Replace(QT_MOC = 'moc-qt4')
 
 env.Replace( LIBS="" )
 env.Replace( LIBPATH="" )


More information about the PlanetCCRMA mailing list