You are not logged in.
Hello,i need a script to use in a pkgbuild that can
1)check this website http://fsinapsi.altervista.org/code/tre … 091228.zip for new version of the archive.
2)change the pkgver if a new version is found
3)download the archive
Maybe it's something like this (taken from the chromium pkgbuild),but i don't know how i can modify it .. thank you.
_bldname=chrome-linux.zip
_bldroot=http://build.chromium.org/buildbot/snapshots/${_bldarch}
source=('LICENSE.txt' 'chrome-wrapper.patch' "${_realname}.1.gz" "${_realname}.default"
"${_realname}.desktop" "${_realname}.sh")
noextract=(${_realname}.1.gz)
# trick re-determining the build revision and, or entertain the hidden
# makepkg option --forcever, huh
if [ -z "$FORCE_VER" ]; then
msg "Determining latest build revision..."
newpkgver="$(wget -qO - ${_bldroot}/LATEST)"
if [ -n "$newpkgver" -a "$newpkgver" != "$pkgver" ]; then
msg2 "Version found: %s" "$newpkgver"
FORCE_VER="$newpkgver"
else
FORCE_VER="$pkgver"
fi
fi
if [ "$FORCE_VER" = "LATEST" -a "$SOURCEONLY" -eq 0 ]; then
error "Plz omit '--forcever LATEST'; I'll auto-detect the LATEST ;)"
exit 1
elif [ "$FORCE_VER" != "$pkgver" ]; then
rm -f "$SRCDEST/${_bldname}"
devel_update
fi
}
build() {
if [ ! -r "$srcdir/${_bldname}" ]; then
msg2 "Downloading the latest '$CARCH/$pkgver/${_bldname}'..."
wget --no-cache -c "${_bldroot}/$pkgver/${_bldname}" \
-O "$SRCDEST/${_bldname}" || return $?
ln -fs "$SRCDEST/${_bldname}" "$srcdir/${_bldname}" || return $?
fi
Last edited by Xemertix (2010-01-01 18:30:04)
Offline
This is PKGBUILD abuse IMO. Look at any PKGBUILD from an Arch dev - you won't see anything like this going on.
Write a PKGBUILD for the current version. Make some completely separate arrangement to check for upstream updates. When an update is announced, update the PKGBUILD.
Up to you, of course - I know what I'd do though.
Offline
This is PKGBUILD abuse IMO.
Yes i know,but this archive is updated frequently and generally there aren't major changes in the new versions,so a pkgbuild with a similar script may work well for some time...
Offline
tomk wrote:This is PKGBUILD abuse IMO.
Yes i know,but this archive is updated frequently and generally there aren't major changes in the new versions,so a pkgbuild with a similar script may work well for some time...
So would an external script which automatically updates the PKGBUILD on your machine and then uploads it to the AUR? Simplest I can think of would involve bash, wget/curl, and a bit of sed.
You could even run every X hours if you feel like it.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I don't see a problem here. All you need to do is determine the package version dynamically. (Just like the dev packages.)
pkgver=$(wget http://fsinapsi.altervista.org/code/treep/ -q -O - | sed '/.*trp-\([0-9]\{8\}\)\.zip.*/!d;s//\1/')
sources=(http://fsinapsi.altervista.org/code/treep/trp-${pkgver}.zip)
This silver ladybug at line 28...
Offline
I don't see a problem here. All you need to do is determine the package version dynamically. (Just like the dev packages.)
pkgver=$(wget http://fsinapsi.altervista.org/code/treep/ -q -O - | sed '/.*trp-\([0-9]\{8\}\)\.zip.*/!d;s//\1/') sources=(http://fsinapsi.altervista.org/code/treep/trp-${pkgver}.zip)
Thank you,it worked!
Offline