]> git.pld-linux.org Git - packages/apparmor-utils.git/blobdiff - apparmor-utils.spec
- updated to 2.13
[packages/apparmor-utils.git] / apparmor-utils.spec
index 0f3a142e24c7050741609d75e23589466686272a..bcd6a30f3f5a16f808b3852167eedf0d3887ce63 100644 (file)
@@ -1,26 +1,36 @@
-%include       /usr/lib/rpm/macros.perl
-%define                _vimdatadir     %{_datadir}/vim/vimfiles
-%define                _ver 2.0
-%define                _svnrel 142
+#
+# Conditional build:
+%bcond_with    python3 # use Python 3 instead of Python 2
+
 Summary:       AppArmor userlevel utilities that are useful in creating AppArmor profiles
-Summary(pl.UTF-8):   Narzędzia przestrzeni użytkownika przydatne do tworzenia profili AppArmor
+Summary(pl.UTF-8):     Narzędzia przestrzeni użytkownika przydatne do tworzenia profili AppArmor
 Name:          apparmor-utils
-Version:       %{_ver}.%{_svnrel}
-Release:       0.2
+Version:       2.13
+Release:       1
+Epoch:         1
+License:       GPL v2
 Group:         Base
-Source0:       http://forgeftp.novell.com/apparmor/Development%20-%20October%20Snapshot/%{name}-%{_ver}-%{_svnrel}.tar.gz
-# Source0-md5: b2447c84edc2df843b7bc4baa8a1eb2c
-Source1:       Ycp.pm
-Patch0:                %{name}-pld.patch
-License:       GPL
-URL:           http://forge.novell.com/modules/xfmod/project/?apparmor
-BuildRequires: gettext-devel
-BuildRequires: rpm-perlprov
+Source0:       http://launchpad.net/apparmor/2.13/%{version}.0/+download/apparmor-%{version}.tar.gz
+# Source0-md5: c6caefb0a558492082226c467f6954cb
+Patch0:                %{name}-pysetup.patch
+URL:           http://wiki.apparmor.net/
+BuildRequires: gettext-tools
+%if %{with python3}
+BuildRequires: python3
+Requires:      python3-LibAppArmor
+%else
+BuildRequires: python
+Requires:      python-LibAppArmor
+%endif
+Requires:      apparmor-binutils >= %{version}
+Requires:      perl-LibAppArmor
 Provides:      subdomain-utils
 Obsoletes:     subdomain-utils
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _vimdatadir     %{_datadir}/vim/vimfiles
+
 %description
 This provides some useful programs to help create and manage AppArmor
 profiles. This package is part of a suite of tools that used to be
@@ -33,9 +43,10 @@ zestawu narzędzi zwanych SubDomain.
 
 %package -n vim-syntax-apparmor
 Summary:       AppArmor files support for Vim
-Summary(pl.UTF-8):   Obsługa plików AppArmor dla Vima
+Summary(pl.UTF-8):     Obsługa plików AppArmor dla Vima
 Group:         Applications/Editors/Vim
-Requires:      vim >= 4:6.3.058-3
+# for _vimdatadir existence
+Requires:      vim-rt >= 4:6.3.058-3
 
 %description -n vim-syntax-apparmor
 AppArmor files support for Vim.
@@ -44,39 +55,99 @@ AppArmor files support for Vim.
 Obsługa plików AppArmor dla Vima.
 
 %prep
-%setup -q -n %{name}-%{_ver}
+%setup -q -n apparmor-%{version}
 %patch0 -p1
 
+%if %{with python3}
+%{__sed} -i -e '1s, */usr/bin/env python,%{__python3},' utils/aa-*
+%else
+%{__sed} -i -e '1s, */usr/bin/env python,%{__python},' utils/aa-*
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+
+%{__make} -C utils install \
+%if %{with python3}
+       PYTHON="%{__python3}" \
+       PYSETUP_INSTALL_ARGS="--install-purelib=%{py3_sitescriptdir} --optimize=2" \
+%else
+       PYTHON="%{__python}" \
+       PYSETUP_INSTALL_ARGS="--install-purelib=%{py_sitescriptdir} --optimize=2" \
+%endif
        DESTDIR=$RPM_BUILD_ROOT \
        BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
