ubuilder: support for embedded files.

master
Pierre Neidhardt 2013-09-10 18:51:47 +02:00
parent 6575917523
commit 22a63ac2b9
1 changed files with 18 additions and 12 deletions

View File

@ -64,11 +64,11 @@ _init()
_listdeps() _listdeps()
{ {
msg "$pkgname $pkgver-$pkgrel" msg "$pkgname $pkgver-$pkgrel"
msg "Runtime dependencies" msg2 "Runtime dependencies"
printf -- '%s\n' "${depends[@]}" printf -- '%s\n' "${depends[@]}"
msg "Buildtime dependencies" msg2 "Buildtime dependencies"
printf -- '%s\n' "${makedepends[@]}" printf -- '%s\n' "${makedepends[@]}"
msg "Optional dependencies" msg2 "Optional dependencies"
printf -- '%s\n' "${optdepends[@]}" printf -- '%s\n' "${optdepends[@]}"
} }
@ -94,15 +94,16 @@ _fetch()
;; ;;
git+*) git+*)
GITURI="${URI#git+}" GITURI="${URI#git+}"
if [ -d "$_gitname/.git" ]; then if [ -d "${_gitname:-$FILE}/.git" ]; then
cd "$_gitname" cd "${_gitname:-$FILE}"
git pull git pull
else else
git clone "$GITURI" git clone "$GITURI"
fi fi
;; ;;
*) *)
error "Unkown protocol" ## Embedded files (patches, resources...)
# Do nothing.
esac esac
done done
} }
@ -191,7 +192,9 @@ _extract ()
*) *)
case "$URI" in case "$URI" in
git+*) git+*)
ln -sf "../$_gitname" "$srcdir";; ln -sf "../${_gitname:-$FILE}" "$srcdir";;
*)
ln -sf "../$FILE" "$srcdir";;
esac esac
esac esac
done done
@ -224,7 +227,7 @@ _tidying ()
fi fi
if $TIDY_strip; then if $TIDY_strip; then
msg2 "Stripping unneeded symbols from binaries and libraries..." msg2 "Stripping unneeded symbols from binaries and libraries..."
find * -type f -executable -exec strip -s {} \; find * -type f -executable -exec strip -s {} \; 2>/dev/null
fi fi
## We make sure folder permissions are world accessible. ## We make sure folder permissions are world accessible.
@ -347,8 +350,11 @@ while getopts ":bcdfhiRs" opt; do
_printhelp "$0" _printhelp "$0"
exit 1 ;; exit 1 ;;
i) i)
OPT_BUILD=true
OPT_PACKAGE=true
OPT_INSTALL=true ;; OPT_INSTALL=true ;;
R) R)
OPT_BUILD=true
OPT_PACKAGE=true ;; OPT_PACKAGE=true ;;
s) s)
OPT_CHECKSKIP=true ;; OPT_CHECKSKIP=true ;;
@ -370,9 +376,9 @@ _fetch
_extract _extract
_checksum _checksum
if $OPT_BUILD; then _buildhook; fi $OPT_BUILD && _buildhook
if $OPT_PACKAGE; then _packagehook; fi $OPT_PACKAGE && _packagehook
if $OPT_INSTALL; then _install; fi $OPT_INSTALL && _install
if $OPT_CLEAN; then _clean; fi $OPT_CLEAN && _clean
msg "Finished making: $pkgname ${pkgver}-$pkgrel ($(date))" msg "Finished making: $pkgname ${pkgver}-$pkgrel ($(date))"