Merge changes from topic "reenable-lintian"

* changes:
  setup: Add a helper function to lint a package directly
  build: Re-enable lintian checks
diff --git a/packages.mk b/packages.mk
index 0c84968..2682e6c 100644
--- a/packages.mk
+++ b/packages.mk
@@ -113,7 +113,7 @@
 	$(LOG) $1 pbuilder pdebuild
 	cd $(PRODUCT_OUT)/obj/$1; pdebuild \
 		--buildresult $(PRODUCT_OUT)/packages/$(if $6,$6,core) -- \
-		--debbuildopts "--build=$(if $5,$5,full) -sa --check-command=true --check-option=--fail-on-warnings --check-option=--profile=mendel" \
+		--debbuildopts "--build=$(if $5,$5,full) -sa --check-command=lintian --check-option=--fail-on-warnings --check-option=--profile=mendel" \
 		--basetgz $(ROOTDIR)/cache/$(if $7,$7,cross)-base.tgz \
 		--configfile $(ROOTDIR)/build/pbuilderrc \
 		--hookdir $(ROOTDIR)/build/pbuilder-hooks \
diff --git a/setup.sh b/setup.sh
index ef265cf..65df7fa 100755
--- a/setup.sh
+++ b/setup.sh
@@ -90,6 +90,27 @@
     popd >/dev/null
 }
 
+function lint-package
+{
+    local packagename="${1}"; shift
+
+    if [[ -z "$packagename" ]]; then
+        echo "Usage: lint-package <packagename>"
+        return 1
+    fi
+
+    pushd "${ROOTDIR}/packages/$packagename" >/dev/null
+    dpkg-buildpackage -tc -us -ui -uc
+
+    echo; echo ===== lintian run below =====
+    lintian --include-dir=$ROOTDIR/build/lintian --fail-on-warnings --profile=mendel
+    local exitcode=$?
+
+    popd >/dev/null
+
+    return $?
+}
+
 function safe-abandon
 {
     local branch="${1}"; shift