summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-10 17:06:16 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-05-10 17:06:16 -0500
commit0cb622f771024f739b84eb0522c85eb2768c2820 (patch)
treed69888bc25dec54e58c38f3cac0c3902a98e5d4a
parentd7e07174e2dae3d1bd9ec79c90cba9912f2cef0f (diff)
parent0e929530a592dec84439a1c71ca57513517b8e94 (diff)
Merge branch 'master' of vparabola:~/projects/libretools
-rwxr-xr-xaur56
-rwxr-xr-xfullpkg11
-rwxr-xr-xlibrestage12
-rw-r--r--libretools.conf2
-rwxr-xr-xmipsrelease22
5 files changed, 78 insertions, 25 deletions
diff --git a/aur b/aur
new file mode 100755
index 0000000..e300dd1
--- /dev/null
+++ b/aur
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+source /etc/libretools.conf
+source /etc/abs.conf
+
+missing_deps=()
+for _pkg in ${@}; do
+ msg "Downloading $_pkg..."
+ wget -O - -q http://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \
+ tar xzf - >/dev/null 2>&1
+
+ [[ $? -ne 0 ]] && {
+ error "Couldn't get $_pkg"
+ continue
+ }
+
+ stdnull pushd $_pkg
+
+ source PKGBUILD
+
+ pkgbuild-check-nonfree || {
+ warning "This PKGBUILD links to known unfree packages"
+ }
+
+ msg2 "Checking license..."
+ free=0
+ for _license in ${license[@]}; do
+ if ! -d /usr/share/licenses/common/$_license; then
+ warning "License $_license is not a common license"
+ free=1
+ fi
+ done
+
+ if [ $free -eq 1 ]; then
+ plain "Please check that the license is included in the package and
+ *specially* that it respects your freedom."
+ fi
+
+ for _dep in ${depends[@]} ${makedepends[@]}; do
+ if ! is_built $_dep; then
+ if ! find ${ABSROOT} -maxdepth 2 -type d -name "$_dep" | egrep "*" >/dev/null ; then
+ missing_deps=(${missing_deps} $_dep)
+ fi
+ fi
+ done
+
+ stdnull popd
+
+done
+
+[[ ${#missing_deps[*]} -gt 0 ]] && {
+ msg2 "Retrieving missing deps: ${missing_deps[@]}"
+ $0 ${missing_deps[@]}
+}
+
+exit 0
diff --git a/fullpkg b/fullpkg
index 696e97f..c292bdd 100755
--- a/fullpkg
+++ b/fullpkg
@@ -108,7 +108,7 @@ repo=${1:-$(guess_repo)}
source PKGBUILD
msg "Building ${repo:-missing repo}/${pkgbase:-${pkgname[@]}}: $pkgdesc"
-is_built "${pkgbase:-${pkgname[0]}}>=${pkgver}" && exit 0
+is_built "${pkgbase:-${pkgname[0]}}>=${pkgver}-${pkgrel}" && exit 0
#sudo pacman -Sy
@@ -124,6 +124,11 @@ check_queue || exit 1
failed=()
missing=()
+if ! grep mips64el PKGBUILD >/dev/null; then
+ msg "Adding mips64el arch"
+ sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" "PKGBUILD"
+fi
+
# Gets the dependency list from the package_* functions
#pkgdeps=($(cat PKGBUILD | \
# tr -d "\n" | \
@@ -152,11 +157,11 @@ for _dep in ${deps[@]}; do
# TODO find split packages
[[ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ]] && {
source "$ABSROOT/${_repo}/$_dep/PKGBUILD"
- msg2 "Checking for $_dep>=$pkgver"
+ msg2 "Checking for $_dep>=$pkgver-$pkgrel"
# If this version is built, continue with the next dep
- if is_built "$_dep>=$pkgver"; then
+ if is_built "$_dep>=$pkgver-$pkgrel"; then
msg2 "No need to build this one"
break
fi
diff --git a/librestage b/librestage
index 6d7b45e..fa72098 100755
--- a/librestage
+++ b/librestage
@@ -64,11 +64,17 @@ source /etc/makepkg.conf
PKGDEST=${PKGDEST:-.}
SRCPKGDEST=${SRCPKGDEST:-.}
+PKGEXT=".pkg.tar.?z"
+
# Copies the packages to the specified repos inside staging
-for _arch in ${arch[@]}; do
+for _arch in ${ARCHES[@]}; do
for pkg in ${pkgname[@]}; do
- pkgfile="$pkg-$pkgver-$pkgrel-$_arch$PKGEXT"
- pkgpath="$PKGDEST/$pkgfile"
+
+ pkgpath=$(find ${PKGDEST}/ -type f -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}")
+
+ [[ -z ${pkgpath} ]] && continue;
+
+ pkgfile=$(basename ${pkgpath})
if [ -e "${pkgpath}" ]; then
msg "Found ${pkgfile}"
diff --git a/libretools.conf b/libretools.conf
index 2485be3..0999040 100644
--- a/libretools.conf
+++ b/libretools.conf
@@ -13,7 +13,7 @@ WORKDIR=/home/$USER/packages
REPOS=('libre' 'libre-testing' 'core' 'community' 'extra' 'social' 'sugar')
# The architectures
-ARCHES=('i686' 'x86_64' 'mips64el')
+ARCHES=('i686' 'x86_64' 'mips64el' 'any')
## The directory where the chroots are stored
CHROOTDIR=/home/chroot
diff --git a/mipsrelease b/mipsrelease
index 07d27ec..97e12d2 100755
--- a/mipsrelease
+++ b/mipsrelease
@@ -2,25 +2,11 @@
# Temporary script for uploading mips64el packages to the server
source /etc/makepkg.conf
-source /etc/libretools.conf
-msg "Uploading packages"
-for pkg in $@; do
- msg2 "$pkg"
- scp $pkg ${PARABOLAHOST}:mips64el/stage3/ ||{
- error "Failed to upload ${pkg}"
- plain "Try running this command again:"
- echo
- plain "$0 $@"
- exit 1
- }
-done
+pushd ${PKGDEST} >/dev/null
-msg "Updating db"
-scp ${PARABOLAHOST}:mips64el/stage3/stage3.db.tar.gz ${SRCDEST}/ && \
-repo-add ${SRCDEST}/stage3.db.tar.gz $@ && \
-scp ${SRCDEST}/stage3.db.tar.gz ${PARABOLAHOST}:mips64el/stage3/ || {
- error "Could not update db"
-}
+repo-add stage3.db.tar.gz $@
+
+popd >/dev/null
exit $?