I just want to make sure that simple things are simple, like:
#!/bin/sh
# @Group: Java
# @Deprecates: CheckNoArch
# @Description: Package has BuildArch: noarch (if possible)
egrep -q -i '^ *BuildArch: *noarch *$' srpm-unpacked/$name.spec
(Note the use of $name
Or:
#!/bin/sh
# @Deprecates: CheckLargeDocs
# @Strict
# @URL:
http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation
# @Description: Large documentation files must go in a -doc subpackage.
min=10000
max=1000000
docsize=$(for rpm in ./rpms/*; do (cd ./$rpm; test -d ./usr/share/doc && tar c
./usr/share/doc); done | wc -c)
echo Documentation size is $docsize bytes.
test $docsize -lt $min && exit 0
test $docsize -gt $max && exit 2
exit 1
That tests are very simple and yet make my life easier. Using JSON for this
is definitely an overkill and contradicts the "should be easy to learn" goal.