Use a complete lowercase name for the package
So it's streamlined with debian
This commit is contained in:
parent
4a1f323817
commit
462cf843bd
|
@ -22,7 +22,7 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
: ${PROJECT:=L10n}
|
||||
: ${PROJECT:=l10n}
|
||||
: ${UPSTREAM_GIT_URL:=https://github.com/Icinga/$PROJECT.git}
|
||||
: ${UPSTREAM_GIT_BRANCH:=master}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Icinga L10n | (c) 2020 Icinga GmbH
|
||||
|
||||
%define revision 1
|
||||
%define basedir %{_datadir}/%{name}
|
||||
%define basedir %{_datadir}/icinga-L10n
|
||||
|
||||
%if 0%{?el5}%{?el6}%{?amzn}%{?suse_version}
|
||||
%define use_selinux 0
|
||||
|
@ -11,7 +11,7 @@
|
|||
%endif
|
||||
|
||||
|
||||
Name: icinga-L10n
|
||||
Name: icinga-l10n
|
||||
Version: 1.0.0
|
||||
Release: %{revision}%{?dist}
|
||||
Summary: Icinga L10n
|
||||
|
@ -24,7 +24,7 @@ Packager: Icinga GmbH <info@icinga.com>
|
|||
|
||||
|
||||
%prep
|
||||
%setup -q -n L10n-0671a2a
|
||||
%setup -q -n l10n-49313bb
|
||||
cp -r %{_topdir}/../selinux selinux
|
||||
|
||||
%build
|
||||
|
@ -33,7 +33,7 @@ cd selinux
|
|||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
||||
mv icinga-L10n.pp icinga-L10n.pp.${selinuxvariant}
|
||||
mv icinga-l10n.pp icinga-l10n.pp.${selinuxvariant}
|
||||
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
||||
done
|
||||
cd -
|
||||
|
@ -41,6 +41,7 @@ cd -
|
|||
|
||||
%install
|
||||
mkdir -p %{buildroot}/%{basedir}
|
||||
cp *.md %{buildroot}/%{basedir}
|
||||
cp COPYING %{buildroot}/%{basedir}
|
||||
cp -prv locale %{buildroot}/%{basedir}
|
||||
find %{buildroot}/%{basedir}/locale -name *.po -delete
|
||||
|
@ -49,7 +50,7 @@ cd selinux
|
|||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
||||
install -p -m 644 icinga-L10n.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/icinga-L10n.pp
|
||||
install -p -m 644 icinga-l10n.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/icinga-l10n.pp
|
||||
done
|
||||
cd -
|
||||
%endif
|
||||
|
@ -83,7 +84,7 @@ SELinux policy for Icinga L10n
|
|||
%post selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
%{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/icinga-L10n.pp &> /dev/null || :
|
||||
%{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/icinga-l10n.pp &> /dev/null || :
|
||||
done
|
||||
%{_sbindir}/restorecon -R %{basedir} &> /dev/null || :
|
||||
|
||||
|
@ -91,7 +92,7 @@ done
|
|||
if [ $1 -eq 0 ] ; then
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
%{_sbindir}/semodule -s ${selinuxvariant} -r icinga-L10n &> /dev/null || :
|
||||
%{_sbindir}/semodule -s ${selinuxvariant} -r icinga-l10n &> /dev/null || :
|
||||
done
|
||||
[ -d %{basedir} ] && %{_sbindir}/restorecon -R %{basedir} &> /dev/null || :
|
||||
fi
|
||||
|
@ -99,7 +100,7 @@ fi
|
|||
%files selinux
|
||||
%defattr(-,root,root,0755)
|
||||
%doc selinux/*
|
||||
%{_datadir}/selinux/*/icinga-L10n.pp
|
||||
%{_datadir}/selinux/*/icinga-l10n.pp
|
||||
|
||||
%endif
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
policy_module(icinga-L10n, 1.0)
|
||||
policy_module(icinga-l10n, 1.0)
|
||||
|
||||
require {
|
||||
type httpd_t;
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
set -x
|
||||
|
||||
PACKAGES=( icinga-L10n )
|
||||
PACKAGES=( icinga-l10n )
|
||||
|
||||
if compgen -G "${WORKDIR}/${BUILDDIR}/RPMS/noarch/icinga-L10n-selinux*" > /dev/null; then
|
||||
PACKAGES+=( icinga-L10n-selinux )
|
||||
if compgen -G "${WORKDIR}/${BUILDDIR}/RPMS/noarch/icinga-l10n-selinux*" > /dev/null; then
|
||||
PACKAGES+=( icinga-l10n-selinux )
|
||||
fi
|
||||
|
||||
icinga-build-rpm-install "${PACKAGES[@]}"
|
||||
|
|
Loading…
Reference in New Issue