Version 1 (modified by daisuke, 15 years ago) (diff) |
---|
bcond_with または bcond_without を使うことで、条件ビルドの spec への記述が書きやすくなり、 rpmbuild への --with/--without スイッチで機能の追加削除の選択ができるようになります。
例:
以下の例ではデフォルトでビルドした場合は bar のみが定義されます。
%bcond_with foo %bcond_without bar %if %{with foo} BuildRequires: foo-devel %endif %if %{with bar} BuildRequires: bar-devel %endif %configure .... \ %{?with_foo:--with-foo} \ %{?with_bar:--with-bar}