diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/fullpkg/fullpkg-build | 4 | ||||
-rw-r--r-- | src/libretools.conf | 4 | ||||
-rwxr-xr-x | src/mips64el-tools/mipsrelease | 72 |
3 files changed, 37 insertions, 43 deletions
diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index e52bff1..cbaea91 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -67,11 +67,9 @@ succesfull_build() { if source .INFO && [ -n "$repo" ]; then if [ ! -z "$HOOKLOCALRELEASE" ]; then - find -name "*.pkg.tar.?z" -print0 | xargs -0 "$HOOKLOCALRELEASE" "$repo" + "$HOOKLOCALRELEASE" "$repo" fi - librestage $repo || echo "unstaged:$(basename $PWD)" >>$build_dir/log - msg "Updating pacman db and packages" sudo pacman -Sy || true diff --git a/src/libretools.conf b/src/libretools.conf index 2c7ccdd..78e6fb8 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -70,8 +70,8 @@ FULLBUILDCMD="sudo libremakepkg" #FULLBUILDCMD="makepkg -sL --noconfirm" # Locally release the package or any other action after running FULLBUILDCMD -# succesfully. -HOOKLOCALRELEASE=":" +# succesfully. When run, it is given a repository name as a single argument. +HOOKLOCALRELEASE="librestage" #HOOKLOCALRELEASE="mipsrelease" ################################################################################ diff --git a/src/mips64el-tools/mipsrelease b/src/mips64el-tools/mipsrelease index 393ca08..30ebb46 100755 --- a/src/mips64el-tools/mipsrelease +++ b/src/mips64el-tools/mipsrelease @@ -10,57 +10,53 @@ . libremessages . $(librelib conf.sh) load_files makepkg +check_vars makepkg CARCH PKGDEST PKGEXT || exit 1 load_files libretools check_vars libretools WORKDIR || exit 1 usage() { - echo "$0 repo package1 [ package2 ... packageN ]" - echo - echo " release packages locally on ${PKGDEST}/stage3." - echo " and make a clean ABS sync " + echo "$0 repo" + echo + echo " release packages locally on \${PKGDEST}/stage3." + echo " and make a clean ABS sync " } -## -# usage : get_full_version( $epoch, $pkgver, $pkgrel ) -# return : full version spec, including epoch (if necessary), pkgver, pkgrel -## -get_full_version() { - if [[ $1 -eq 0 ]]; then - # zero epoch case, don't include it in version - echo $2-$3 - else - echo $1:$2-$3 - fi -} +main() { + if [[ $# != 1 ]]; then + usage + exit 1 + fi -repo=$1; shift + repo=$1 -if [ -z "${repo}" ]; then - error "Empty repo" - exit 1 -fi + if [ -z "${repo}" ]; then + error "Empty repo" + exit 1 + fi -# Get all needed sources -source PKGBUILD -fullver=$(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}) -pkgs=() -makepkg --source -f --skippgpcheck + # Get all needed sources + source PKGBUILD + fullver=$(get_full_version) + pkgs=() + makepkg --source -f --skippgpcheck -msg "Adding packages to [stage3]..." -for name in ${pkgname[@]}; do - msg2 "${name} ${fullver}" - pkgs+=("${PKGDEST}/${name}-${fullver}-*.pkg.tar.*") -done + msg "Adding packages to [stage3]..." + for name in "${pkgname[@]}"; do + msg2 "${name} ${fullver}" + pkgs+=(${PKGDEST}/${name}-${fullver}-*.pkg.tar.*) + done -repo-add ${PKGDEST}/stage3.db.tar.gz ${pkgs[@]} + repo-add ${PKGDEST}/stage3.db.tar.gz "${pkgs[@]}" -librestage ${repo} + librestage ${repo} + mkdir -p ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null -mkdir -p ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null + pushd ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null + tar xvf $SRCPKGDEST/${pkgbase:-${pkgname[0]}}-${fullver}${SRCEXT} + popd >/dev/null -pushd ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null - tar xvf $SRCPKGDEST/${pkgbase:-${pkgname[0]}}-${fullver}${SRCEXT} -popd >/dev/null + exit $? +} -exit $? +main "$@" |