--- chestnut-dialer-0.3.3-alt4.1/chestnut-dialer.spec 2008-02-11 01:37:21 +0000 +++ chestnut-dialer-0.3.3-alt5/chestnut-dialer.spec 2008-02-12 10:48:35 +0000 @@ -4,9 +4,13 @@ %define pamdir %_sysconfdir/pam.d %define consoleappsdir %_sysconfdir/security/console.apps +%def_enable qt +%def_enable gtk2 +%def_with consolehelper + Name: chestnut-dialer Version: 0.3.3 -Release: alt4.1 +Release: alt5 Summary: A PPP dialing program, written in Python License: GPL @@ -24,19 +28,18 @@ Patch6: chestnut-dialer-0.3.3-alt-mtu_mr Patch7: chestnut-dialer-0.3.3-alt-no_resolvconf.patch Packager: Michael Shigorin -%{!?_with_gtk2: %{!?_without_gtk2: %define _with_gtk2 1}} -%{!?_with_qt: %{!?_without_qt: %define _with_qt 1}} - Requires: ppp Requires: python >= 2.2 Requires: python-modules-libxml2 PreReq(post,preun): /sbin/install-info %{?_with_consolehelper:Requires: %consolehelper} -# FIXME according to the policy (and remove kluge below)! -Provides: python2.4(chestnut_dialer) +#%%py_provides chestnut_dialer +# Find chestnut_dialer and other provides +%add_python_lib_path %_datadir/chestnut-dialer/ BuildArch: noarch + BuildRequires: ppp BuildRequires: python >= 2.2 BuildRequires: python-modules-libxml2 @@ -41,8 +44,8 @@ BuildRequires: ppp BuildRequires: python >= 2.2 BuildRequires: python-modules-libxml2 BuildRequires: texinfo -%{?_with_gtk2:BuildRequires: python-module-pygtk-libglade} -%{?_with_qt:BuildRequires: python-module-qt} +%{?_enable_gtk2:BuildRequires: python-module-pygtk-libglade} +%{?_enable_qt:BuildRequires: python-module-qt} %{?_with_consolehelper:BuildRequires: %consolehelper} Summary(ru_RU.KOI8-R): Программа дозвона по протоколу PPP, написанная на Python. @@ -77,7 +80,7 @@ Chestnut Dialer викону╓ться з прив╕леями модем). Chestnut Dialer використову╓ стандартний демон pppd для з'╓днання з провайдером. -%if %{?_with_gtk2:1}%{!?_with_gtk2:0} +%if_enabled gtk2 %package gtk2 Summary: GTK2 user interface for Chestnut Dialer Summary(ru_RU.KOI8-R): Интерфейс пользователя GTK2 для Chestnut Dialer. @@ -97,7 +100,7 @@ This is the GTK2 user interface for Ches Интерфейс користувача GTK2 для Chestnut Dialer. %endif -%if %{?_with_qt:1}%{!?_with_qt:0} +%if_enabled qt %package qt Summary: QT user interface for Chestnut Dialer Summary(ru_RU.KOI8-R): Интерфейс пользователя QT для Chestnut Dialer. @@ -129,10 +132,8 @@ This is the QT user interface for Chestn %build %configure \ - %{?_with_gtk2:--enable-gtk2} \ - %{?_without_gtk2:--disable-gtk2} \ - %{?_with_qt:--enable-qt} \ - %{?_without_qt:--disable-qt} \ + %{subst_enable gtk2} \ + %{subst_enable qt} \ --with-pppconfdir=%pppconfdir \ --with-docdir=%docdir \ %{?_with_consolehelper} \ @@ -152,17 +153,21 @@ install -m 0644 chestnut-dialer-qt.deskt %preun %uninstall_info %name.info +%if_enabled gtk2 %post gtk2 %update_menus %postun gtk2 %clean_menus +%endif +%if_enabled qt %post qt %update_menus %postun qt %clean_menus +%endif %files %doc AUTHORS COPYING ChangeLog NEWS* README* FAQ* @@ -171,7 +176,7 @@ install -m 0644 chestnut-dialer-qt.deskt %_man1dir/chestnut-dialer* %pppconfdir/peers/* %_bindir/chestnut-dialer -%if %{?_with_consolehelper:1}%{!?_with_consolehelper:0} +%if_with consolehelper %_sbindir/chestnut-dialer %pamdir/chestnut-dialer %consoleappsdir/chestnut-dialer @@ -185,13 +190,13 @@ install -m 0644 chestnut-dialer-qt.deskt %_datadir/locale/*/LC_MESSAGES/chestnut-dialer.mo %_pixmapsdir/chestnut-dialer.png -%if %{?_with_gtk2:1}%{!?_with_gtk2:0} +%if_enabled gtk2 %files gtk2 %_datadir/chestnut-dialer/chestnut_dialer/gtk2_ui %_datadir/applications/chestnut-dialer-gtk2.desktop %endif -%if %{?_with_qt:1}%{!?_with_qt:0} +%if_enabled qt %files qt %_datadir/chestnut-dialer/chestnut_dialer/qt_ui %_datadir/applications/chestnut-dialer-qt.desktop @@ -204,6 +209,10 @@ install -m 0644 chestnut-dialer-qt.deskt # - check ru.po %changelog +* Tue Feb 12 2008 Michael Shigorin 0.3.3-alt5 +- Fix python provides. +- Use %%def_enable/%%if_enabled macros instead of ?_with_. + * Mon Feb 11 2008 Grigory Batalov 0.3.3-alt4.1 - Rebuilt with python-2.5. End of diff Files not compared in chestnut-dialer-0.3.3-alt4.1: chestnut-dialer-0.3.3/ Files not compared in chestnut-dialer-0.3.3-alt5: chestnut-dialer-0.3.3/