Use install instead of mkdir and cp

Also remove redundant cp invocations.

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
This commit is contained in:
Ondrej Mosnáček 2023-09-05 13:32:34 +02:00
parent f75aa9d221
commit 089f936bfa
No known key found for this signature in database
GPG Key ID: BDE08B7A0C57B343

View File

@ -65,12 +65,12 @@ package to grow the root partition on first boot.
%install
# Create the target directories
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_mandir}/man1
# Install binaries and manpages
cp bin/* %{buildroot}%{_bindir}/
cp man/* %{buildroot}%{_mandir}/man1/
install -pm 0755 bin/* %{buildroot}%{_bindir}/
install -pm 0644 man/* %{buildroot}%{_mandir}/man1/
# Exclude Ubuntu-specific tools
rm %{buildroot}%{_bindir}/*ubuntu*
@ -82,10 +82,6 @@ rm -f %{buildroot}%{_mandir}/man1/cloud-run-instances.*
rm -f %{buildroot}%{_bindir}/cloud-publish-*
rm -f %{buildroot}%{_mandir}/man1/cloud-publish-*
# Install the growpart binary and man page
cp bin/growpart %{buildroot}%{_bindir}/
cp man/growpart.* %{buildroot}%{_mandir}/man1/
# Files for the main package
%files