File fwzs.spec of Package fwzs

#
# spec file for package fwzs
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# icecream 0


Name:           fwzs
Url:            http://gitorious.org/opensuse/fwzs
Summary:        Tray applet that allows to switch firewall zones of interfaces
Version:        0.5
Release:        1
License:        GPL-2.0
Group:          System/GUI/Other
Source:         fwzs-%version.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         dbus-1
Requires:       SuSEfirewall2 > 3.6_SVNr220
Requires:       python-gtk
Recommends:     python-notify
%if 0%{?suse_version} < 1130
Requires:       PolicyKit
%else
Requires:       polkit
%endif
BuildArch:      noarch

%description 
Firewall Zone Switcher consists of a DBus service and a system
tray applet that lets the user switch firewall zones of network
interfaces.

%prep
%setup -q

%build
%configure
make %{?jobs:-j%jobs}

%install
make DESTDIR="%{buildroot}" install
%if 0%{?suse_version} < 1130
rm %{buildroot}%{_datadir}/polkit-1/actions/org.opensuse.zoneswitcher.policy
%else
rm %{buildroot}%{_datadir}/PolicyKit/policy/org.opensuse.zoneswitcher.policy
%endif
#
%find_lang fwzsd
%find_lang fwzsapp
mv fwzsapp.lang %name.lang
cat fwzsd.lang >> %name.lang
rm fwzsd.lang

%files -f %name.lang
%defattr(-,root,root)
%doc COPYING
%{_sbindir}/fwzsd
%{_datadir}/fwzs
%{_datadir}/dbus-1/system-services/org.opensuse.zoneswitcher.service
%{_datadir}/applications/fwzsapp.desktop
%if 0%{?suse_version} < 1130
%dir %{_datadir}/PolicyKit
%dir %{_datadir}/PolicyKit/policy
%{_datadir}/PolicyKit/policy/org.opensuse.zoneswitcher.policy
%else
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%{_datadir}/polkit-1/actions/org.opensuse.zoneswitcher.policy
%endif
%{_bindir}/fwzsapp
%config %{_sysconfdir}/dbus-1/system.d/org.opensuse.zoneswitcher.conf

%changelog