From ed0613addae202ec9988a66f3bf27b13947685a8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 6 May 2010 07:58:44 +0000 Subject: abuild: rename apkcache to abuildrepo To avoid confusing with the /etc/apk/cache --- Makefile | 4 ++-- abuild.in | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 9668ca9..904241e 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ VERSION := 2.2 prefix ?= /usr sysconfdir ?= /etc datadir ?= $(prefix)/share/$(PACKAGE) -apkcache ?= ~/.cache/apks +abuildrepo ?= ~/.cache/apks SCRIPTS := abuild devbuild mkalpine buildrepo abuild-keygen \ abuild-sign newapkbuild @@ -33,7 +33,7 @@ SED_REPLACE := -e 's:@VERSION@:$(FULL_VERSION):g' \ -e 's:@prefix@:$(prefix):g' \ -e 's:@sysconfdir@:$(sysconfdir):g' \ -e 's:@datadir@:$(datadir):g' \ - -e 's:@apkcache@:$(apkcache):g' + -e 's:@abuildrepo@:$(abuildrepo):g' SSL_LIBS := $(shell pkg-config --libs openssl) diff --git a/abuild.in b/abuild.in index fe73d93..ec3b9d4 100755 --- a/abuild.in +++ b/abuild.in @@ -10,7 +10,7 @@ abuild_ver=@VERSION@ sysconfdir=@sysconfdir@ -apkcache=@apkcache@ +abuildrepo=@abuildrepo@ datadir=@datadir@ program=${0##*/} @@ -259,7 +259,7 @@ cleanpkg() { for i in $pkgname $subpackages; do local p="${i%:*}-$pkgver-r$pkgrel" rm -f "$PKGDEST/$p.apk" "$PKGDEST/$p.src.tar.gz" \ - "$apkcache"/$p.apk + "$abuildrepo"/$p.apk done # remove given packages from index } @@ -535,15 +535,15 @@ create_apks() { done } -apkcache() { +abuildrepo() { if ! apk_up2date || [ -n "$force" ]; then sanitycheck && builddeps && clean && fetch && unpack \ && prepare && mkusers && rootpkg || return 1 fi local apk - mkdir -p "$apkcache" || return 1 - cd "$apkcache" + mkdir -p "$abuildrepo" || return 1 + cd "$abuildrepo" # remove broken links for apk in *.apk; do @@ -554,7 +554,7 @@ apkcache() { # create links for this package for apk in $(listpkg); do - ln -sf "$PKGDEST"/$apk "$apkcache"/$apk + ln -sf "$PKGDEST"/$apk "$abuildrepo"/$apk done msg "Updating the cached abuild repository index..." @@ -712,7 +712,7 @@ cache_up2date() { getpkgver || return 1 for i in $pkgname $subpackages; do apk="${i%:*}-$pkgver-r$pkgrel.apk" - [ "$apkcache"/APKINDEX.tar.gz -nt "$apkcache"/$apk ] || return 1 + [ "$abuildrepo"/APKINDEX.tar.gz -nt "$abuildrepo"/$apk ] || return 1 done return 0 } @@ -829,10 +829,10 @@ builddeps() { if [ -n "$install_deps" ] && [ -z "$recursive" ]; then # make a --simluate run first to detect missing deps # apk-tools --virtual is no goot at reporting those. - $SUDO $APK add --repository "$apkcache" \ + $SUDO $APK add --repository "$abuildrepo" \ --wait 30 \ --simulate --quiet $deps || return 1 - $SUDO $APK add --repository "$apkcache" \ + $SUDO $APK add --repository "$abuildrepo" \ --wait 30 \ --virtual .makedepends-$pkgname $deps \ && return 0 @@ -842,7 +842,7 @@ builddeps() { # find dependencies that are installed but missing in repo. for i in $deps; do - local m=$($APK search --repository "$apkcache" ${i%[<>=]*}) + local m=$($APK search --repository "$abuildrepo" ${i%[<>=]*}) if [ -z "$m" ]; then missing="$missing $i" fi @@ -854,10 +854,10 @@ builddeps() { local pkg=${i%:*} if [ -d "$dir" ]; then msg "Entering $dir" - cd "$dir" && $0 -k -r apkcache || return 1 + cd "$dir" && $0 -k -r abuildrepo || return 1 fi done - $SUDO $APK add -u --repository "$apkcache" \ + $SUDO $APK add -u --repository "$abuildrepo" \ --wait 30 \ --virtual .makedepends-$pkgname $deps } @@ -975,7 +975,7 @@ post_add() { installdeps() { local deps i - sudo $APK add --wait 30 --repository "$apkcache" \ + sudo $APK add --wait 30 --repository "$abuildrepo" \ --virtual .makedepends-$pkgname \ $makedepends } @@ -988,7 +988,7 @@ all() { if up2date && [ -z "$force" ]; then msg "Package is up to date" else - apkcache + abuildrepo fi } -- cgit v1.2.3-60-g2f50