#!/bin/sh

cd $1 || exit 1

for i in */*.spec
do
    name=${i%%/*}

    awk '
	/%files.*devel/ {
		devel = 1
		next
	}
	{
	    if (!devel)  next

	    if ($0 ~ "\\.a[ 	]*$")  yes = 1
	}
	END {
	    if (devel) {
		if (yes)  print "'$name'	YES"
		else  print "'$name'	NO"
	    }
	}
    ' $i
done
