generalize %setup parsing to support more %setup options