summaryrefslogtreecommitdiff
path: root/pcr/libosinfo-libre/PKGBUILD
blob: 8400558c039ac5e5b57faa9cf8569d6c3f1bf698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Daniel Milewski <niitotantei@gmail.com>

_pkgname='libosinfo'
pkgname="$_pkgname-libre"
pkgver='0.2.8'
pkgrel='1'
pkgdesc='A GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support, without support for nonfree systems'
arch=('i686' 'x86_64')
url='http://libosinfo.org'
license=('LGPL')
depends=('glib2' 'libxslt')
makedepends=('intltool' 'libsoup')
checkdepends=('check')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
replaces=("$_pkgname")
source=("https://fedorahosted.org/releases/l/i/$_pkgname/$_pkgname-$pkgver.tar.gz" 'data.patch' 'po.patch' 'test.patch'
        'free-distros.patch')
sha256sums=('50cbfcff4548f37b5b7d3328cbc6e96fe6c2a48696e31eec0c819d161e38c643'
            'fdfb0753a7cf7865ac2ea5b17145f90d27d70e18c69fba0d60dfb43629ea0dac'
            'aab885d2b3a7f91a79efd7ab6f12fe1d4b264afa0fbc200268838b353600b338'
            'c4b328f36973931abd71a10a62ec590ef3ba1177486179bc96aa47a22a6d0a42'
            'f4b79c44ae4a39325480c2b0af4aa7ed086cc1cab7c9ba1119f50967a9a5f4ca')

prepare() {
  cd "$srcdir/$_pkgname-$pkgver"

  rm data/datamaps/windows-lang.xml \
     data/hypervisors/rhel-xen.xml{,.in} \
     data/install-scripts/*.xml \
     data/oses/*.xml{,.in}
  rm -r test/isodata/*

  patch -Np1 -i "$srcdir/data.patch"
  patch -Np1 -i "$srcdir/po.patch"
  patch -Np1 -i "$srcdir/test.patch"

  cd "$srcdir/$_pkgname-$pkgver/po"
  intltool-update pl
  intltool-update uk
  cd "$srcdir/$_pkgname-$pkgver"

  patch -Np1 -i "$srcdir/free-distros.patch"
}

build() {
  cd "$srcdir/$_pkgname-$pkgver"

  ./configure --prefix=/usr
  make
}

check() {
  cd "$srcdir/$_pkgname-$pkgver"

  make -k check
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}