# # spec file for package ufw # # Copyright (c) 2012 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/%{name} Source0: %{name}-%{version}.tar.bz2 Source1: ufw-init Source2: ufw.service BuildArch: noarch BuildRequires: iptables BuildRequires: python-base >= 2.7 BuildRequires: python-devel BuildRequires: systemd #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. %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 rm -rf %{buildroot} python setup.py install --prefix=/usr \ --root %{buildroot} mkdir -p $RPM_BUILD_ROOT/etc/init.d/ install -m 755 $RPM_SOURCE_DIR/ufw-init $RPM_BUILD_ROOT/etc/init.d/ufw ln -s /etc/init.d/ufw $RPM_BUILD_ROOT/usr/sbin/rcufw ln -s /usr/share/man/man8/ufw.8.gz $RPM_BUILD_ROOT/usr/share/man/man8/rcufw.8.gz mkdir -p $RPM_BUILD_ROOT/usr/bin/ ln -s /usr/sbin/ufw $RPM_BUILD_ROOT/usr/bin/ufw mkdir -p $RPM_BUILD_ROOT/lib/systemd/ mkdir -p $RPM_BUILD_ROOT/lib/systemd/system install -m 644 $RPM_SOURCE_DIR/ufw.service $RPM_BUILD_ROOT/lib/systemd/system/ufw.service #mkdir -p $RPM_BUILD_ROOT/etc/systemd/ #mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/ #mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants #ln -s /lib/systemd/system/ufw.service $RPM_BUILD_ROOT/etc/systemd/system/multi-user.target.wants/ufw.service %pre %if 0%{?suse_version} > 1140 %service_add_pre ufw.service %endif %post insserv /etc/init.d/ufw %if 0%{?suse_version} > 1140 %service_add_post ufw.service %endif %preun %stop_on_removal ufw %if 0%{?suse_version} > 1140 %service_del_preun ufw.service %endif %postun %insserv_cleanup /etc/init.d/ufw %restart_on_update %if 0%{?suse_version} > 1140 %service_del_postun ufw.service %endif %files %defattr(-,root,root) /lib/ufw/ufw-init /lib/ufw/ufw-init-functions /lib/ufw/user.rules /lib/ufw/user6.rules /usr/lib/python%python_version/site-packages/ufw-%{version}-py%python_version.egg-info /usr/sbin/ufw /usr/sbin/rcufw /usr/bin/ufw /usr/share/man/man8/ufw-framework.8.gz /usr/share/man/man8/ufw.8.gz /usr/share/man/man8/rcufw.8.gz %config/etc/init.d/ufw %config/etc/ufw %config/etc/ufw/applications.d %config/etc/default/ufw /lib/systemd/system/ufw.service /lib/ufw /usr/lib/python%python_version/site-packages/ufw /usr/share/ufw /usr/share/ufw/iptables %lang(zh_TW) /usr/share/ufw/messages/zh_TW.mo %lang(ar) /usr/share/ufw/messages/ar.mo %lang(bg) /usr/share/ufw/messages/bg.mo %lang(ca) /usr/share/ufw/messages/ca.mo %lang(cs) /usr/share/ufw/messages/cs.mo %lang(da) /usr/share/ufw/messages/da.mo %lang(de) /usr/share/ufw/messages/de.mo %lang(el) /usr/share/ufw/messages/el.mo %lang(en_AU) /usr/share/ufw/messages/en_AU.mo %lang(en_GB) /usr/share/ufw/messages/en_GB.mo %lang(es) /usr/share/ufw/messages/es.mo %lang(fi) /usr/share/ufw/messages/fi.mo %lang(fr) /usr/share/ufw/messages/fr.mo %lang(he) /usr/share/ufw/messages/he.mo %lang(hu) /usr/share/ufw/messages/hu.mo %lang(id) /usr/share/ufw/messages/id.mo %lang(it) /usr/share/ufw/messages/it.mo %lang(nb) /usr/share/ufw/messages/nb.mo %lang(nl) /usr/share/ufw/messages/nl.mo %lang(pl) /usr/share/ufw/messages/pl.mo %lang(pt) /usr/share/ufw/messages/pt.mo %lang(pt_BR) /usr/share/ufw/messages/pt_BR.mo %lang(ru) /usr/share/ufw/messages/ru.mo %lang(sk) /usr/share/ufw/messages/sk.mo %lang(dl) /usr/share/ufw/messages/sl.mo %lang(sr) /usr/share/ufw/messages/sr.mo %lang(sv) /usr/share/ufw/messages/sv.mo %lang(tl) /usr/share/ufw/messages/tl.mo %lang(zh_CN) /usr/share/ufw/messages/zh_CN.mo %lang(ast) /usr/share/ufw/messages/ast.mo %lang(bs) /usr/share/ufw/messages/bs.mo %lang(ja) /usr/share/ufw/messages/ja.mo %lang(ur) /usr/share/ufw/messages/ur.mo %changelog