File gufw.spec of Package gufw

#
# spec file for package gufw
#
# Copyright (c) 2013 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/
#


Name:           gufw 
Version:        13.10.3 
Release:        0
Summary:        Uncomplicated Firewall
License:        GPL-3.0
Group:          Productivity/Networking/Security
Url:            http://launchpad.net/%{name}
Source0:        %{name}-%{version}.tar.bz2
#Source90:       gufw-rpmlintrc
#Patch1:         gui-ufw-11.10.2-gufw.Daemon.conf.diff
BuildArch:      noarch

BuildRequires:  autoconf
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  python-devel
BuildRequires:  python-distutils-extra
BuildRequires:  python-netifaces
BuildRequires:  update-desktop-files

Requires:       python >= %python_version
Requires:       ufw
%if 0%{?suse_version} <= 1210
Requires:       gir-repository
%else
Requires:       girepository-1_0
%endif
Requires:       dbus-1-python
Requires:       gufw-lang
Requires:       notification-daemon
Requires:       python-distutils-extra
Requires:       python-gobject >= 3.0.1
Requires:       python-netifaces
Requires:       typelib-1_0-WebKit-3_0

%description
An easy, intuitive, way to manage your Linux firewall. It supports common tasks such as allowing or blocking pre-configured, common p2p, or individual ports port(s), and many others!

%lang_package

%prep
%setup -q -n gui-ufw-13.10.3
#Submited patch through ufw's bug report
#Fix directory locations instead of #CONFIG_PREFIX#
#http://bugs.launchpad.net/ufw/+bug/819600
%build

%install
rm -rf %{buildroot}
python setup.py install --prefix=/usr \
--root %{buildroot}
rm %{buildroot}/usr/lib/python2.7/site-packages/gufw/model/__init__.py
rm %{buildroot}/usr/lib/python2.7/site-packages/gufw/view/__init__.py
rm %{buildroot}/usr/lib/python%python_version/site-packages/gufw/model/__init__.pyc
rm %{buildroot}/usr/lib/python%python_version/site-packages/gufw/view/__init__.pyc
chmod 755 %{buildroot}/usr/lib/python2.7/site-packages/gufw/gufw.py
chmod 755 %{buildroot}/usr/lib/python2.7/site-packages/gufw/backend.py
%suse_update_desktop_file -r gufw System Security
%find_lang gufw
%fdupes

%post
cp /usr/lib/python2.7/site-packages/gufw/__init__.py /usr/lib/python2.7/site-packages/gufw/model/__init__.py
cp /usr/lib/python2.7/site-packages/gufw/__init__.py /usr/lib/python2.7/site-packages/gufw/view/__init__.py
%desktop_database_post

%postun
%desktop_database_postun

%files 
%defattr(-,root,root)
%doc COPYING.GPL3
%dir /etc/gufw/app_profiles
%config /etc/gufw/app_profiles/*
/usr/bin/gufw
/usr/bin/gufw-pkexec
/usr/lib/python%python_version/site-packages/gufw-%{version}-py%python_version.egg-info
/usr/lib/python%python_version/site-packages/gufw/__init__.py
/usr/lib/python%python_version/site-packages/gufw/__init__.pyc
/usr/lib/python%python_version/site-packages/gufw/controller.py
/usr/lib/python%python_version/site-packages/gufw/controller.pyc
/usr/lib/python%python_version/site-packages/gufw/gufw.py
/usr/lib/python%python_version/site-packages/gufw/gufw.pyc
/usr/share/applications/gufw.desktop
/usr/share/doc/gufw/README
/usr/share/gufw/ui/add.ui
/usr/share/gufw/ui/main.ui
/usr/share/gufw/ui/preferences.ui
/usr/share/icons/hicolor/48x48/apps/gufw.png
/usr/share/man/man8/gufw.8.gz
/usr/share/polkit-1/actions/com.ubuntu.pkexec.gufw.policy
/usr/lib/python%python_version/site-packages/gufw
/usr/lib/python%python_version/site-packages/gufw/model
/usr/lib/python%python_version/site-packages/gufw/view
/usr/share/doc/gufw
/usr/share/gufw
/usr/share/gufw/media
/usr/share/gufw/ui
/usr/share/icons/hicolor
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/etc/gufw
/usr/share/polkit-1
/usr/share/polkit-1/actions
%if 0%{?suse_version} && 0%{?suse_version} <= 1210
  /usr/share/omf
%endif

%files lang -f gufw.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by