Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7075dd8
commit a5a4ebd
Showing
3 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Libguestfs: Installer: Arch | ||
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to> | ||
# Maintainer: Nikos Skalkotos <skalkoto (at) Gmail.com> | ||
# | ||
# special thanks go to Evaggelos Balaskas < ebalaskas _AT_ ebalaskas _DOT_ gr > | ||
# for all the help | ||
|
||
pkgname=libguestfs | ||
pkgver=1.26.5 | ||
pkgver_short=${pkgver%.*} | ||
pkgrel=1 | ||
pkgdesc="Access and modify virtual machine disk image" | ||
arch=("i686" "x86_64") | ||
url="http://libguestfs.org" | ||
license=("GPL2" "LGPL2.1") | ||
backup=("etc/libguestfs-tools.conf") | ||
# backup=("etc/libguestfs-tools.conf" "etc/php.d/guestfs_php.ini") | ||
install="appliance.install" | ||
depends=("qemu" | ||
# "febootstrap>=3.21" | ||
"augeas" | ||
"hivex>=1.3.2" | ||
"libconfig" | ||
"libvirt" | ||
"cpio" | ||
"wget") | ||
makedepends=("qemu" | ||
"pcre" | ||
"fuse" | ||
"cdrkit" | ||
"libvirt" | ||
"libconfig" | ||
"libxml2" | ||
"gperf" | ||
"python2" | ||
"perl" | ||
"perl-string-shellquote" | ||
"perl-libintl-perl" | ||
"perl-sys-virt" | ||
# "lua" | ||
# "ghc" | ||
# "ruby" | ||
# "erlang" | ||
# "gjs" | ||
# "php" | ||
# "gobject-introspection" | ||
"ocaml-findlib" | ||
"ocaml") | ||
optdepends=("python2: Python bindings" | ||
# "ruby: Ruby Bindings" | ||
# "gjs: Javascript Bindings for GNOME" | ||
# "php: PHP bindings" | ||
# "erlang: Erlang Bindings" | ||
# "ghc: Haskell Bindings" | ||
# "lua: Lua Bindings" | ||
"perl: Perl Bindings" | ||
"perl-sys-virt: Sys-Virt tools" | ||
"ocaml: Ocaml libs") | ||
provides=("guestfish=${pkgver}") | ||
options=() | ||
source=("http://libguestfs.org/download/${pkgver_short}-stable/${pkgname}-${pkgver}.tar.gz" | ||
"update-libguestfs-appliance") | ||
sha512sums=('c60d1d645dfcc53f6c18251e7575ca00edf13499aa6e2501bd84a4cde68f32d8968259698b9a4ce0a4854e8c53b62b87330db7b932c776d21c1fc2d23889eed8' | ||
'35c127c9bbc222a45442bd4cbf0d947389a9367cd662a69692248e476846060ce2c7e57edcbc274ac546dcd160317befaf5fee76c4213e4f575cd1d55222fd62') | ||
build() { | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
|
||
# Currently lua, erlang, php, haskel, ruby, ghc, GObject and java bindings are | ||
# disabled. If you want to create any of the aforementioned language bindings | ||
# uncomment the appropriate line in makedepends and remove the --disable-* | ||
# option in ./configure | ||
|
||
./configure \ | ||
PYTHON=python2 \ | ||
--prefix=/usr \ | ||
--libdir=/usr/lib \ | ||
--mandir=/usr/share/man \ | ||
--sysconfdir=/etc \ | ||
--disable-probes \ | ||
--disable-appliance \ | ||
--disable-daemon \ | ||
--without-java \ | ||
--enable-introspection=no \ | ||
--disable-lua \ | ||
--disable-erlang \ | ||
--disable-php \ | ||
--disable-haskell \ | ||
--disable-ruby \ | ||
--disable-gobject \ | ||
--disable-golang | ||
|
||
make -j3 | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/${pkgname}-${pkgver}" | ||
make DESTDIR="${pkgdir}" install | ||
|
||
mkdir -p "$pkgdir/usr/lib/guestfs" | ||
install -Dm755 "${srcdir}/update-libguestfs-appliance" "$pkgdir/usr/bin/update-libguestfs-appliance" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
post_install() { | ||
usr/sbin/update-libguestfs-appliance | ||
} | ||
|
||
pre_remove() { | ||
rm -f usr/lib/guestfs/{kernel,initrd,root,README.fixed} | ||
} | ||
|
||
pre_upgrade() { | ||
pre_remove | ||
} | ||
|
||
post_upgrade() { | ||
post_install | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
# | ||
# update-guestfs-appliance: download and install a guestfs binary appliance | ||
# Copyright (C) 2013 Nikos Skalkotos <skalkoto@gmail.com> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
||
VERSION=1.26.0 | ||
SHA512SUM="5d493ed6e8601dde8d5a45debfee71696b96a36d0f69d428388a6f2a2d49e12c0a66bcee210fe606fc9b2b41cb42d0d2a9f5d12425f2b234423194b2609f081f" | ||
|
||
set -e | ||
|
||
if [[ $EUID -ne 0 ]]; then | ||
echo "This script must be run as root" >&2 | ||
exit 1 | ||
fi | ||
|
||
echo >&2 | ||
echo "Downloading binary appliance v$VERSION for libguestfs ... " >&2 | ||
echo >&2 | ||
|
||
TMP=$(mktemp -d) | ||
trap "rm -rf $TMP" EXIT | ||
|
||
cd $TMP | ||
wget http://libguestfs.org/download/binaries/appliance/appliance-${VERSION}.tar.xz | ||
|
||
echo -n "Checking checksum ... " >&2 | ||
|
||
checksum=$(mktemp --tmpdir="$TMP") | ||
echo "$SHA512SUM appliance-${VERSION}.tar.xz" > "$checksum" | ||
|
||
sha512sum -c "$checksum" | ||
|
||
echo >&2 | ||
echo "Extracting binary appliance files:" >&2 | ||
tar -xvf appliance-${VERSION}.tar.xz | ||
|
||
echo >&2 | ||
echo "Copying appliance files to /usr/lib/guestfs: " >&2 | ||
install -v -m644 -o root -g root --backup=none "$TMP/appliance/"{kernel,initrd,root,README.fixed} /usr/lib/guestfs | ||
|
||
echo >&2 | ||
echo "Binary appliance installation finished successfully!" >&2 |