Commit 7037948b authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

Add simple function to sign packages

Set SIGNPKG to y in makepkg.conf to enable signing.
parent 0e6780f2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -130,9 +130,16 @@ for _arch in ${arch[@]}; do
		fi
		uploads+=("$pkgfile")

		if [[ $SIGNPKG == 'y' ]]; then
			echo "Signing package ${pkgfile}..."
			gpg --detach-sign --use-agent -u "${PACKAGER}" "${pkgfile}" || abort
		fi

		sigfile="${pkgfile}.sig"
		if [ -f "${sigfile}" ]; then
			uploads+=("$sigfile")
		elif [[ $SIGNPKG == 'y' ]]; then
			abort "Signature ${pkgfile}.sig was not found"
		fi
	done
	archrelease $repo-${_arch} || abort