Template
Add default sources
Fix setup Use macros for commands Fix another $ escape
This commit is contained in:
@@ -8,7 +8,13 @@ Release: %autorelease
|
||||
License: GPLv3
|
||||
URL: ${REPO_HTTPS_URL}
|
||||
Summary: SELinux policy for ${REPO_NAME}
|
||||
Source0: # archive with SELinux policy sources. e.g: myapp-selinux.tar
|
||||
Source0: %{modulename}.fc
|
||||
Source1: %{modulename}.if
|
||||
Source2: %{modulename}.te
|
||||
Source3: makefile
|
||||
Source4: LICENSE
|
||||
Source5: README.md
|
||||
|
||||
Requires: selinux-policy-%{selinuxtype}
|
||||
Requires(post): selinux-policy-%{selinuxtype}
|
||||
BuildRequires: selinux-policy-devel
|
||||
@@ -18,15 +24,16 @@ BuildArch: noarch
|
||||
Custom SELinux policy modules for ${REPO_NAME}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -c -T
|
||||
%{__cp} %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
|
||||
|
||||
%build
|
||||
make
|
||||
|
||||
%install
|
||||
# install policy modules
|
||||
install -D -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
|
||||
install -D -p -m 0644 selinux/%{modulename}.if %{buildroot}%{_datadir}/selinux/devel/include/distributed/%{modulename}.if
|
||||
%{__install} -D -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
|
||||
%{__install} -D -p -m 0644 selinux/%{modulename}.if %{buildroot}%{_datadir}/selinux/devel/include/distributed/%{modulename}.if
|
||||
%check
|
||||
|
||||
%pre
|
||||
@@ -36,7 +43,7 @@ install -D -p -m 0644 selinux/%{modulename}.if %{buildroot}%{_datadir}/selinux/d
|
||||
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ]; then
|
||||
if [ $$1 -eq 0 ]; then
|
||||
%selinux_modules_uninstall -s %{selinuxtype} %{modulename}
|
||||
fi
|
||||
|
||||
@@ -48,6 +55,7 @@ fi
|
||||
%{_datadir}/selinux/devel/include/distributed/%{modulename}.if
|
||||
%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename}
|
||||
%license LICENCE
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
Reference in New Issue
Block a user