archrelease: copy trunk to community-any
[ArchLinux/community.git] / libguestfs / repos / community-x86_64 / PKGBUILD
blobfd48ec7b9bb3b7be7df1861316a0ff5c2a7d8adf
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Robin Broda <coderobe @ archlinux.org>
3 # Contributor: Peter Wu <peter@lekensteyn.nl>
4 # Contributor: Evaggelos Balaskas <eblaskas _AT_ ebalaskas _DOT_ gr>
5 # Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
6 # Contributor: Nikos Skalkotos <skalkoto (at) Gmail.com>
8 pkgname=libguestfs
9 pkgver=1.48.6
10 pkgrel=5
11 pkgdesc="Access and modify virtual machine disk images"
12 arch=(x86_64)
13 url="https://libguestfs.org/"
14 license=(GPL2 LGPL2.1)
15 # NOTE: see appliance/packagelist.in
16 _appliancedeps=(
17   btrfs-progs
18   debootstrap
19   dhcpcd
20   dosfstools
21   exfatprogs
22   f2fs-tools
23   gptfdisk
24   grub
25   iproute2
26   iputils
27   jfsutils
28   libldm
29   lrzip
30   lsof
31   lsscsi
32   lvm2
33   lzop
34   mdadm
35   mtools
36   multipath-tools
37   nilfs-utils
38   ntfs-3g
39   openssh
40   pciutils
41   procps-ng
42   psmisc
43   reiserfsprogs
44   rsync
45   squashfs-tools
46   strace
47   syslinux
48   systemd-sysvcompat
49   vim
50   xfsprogs
51   yara
53 depends=(
54   augeas
55   fuse2
56   hivex
57   jansson
58   sleuthkit
59   libconfig
60   libvirt
61   perl-libintl-perl
62   qemu
63   supermin
64   "${_appliancedeps[@]}"
66 makedepends=(
67   bash-completion
68   cdrtools
69   cpio
70   erlang-nox
71   ghc
72   go
73   gobject-introspection
74   gperf
75   ocaml
76   ocaml-compiler-libs
77   ocaml-findlib
78   perl-module-build
79   python
80   java-environment
81   lua
82   php
83   ruby
84   ruby-rake
85   ruby-rdoc
86   rust
87   vala
89 checkdepends=(linux ruby-test-unit)
90 optdepends=(
91   'gobject-introspection: GObject-Introspection Bindings'
92   'java-runtime: for Java bindings'
93   'ocaml: OCaml Bindings'
94   'php: for PHP module'
95   'python: Python Bindings'
96   'ruby: for Ruby bindings'
98 provides=(libguestfs.so libguestfs-gobject-1.0.so)
99 backup=(etc/libguestfs-tools.conf)
100 source=(
101   http://download.libguestfs.org/${pkgver%.*}-stable/$pkgname-$pkgver.tar.gz{,.sig}
102   $pkgname-1.48.1-disable_php_tests.patch
104 sha256sums=('0c03cdb2f3460fa492e8423a003e3aa7d51a1311906e01467d1fb90ebf336ac5'
105             'SKIP'
106             '151d7ab43e7150c7d645eb0bad9681ce5ecc59cae44f254f08ef617ce3d9932f')
107 b2sums=('22359ed4b55e29f985dbbbc4f0337eaec32f21a1413bd778656c3f0270891bec520a0b9590e104836eaf9367aeb9ac681b0bf85852fb7a2059da3f7062bc5111'
108         'SKIP'
109         '2f7c429875d80b2b3a70286f83764ce6ed8be86055232fc059ab55ebf8393f9d29a2241401c7ab55af7ba9180ea85909647fe06ca51880f93bc66b488bcec78c')
110 validpgpkeys=('F7774FB1AD074A7E8C8767EA91738F73E1B768A0') # Richard W.M. Jones <rjones@redhat.com>
112 prepare() {
113   # disable php tests, as missing arginfo definition makes them fail: https://github.com/libguestfs/libguestfs/issues/78
114   patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-1.48.1-disable_php_tests.patch
116   cd $pkgname-$pkgver
117   autoreconf -fiv
120 build() {
121   cd $pkgname-$pkgver
122   # TODO: build haskell bindings
123   CFLAGS+=" -ffat-lto-objects" \
124   ./configure \
125     --prefix=/usr \
126     --sysconfdir=/etc \
127     --sbindir=/usr/bin \
128     --disable-static \
129     --disable-haskell \
130     --with-extra-packages="libldm systemd-sysvcompat openssh qemu" \
131     --with-guestfs-path=/usr/lib/guestfs
133   make
136 check() {
137   LIBGUESTFS_TRACE=1 make -k check -C $pkgname-$pkgver
140 package() {
141   make INSTALLDIRS=vendor DESTDIR="$pkgdir" install -C $pkgname-$pkgver