-       PERLDIR=$RPM_BUILD_ROOT%{perl_vendorlib}/Immunix
-
-%find_lang %{name}
-
-install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
-install apparmor.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax
-install %{SOURCE1} $RPM_BUILD_ROOT%{perl_vendorlib}/Immunix
+       VIM_INSTALL_PATH=$RPM_BUILD_ROOT%{_vimdatadir}/syntax
 
+install -d $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect
 cat > $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/apparmor.vim <<-EOF
 au BufNewFile,BufRead /etc/apparmor.d/*,/etc/apparmor/profiles/* set filetype=apparmor
 EOF
 
+%if %{without python3}
+%py_postclean
+%endif
+
+%find_lang %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/apparmor
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/*
-%attr(755,root,root) %{_sbindir}/*
-%dir %{perl_vendorlib}/Immunix
-%{perl_vendorlib}/Immunix/*
-%dir /var/log/apparmor
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/easyprof.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/logprof.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/notify.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apparmor/severity.db
+%attr(755,root,root) %{_bindir}/aa-easyprof
+%attr(755,root,root) %{_sbindir}/aa-audit
+%attr(755,root,root) %{_sbindir}/aa-autodep
+%attr(755,root,root) %{_sbindir}/aa-cleanprof
+%attr(755,root,root) %{_sbindir}/aa-complain
+%attr(755,root,root) %{_sbindir}/aa-decode
+%attr(755,root,root) %{_sbindir}/aa-disable
+%attr(755,root,root) %{_sbindir}/aa-enforce
+%attr(755,root,root) %{_sbindir}/aa-genprof
+%attr(755,root,root) %{_sbindir}/aa-logprof
+%attr(755,root,root) %{_sbindir}/aa-mergeprof
+%attr(755,root,root) %{_sbindir}/aa-notify
+%attr(755,root,root) %{_sbindir}/aa-remove-unknown
+%attr(755,root,root) %{_sbindir}/aa-status
+%attr(755,root,root) %{_sbindir}/aa-unconfined
+%attr(755,root,root) %{_sbindir}/apparmor_status
+%dir %{_datadir}/apparmor
+%{_datadir}/apparmor/easyprof
+%if %{with python3}
+%{py3_sitescriptdir}/apparmor
+%{py3_sitescriptdir}/apparmor-%{version}-py*.egg-info
+%else
+%dir %{py_sitescriptdir}/apparmor
+%{py_sitescriptdir}/apparmor/*.py[co]
+%dir %{py_sitescriptdir}/apparmor/rule
+%{py_sitescriptdir}/apparmor/rule/*.py[co]
+%{py_sitescriptdir}/apparmor-%{version}-py*.egg-info
+%endif
+%{_mandir}/man5/logprof.conf.5*
+%{_mandir}/man8/aa-audit.8*
+%{_mandir}/man8/aa-autodep.8*
+%{_mandir}/man8/aa-cleanprof.8*
+%{_mandir}/man8/aa-complain.8*
+%{_mandir}/man8/aa-decode.8*
+%{_mandir}/man8/aa-disable.8*
+%{_mandir}/man8/aa-easyprof.8*
+%{_mandir}/man8/aa-enforce.8*
+%{_mandir}/man8/aa-genprof.8*
+%{_mandir}/man8/aa-logprof.8*
+%{_mandir}/man8/aa-mergeprof.8*
+%{_mandir}/man8/aa-notify.8*
+%{_mandir}/man8/aa-remove-unknown.8*
+%{_mandir}/man8/aa-status.8*
+%{_mandir}/man8/aa-unconfined.8*
+%{_mandir}/man8/apparmor_status.8*
 
 %files -n vim-syntax-apparmor
 %defattr(644,root,root,755)
-%{_vimdatadir}/ftdetect/*
-%{_vimdatadir}/syntax/*
+%{_vimdatadir}/ftdetect/apparmor.vim
+%{_vimdatadir}/syntax/apparmor.vim
+%{_mandir}/man5/apparmor.vim.5*
This page took 0.084633 seconds and 4 git commands to generate.