mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
makepkg: abstract license check into separate function
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
be038f9cb2
commit
225ee71cae
@ -1109,6 +1109,15 @@ find_libprovides() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_license() {
|
||||||
|
# TODO maybe remove this at some point
|
||||||
|
# warn if license array is not present or empty
|
||||||
|
if [[ -z $license ]]; then
|
||||||
|
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
|
||||||
|
plain "$(gettext "Example for GPL\'ed software: %s.")" "license=('GPL')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
write_pkginfo() {
|
write_pkginfo() {
|
||||||
local builddate=$(date -u "+%s")
|
local builddate=$(date -u "+%s")
|
||||||
if [[ -n $PACKAGER ]]; then
|
if [[ -n $PACKAGER ]]; then
|
||||||
@ -1186,12 +1195,7 @@ write_pkginfo() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# TODO maybe remove this at some point
|
check_license
|
||||||
# warn if license array is not present or empty
|
|
||||||
if [[ -z $license ]]; then
|
|
||||||
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
|
|
||||||
plain "$(gettext "Example for GPL\'ed software: %s.")" "license=('GPL')"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_package() {
|
check_package() {
|
||||||
|
Loading…
Reference in New Issue
Block a user