summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilippo Squillace2016-06-08 23:15:04 +0100
committerFilippo Squillace2016-06-08 23:15:04 +0100
commit0fecef93d6b0dd2c0d3fed1318f41503ef767fac (patch)
treea428b4fd0087a21789fec2c4571072448c0ca9a1
parentab9805fb5607ed1367ddc765e9262559fcfb703f (diff)
downloadaur-0fecef93d6b0dd2c0d3fed1318f41503ef767fac.tar.gz
Include qemu and proot executables in the package
This will allow to have more control on updates for these executables.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD92
2 files changed, 98 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1af285f0dc7c..774c0df876cb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,28 @@
-# Generated by makepkg 4.2.1
-# Wed Aug 5 09:45:19 UTC 2015
pkgbase = junest-git
pkgdesc = The Arch Linux based distro that runs upon any Linux distros without root access
- pkgver = r193.06879b2
+ pkgver = 5.6.8
pkgrel = 1
url = http://fsquillace.github.io/junest-site/
install = junest.install
arch = any
license = GPL
makedepends = git
+ depends = yaourt
+ depends = pacman
provides = junest
conflicts = junest
source = junest::git+https://github.com/fsquillace/junest.git#branch=master
+ source = http://static.proot.me//proot-x86_64
+ source = http://static.proot.me//proot-x86
+ source = https://dl.dropboxusercontent.com/u/42449030/qemu/x86_64/qemu-x86_64-static-x86
+ source = http://static.proot.me//proot-arm
+ source = https://dl.dropboxusercontent.com/u/42449030/qemu/x86_64/qemu-x86_64-static-arm
md5sums = SKIP
+ md5sums = 14080705dd45a6bafa20e909a68072cb
+ md5sums = b1c08236b56d121e04e9e29b197d0eeb
+ md5sums = 8a706d734f8c790743a8114dda4c344a
+ md5sums = 8218c5f00e77e2e6e04c372ced27c7e7
+ md5sums = 3ced729c95d2514f35d4899e944a4582
pkgname = junest-git
diff --git a/PKGBUILD b/PKGBUILD
index 08c8783d6ba9..acaceb9b56e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,32 @@
# https://wiki.archlinux.org/index.php/PKGBUILD
# https://wiki.archlinux.org/index.php/Creating_packages
+ARCH_LIST=('x86_64' 'x86' 'arm')
+HOST_ARCH=$(uname -m)
+if [ $HOST_ARCH == "i686" ] || [ $HOST_ARCH == "i386" ]
+then
+ NORM_ARCH="x86"
+elif [ $HOST_ARCH == "x86_64" ]
+then
+ NORM_ARCH="x86_64"
+elif [[ $HOST_ARCH =~ .*(arm).* ]]
+then
+ NORM_ARCH="arm"
+fi
+
+PROOT_LINK=http://static.proot.me/
+MAIN_REPO=https://dl.dropboxusercontent.com/u/42449030
+QEMU_LINK=$MAIN_REPO/qemu/$NORM_ARCH
+
pkgname=junest-git
-pkgver=r221.3609954
+pkgver=5.6.8
pkgrel=1
pkgdesc="The Arch Linux based distro that runs upon any Linux distros without root access"
arch=('any')
url="http://fsquillace.github.io/junest-site/"
license=('GPL')
groups=()
-depends=()
+depends=('yaourt' 'pacman')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
@@ -22,8 +39,39 @@ install=junest.install
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.
source=('junest::git+https://github.com/fsquillace/junest.git#branch=master')
-noextract=()
md5sums=('SKIP')
+noextract=()
+
+declare -A proot_md5sums
+proot_md5sums["x86_64"]='14080705dd45a6bafa20e909a68072cb'
+proot_md5sums["x86"]='b1c08236b56d121e04e9e29b197d0eeb'
+proot_md5sums["arm"]='8218c5f00e77e2e6e04c372ced27c7e7'
+declare -A qemu_md5sums
+if [ "$NORM_ARCH" == "x86_64" ]
+then
+ qemu_md5sums["x86"]='8a706d734f8c790743a8114dda4c344a'
+ qemu_md5sums["arm"]='3ced729c95d2514f35d4899e944a4582'
+elif [ "$NORM_ARCH" == "x86" ]
+then
+ qemu_md5sums["x86_64"]='c28d5049193dbce75efa0c8655d71427'
+ qemu_md5sums["arm"]='f75fd15722fcc2914e3de0b0a46eb982'
+elif [ "$NORM_ARCH" == "arm" ]
+then
+ qemu_md5sums["x86_64"]='bd9de1927aae4eb26dc0e5615159a616'
+ qemu_md5sums["x86"]='a7c2b6ca53fa166f0c06ec76cc5edd7d'
+fi
+
+for archh in ${ARCH_LIST[@]}
+do
+ source+=("$PROOT_LINK/proot-$archh")
+ md5sums+=("${proot_md5sums[$archh]}")
+
+ if [ "$archh" != "$NORM_ARCH" ]
+ then
+ source+=("${QEMU_LINK}/qemu-${NORM_ARCH}-static-$archh")
+ md5sums+=("${qemu_md5sums[$archh]}")
+ fi
+done
pkgver() {
@@ -36,21 +84,51 @@ pkgver() {
# are not available, is recommended.
# Git, tags available
-# printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+ printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
# Git, no tags available
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "$srcdir/${pkgname%-git}"
- mkdir -p "${pkgdir}/opt/"
+ install -d -m 755 "${pkgdir}/opt/"
cp -R "${srcdir}/${pkgname%-git}" "${pkgdir}/opt/${pkgname%-git}"
- mkdir -p "${pkgdir}/usr/bin"
+ install -d -m 755 "${pkgdir}/usr/bin"
ln -s ../../opt/${pkgname%-git}/bin/${pkgname%-git} ${pkgdir}/usr/bin/${pkgname%-git}
+
+ echo "Generating the metadata info"
+ install -d -m 755 "${pkgdir}/etc/${pkgname%-git}"
+ echo "JUNEST_ARCH=$NORM_ARCH" > ${pkgdir}/etc/${pkgname%-git}/info
+
+ echo "Installing proot static binaries"
+ cd "$srcdir"
+ install -d -m 755 "${pkgdir}/opt/proot"
+ for arch in ${ARCH_LIST[@]}
+ do
+ install -m 755 proot-$arch ${pkgdir}/opt/proot/proot-$arch
+ done
+
+ echo "Installing qemu static binaries"
+ install -d -m 755 "${pkgdir}/opt/qemu"
+ for arch in ${ARCH_LIST[@]}
+ do
+ if [ "$arch" != "$NORM_ARCH" ]
+ then
+ install -m 755 qemu-${NORM_ARCH}-static-$arch ${pkgdir}/opt/qemu
+ fi
+ done
+
+ echo "Applying patches for yaourt and makepkg"
+ install -d -m 755 "${pkgdir}/opt/yaourt/bin/"
+ install -m 755 /usr/bin/yaourt ${pkgdir}/opt/yaourt/bin/
+ sed -i -e 's/"--asroot"//' ${pkgdir}/opt/yaourt/bin/yaourt
+ install -m 755 /usr/bin/makepkg ${pkgdir}/opt/yaourt/bin/
+ sed -i -e 's/EUID\s==\s0/false/' ${pkgdir}/opt/yaourt/bin/makepkg
+ ln -s ../../opt/yaourt/bin/yaourt ${pkgdir}/usr/bin/yaourt2
}
# vim:set ts=2 sw=2 et: