mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-03-11 06:37:31 +00:00
newapkbuild: support for creating sourceforge source urls
This commit is contained in:
parent
149521f2dc
commit
f20d7983ae
@ -52,6 +52,10 @@ newaport() {
|
||||
mkdir -p "$pn"
|
||||
cd "$pn"
|
||||
|
||||
if [ -z "$source" ] && [ -n "$sourceforge" ]; then
|
||||
source="http://downloads.sourceforge.net/$pn/$pn-$pv.tar.gz"
|
||||
fi
|
||||
|
||||
# replace pkgver in $source
|
||||
if [ -n "$source" ]; then
|
||||
source=$(echo "$source" | sed "s/$pv/\$pkgver/g")
|
||||
@ -167,11 +171,12 @@ usage() {
|
||||
echo " -h Show this help"
|
||||
echo " -l Set package license to LICENSE"
|
||||
echo " -u Set package URL"
|
||||
echo " -s Use sourceforge source url"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
||||
while getopts "cd:fhl:u:" opt; do
|
||||
while getopts "cd:fhl:u:s" opt; do
|
||||
case $opt in
|
||||
'c') cpinitd=1;;
|
||||
'd') pkgdesc="$OPTARG";;
|
||||
@ -179,6 +184,7 @@ while getopts "cd:fhl:u:" opt; do
|
||||
'h') usage;;
|
||||
'l') license="$OPTARG";;
|
||||
'u') url="$OPTARG";;
|
||||
's') sourceforge=1;;
|
||||
esac
|
||||
done
|
||||
shift $(( $OPTIND - 1 ))
|
||||
|
Loading…
Reference in New Issue
Block a user