Laca:
Thanks for the comments - I updated the spec file as you suggested.
Brian
> On Tue, 2007-01-23 at 13:58 +0800, Brian Cameron wrote:
>> %include Solaris.inc
>> +
>> +# Set with_cd to 1 if you want to build the gnome-cd program. It will
>> +# install it to gnome-cd-real since gnome-cd is a symlink to
>> +# sound-juicer. This is just for testing purposes or for users who want
>> +# to rebuild with gnome-cd because they want to use it.
>> +#
>> +%define with_cd 0
>> +
>> %use gmedia = gnome-media.spec
>
> There's a better way to do this.
>
> If you use the --with-foo option of pkgbuild/pkgtool/rpmbuild,
> it defines _with_foo as "--with-foo". It's a much nicer way
> to enable optional features than editing the spec file.
>
> You could do something like this:
>
> %if %{?_with_foo:1}%{?!_with_foo:0}
>
> or if it appears in the same spec file several times, you can
> define a macro:
>
> %define build_with_foo %{?_with_foo:1}%{?!_with_foo:0}
>
> and then use it like this:
>
> %if %build_with_foo
> ...
> %else
> ...
> %endif
>
> In this case, I'd prefer to call the option --with-gnome-cd rather
> than --with-cd.
>
> Laca
>
>