makechrootpkg: Set the C locale system wide

makepkg sources /etc/profile before calling build(). This will change the
locale from C to en_US.UTF8.
commitpkg: Sync changelog/install check with makepkg(8)

makepkg(8) currently uses a smarter method to extract all changelog and
install files from a PKGBUILD. Sync commitpkg to use the same code (with
small modifications). This also adds support for changelog/install files
that contain a whitespace.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
makechrootpkg: Make host pubring.gpg available to check signed sources
temporary workaround until pacman 4.0 moves to [core]

Pacman 3 refuses to work with the pacman 4 SigLevel config entry

Also related: https://bugs.archlinux.org/task/26555
prepare release
makechrootpkg: Do not export LANG

This is done by /etc/profile.d/locale.sh. By this we also ensure compatibility with systemd.
makechrootpkg: Handle install and changelog file the same way as in commitpkg
commitpkg: Skip signing if signature already exists
commitpkg: Check signature if available
commitpkg: Require signatures for packages
Create signature for devtools source package
add libdepends script

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Move common functions to a shared file

* common.sh is included on build time
* most functions are copied from makepkg
Change version to date
Capitalize output messages

Some of the output/error messages were capitalized, some were
not. This patch capitalize everything for consistency sake. Other
minor changes were done to the messages like removing the superfluous
"error:" from die messages and adding a final period to messages that
were complete sentences as appropriate.

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
lib/common.sh: Use double brackets

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
lib/common.sh: Revise setup_workdir()

* Honor TMPDIR variable (just like we did in commit a0c6bf45).
* Quote path properly.
* Avoid unnecessary use of basename(1).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Makefile: Add common library to build dependencies

Add "lib/common.sh" to the build dependencies of our scripts to ensure
everything gets rebuilt when we modify a common function. Also, add
"Makefile" itself to enforce a rebuild if the edit command changes.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
commitpkg: Make svn quieter

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
commitpkg: Fix commit message

Move the message template before the if block. We moved this to the else
branch in commit aaa68e49e8e5a68950a63b9aa4a8c1f6aed2e2d2 which lead to
"msgtemplate" being unset if one specifies a commit message on the
command line, thus stripping the "upgpkg:" part.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>