]> TLD Linux GIT Repositories - packages/munin-plugins-contrib.git/commitdiff
- package subdirs too
authorMarcin Krol <hawk@tld-linux.org>
Mon, 9 Nov 2015 11:01:11 +0000 (11:01 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 9 Nov 2015 11:01:11 +0000 (11:01 +0000)
munin-plugins-contrib.spec

index 86f6efbc14095ef881d4ceb4c662141cb52a2e0b..23924a7f165fe6dbd63b75a6bf78772e8de962c9 100644 (file)
@@ -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