Refresh the target repos when installed. They shouldn't change after that.
Add an explicit target refresh repos later

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Uset $target consistently

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Simplify unpacking file logic

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Correct target name validation

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
use ${1:-} to avoid errors with unset $1

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Add --target --refresh <target>

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Add verbosity and chown mersdk group too

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Assign used paths to variables

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
Let tar choose the uncompressor itself

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
Handles empty target name more gracefully.

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
Use auto-refresh on repositories

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Don't assume that there is -n in %setup line.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
Update rule_file_interface_version to 105
Looking at upstream, no changes were made in the devel fs_rules.lua

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
mb: Add multiple job support.

A lot of packaging uses %jobs as an argument to make (thanks to spectacle), but
seemingly this isn't automagically set up, so we need to do it ourselves.

This makes builds actually use many cores, and go a lot faster as a result.

This can be specified by the user (-j <jobs>), or else the number of processors
is used as a default.
mb: fix mb build --help
mb: style fixup

$() is preferred over backticks.
Use [[ ]] and clearer tests

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
rpm/ can be overridden by setting PKGDIR but defaults to rpm/

Signed-off-by: David Greaves <david@dgreaves.com>
Stop processing forwards and give error if invalid spec file path is given.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
Check that Source0 line exists and give error if it doesn't.
Also accept source lines with Source: instead of Source0:.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>