From 92601f183a41e4e13a66df382b0bbe4fd872c2a7 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 10 Mar 2024 10:58:58 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20install=20duplicate=20README.md?= =?UTF-8?q?=20and=20LICENSE.txt=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c4project.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/c4project.spec b/c4project.spec index a381219..4679c0a 100644 --- a/c4project.spec +++ b/c4project.spec @@ -41,7 +41,11 @@ rm -rvf 'bm-xp' %install install -d '%{buildroot}%{_datadir}/cmake/c4project' -cp -vrp * '%{buildroot}%{_datadir}/cmake/c4project' +# We install a copy of the repository, but we don’t want to include dotfiles or +# duplicate the README and LICENSE files. +find . -mindepth 1 -maxdepth 1 ! -name '.*' \( -type d -o \ + -type f ! -name 'README.md' ! -name 'LICENSE.txt' \) \ + -execdir cp -vrp '{}' '%{buildroot}%{_datadir}/cmake/c4project' ';' %check