Add few packages
This commit is contained in:
113
src/libguestfs/PKGBUILD
Normal file
113
src/libguestfs/PKGBUILD
Normal file
@@ -0,0 +1,113 @@
|
||||
# Libguestfs: Installer: Arch
|
||||
# Contributor: Peter Wu <peter@lekensteyn.nl>
|
||||
# Contributor: Evaggelos Balaskas <eblaskas _AT_ ebalaskas _DOT_ gr>
|
||||
# Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
|
||||
# Maintainer: Nikos Skalkotos <skalkoto (at) Gmail.com>
|
||||
|
||||
pkgname=libguestfs
|
||||
pkgver=1.36.11
|
||||
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"
|
||||
"etc/xdg/virt-builder/repos.d/libguestfs.conf"
|
||||
"etc/xdg/virt-builder/repos.d/libguestfs.gpg")
|
||||
# backup=("etc/libguestfs-tools.conf" "etc/php.d/guestfs_php.ini")
|
||||
install="appliance.install"
|
||||
_pythonver=2
|
||||
depends=("qemu-headless"
|
||||
"augeas"
|
||||
"hivex>=1.3.2"
|
||||
"libconfig"
|
||||
"libvirt"
|
||||
"fuse"
|
||||
"file"
|
||||
"cpio"
|
||||
"wget")
|
||||
makedepends=("qemu-headless"
|
||||
"pcre"
|
||||
"cdrkit"
|
||||
"libvirt"
|
||||
"libconfig"
|
||||
"libxml2"
|
||||
"gperf"
|
||||
"python${_pythonver}"
|
||||
"perl"
|
||||
"perl-string-shellquote"
|
||||
"perl-libintl-perl"
|
||||
"perl-sys-virt"
|
||||
"perl-module-build"
|
||||
# "lua"
|
||||
# "ghc"
|
||||
# "ruby"
|
||||
# "erlang"
|
||||
# "gjs"
|
||||
# "php"
|
||||
# "gobject-introspection"
|
||||
"ocaml-findlib"
|
||||
"ocaml")
|
||||
optdepends=("python${_pythonver}: 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=('81217bc2be1755f108af815238f144ab72ecb5cc6a815bc50246463508bed739848b9b67c6cf8b1d68c3cfa0aca66857e9006c11e3a8fe20fc1ddcb22c562571'
|
||||
'b16a8a15d39392ab2d5c51ac4cbbcd0fd1e6e8e064bf5b866e7c9f93a639fb8e96fc4328b05963ac24c3333e454b63a6a700e6e6fb1584c9d671f289ee1bcade')
|
||||
|
||||
check() {
|
||||
# test-lock fails, perhaps related to:
|
||||
# http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00059.html
|
||||
# test-thread_create failed too.
|
||||
: make check
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
# Currently OCaml 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=python$_pythonver \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--mandir=/usr/share/man \
|
||||
--sysconfdir=/etc \
|
||||
--disable-static \
|
||||
--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
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
mkdir -p "$pkgdir/usr/lib/guestfs" "$pkgdir/var/cache/guestfs"
|
||||
install -Dm755 "${srcdir}/update-libguestfs-appliance" "${pkgdir}/usr/bin/update-libguestfs-appliance"
|
||||
}
|
20
src/libguestfs/appliance.install
Normal file
20
src/libguestfs/appliance.install
Normal file
@@ -0,0 +1,20 @@
|
||||
post_install() {
|
||||
usr/sbin/update-libguestfs-appliance
|
||||
}
|
||||
|
||||
remove_old_appliance() {
|
||||
rm -f usr/lib/guestfs/{kernel,initrd,root,README.fixed}
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
remove_old_appliance
|
||||
rm -f /var/cache/guestfs/appliance-*
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
remove_old_appliance
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
58
src/libguestfs/update-libguestfs-appliance
Executable file
58
src/libguestfs/update-libguestfs-appliance
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/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.36.1
|
||||
SHA512SUM="2af550078a0e6b37e97988018f579df0e19072d06cbb53eccd85c2873850b472cabf34bbfb4e0ef5f43b5a1af4155f014eeefb85a1b05035d7916c7b1187d722"
|
||||
|
||||
set -e
|
||||
umask 022
|
||||
|
||||
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
|
||||
|
||||
# Cache file to avoid redownloading it on a second run
|
||||
mkdir -p /var/cache/guestfs
|
||||
cd /var/cache/guestfs
|
||||
silent=
|
||||
if [ ! -t 1 ]; then
|
||||
echo "Output is not a TTY, not outputting progress (be patient!)" >&2
|
||||
silent=-nv
|
||||
fi
|
||||
wget $silent --continue -O appliance-${VERSION}.tar.xz \
|
||||
http://libguestfs.org/download/binaries/appliance/appliance-${VERSION}.tar.xz
|
||||
|
||||
echo -n "Checking checksum ... " >&2
|
||||
echo "$SHA512SUM appliance-${VERSION}.tar.xz" | sha512sum -c
|
||||
|
||||
echo >&2
|
||||
echo "Extracting binary appliance files to /usr/lib/guestfs:" >&2
|
||||
tar -xvf appliance-${VERSION}.tar.xz -C /usr/lib/guestfs \
|
||||
--no-same-owner --strip-components=1
|
||||
|
||||
echo "Correcting permissions:" >&2
|
||||
chmod -v 644 "/usr/lib/guestfs/"{kernel,initrd,root,README.fixed}
|
||||
|
||||
echo >&2
|
||||
echo "Binary appliance installation finished successfully!" >&2
|
Reference in New Issue
Block a user