From 363b7ece1e6995e6110609b29a8923d0e22afabb Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 9 Nov 2015 11:01:11 +0000 Subject: [PATCH] - package subdirs too --- munin-plugins-contrib.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/munin-plugins-contrib.spec b/munin-plugins-contrib.spec index 86f6efb..23924a7 100644 --- a/munin-plugins-contrib.spec +++ b/munin-plugins-contrib.spec @@ -3,7 +3,7 @@ Summary: 3rd-party Munin plugins Summary(pl.UTF-8): Nieoficjalne wtyczki munina Name: munin-plugins-contrib Version: 20151106 -Release: 1 +Release: 2 License: GPL Group: Daemons Source0: https://github.com/munin-monitoring/contrib/tarball/master/%{name}-%{version}.tar.gz @@ -101,8 +101,14 @@ for i in plugins/*; do find $i/* -type f | while read f ; do echo $f | grep -q -E "(example|png|.gitignore)" && continue n=$(echo $f | sed -e 's!'$i'/!!') + d=$(dirname $n) + if [ "$d" != "%{_datadir}/munin/plugins" ]; then + if ! test -d $RPM_BUILD_ROOT%{_datadir}/munin/plugins/$d; then + echo "%dir %{_datadir}/munin/plugins/$d" >>$j.list + install -d $RPM_BUILD_ROOT%{_datadir}/munin/plugins/$d + fi + fi echo "%{_datadir}/munin/plugins/$n" >>$j.list - install -d $RPM_BUILD_ROOT%{_datadir}/munin/plugins/$(dirname $n) install -p $f $RPM_BUILD_ROOT%{_datadir}/munin/plugins/$n done done -- 2.46.0