LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ufw.spec of Package ufw (Project home:Dremor:Aurora)

#
# spec file for package ufw
#
# Copyright (c) 2015 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:           ufw
Version:        0.33 
Release:        0
Summary:        Uncomplicated Firewall
License:        GPL-3.0
Group:          Productivity/Networking/Security
Url:            http://launchpad.net/ufw
Source0:        https://launchpad.net/ufw/%{version}/%{version}/+download/%{name}-%{version}.tar.gz
Source1:        ufw-init
Source2:        ufw.service
BuildArch:      noarch
BuildRequires:  iptables
BuildRequires:  python-base >= 2.7
BuildRequires:  python-devel
BuildRequires:  systemd-rpm-macros
Requires:  		iptables
Recommends:     %{name}-lang
%systemd_requires

#Requires:       
%description
The Uncomplicated Firewall(ufw) is a front-end for netfilter, which
aims to make it easier for people unfamiliar with firewall concepts.
Ufw provides a framework for managing netfilter as well as 
manipulating the firewall. 

%lang_package

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

%build
#python setup.py build

%install
python setup.py install --prefix=%{_prefix} \--root %{buildroot}
mkdir -p %{buildroot}/etc/init.d/
install -m 755 %{SOURCE1} %{buildroot}/etc/init.d/ufw
mkdir -p %{buildroot}/%{_bindir}
ln -s %{_sbindir}/ufw %{buildroot}/%{_bindir}/ufw
mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service

%pre
%service_add_pre ufw.service

%post
%service_add_post ufw.service

%preun
%service_del_preun ufw.service

%postun
%service_del_postun ufw.service

%files
%defattr(-,root,root)
/lib/ufw/ufw-init
/lib/ufw/ufw-init-functions
/lib/ufw/user.rules
/lib/ufw/user6.rules
%{python_sitelib}/ufw-%{version}-py%python_version.egg-info
%{_sbindir}/ufw
%{_bindir}/ufw
%{_mandir}/man8/ufw-framework.8.gz
%{_mandir}/man8/ufw.8.gz
%config %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/applications.d
%config %{_sysconfdir}/default/ufw
%{_sysconfdir}/init.d/ufw
%{_unitdir}/%{name}.service
/lib/ufw
%{python_sitelib}/ufw
%{_datadir}/%{name}
%{_datadir}/%{name}/iptables
%exclude %{_datadir}/%{name}/messages

%files lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}/messages
%lang(zh_TW) %{_datadir}/%{name}/messages/zh_TW.mo
%lang(ar) %{_datadir}/%{name}/messages/ar.mo
%lang(bg) %{_datadir}/%{name}/messages/bg.mo
%lang(ca) %{_datadir}/%{name}/messages/ca.mo
%lang(cs) %{_datadir}/%{name}/messages/cs.mo
%lang(da) %{_datadir}/%{name}/messages/da.mo
%lang(de) %{_datadir}/%{name}/messages/de.mo
%lang(el) %{_datadir}/%{name}/messages/el.mo
%lang(en_AU) %{_datadir}/%{name}/messages/en_AU.mo
%lang(en_GB) %{_datadir}/%{name}/messages/en_GB.mo
%lang(es) %{_datadir}/%{name}/messages/es.mo
%lang(fi) %{_datadir}/%{name}/messages/fi.mo
%lang(fr) %{_datadir}/%{name}/messages/fr.mo
%lang(he) %{_datadir}/%{name}/messages/he.mo
%lang(hu) %{_datadir}/%{name}/messages/hu.mo
%lang(id) %{_datadir}/%{name}/messages/id.mo
%lang(it) %{_datadir}/%{name}/messages/it.mo
%lang(nb) %{_datadir}/%{name}/messages/nb.mo
%lang(nl) %{_datadir}/%{name}/messages/nl.mo
%lang(pl) %{_datadir}/%{name}/messages/pl.mo
%lang(pt) %{_datadir}/%{name}/messages/pt.mo
%lang(pt_BR) %{_datadir}/%{name}/messages/pt_BR.mo
%lang(ru) %{_datadir}/%{name}/messages/ru.mo
%lang(sk) %{_datadir}/%{name}/messages/sk.mo
%lang(dl) %{_datadir}/%{name}/messages/sl.mo
%lang(sr) %{_datadir}/%{name}/messages/sr.mo
%lang(sv) %{_datadir}/%{name}/messages/sv.mo
%lang(tl) %{_datadir}/%{name}/messages/tl.mo
%lang(zh_CN) %{_datadir}/%{name}/messages/zh_CN.mo
%lang(ast) %{_datadir}/%{name}/messages/ast.mo
%lang(bs) %{_datadir}/%{name}/messages/bs.mo
%lang(ja) %{_datadir}/%{name}/messages/ja.mo
%lang(ur) %{_datadir}/%{name}/messages/ur.mo

%changelog