aboutsummaryrefslogtreecommitdiffstats
path: root/community/osinfo-db/APKBUILD
blob: 0e01315a11b5d49ae1bdbac8b4c73459d68c4c0a (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
64
65
66
67
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=osinfo-db
pkgver=20170423
pkgrel=2
pkgdesc="osinfo database files"
url="http://libosinfo.org/"
arch="noarch"
license="LGPLv2+"
depends=""
makedepends="osinfo-db-tools"
install=""
subpackages=""
source="https://releases.pagure.org/libosinfo/osinfo-db-$pkgver.tar.xz
	0001-Add-alpine-linux-3.5-and-3.6.patch
	"
builddir="$srcdir/osinfo-db-$pkgver"

build() {
	cd "$builddir"
}

check() {
	osinfo-db-validate --dir "$builddir"
}

package() {
	cd "$builddir"
	osinfo-db-import --root "$pkgdir" \
		--dir /usr/share/osinfo "$srcdir"/osinfo-db-$pkgver.tar.xz
	mkdir -p "$pkgdir"/usr/share/osinfo/os/alpinelinux
	cat > "$pkgdir"/usr/share/osinfo/os/alpinelinux/alpinelinux-3.6.xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<libosinfo version="0.0.1">

  <os id="http://alpinelinux.org/alpinelinux/3.6">
    <short-id>alpinelinux3.6</short-id>
    <name>Alpine Linux 3.6</name>
    <version>3.6</version>
    <vendor>Alpine Linux Project</vendor>
    <family>linux</family>
    <distro>alpinelinux</distro>
    <resources arch="all">
      <recommended>
        <cpu>1000000000</cpu>
	<n-cpus>1</n-cpus>
	<ram>1073741824</ram>
	<storage>5368709120</storage>
      </recommended>
    </resources>
    <media arch="i686">
      <iso>
        <volume-id>alpine-.* 3.6.\d x86.*</volume-id>
      </iso>
    </media>
    <media arch="x86_64">
      <iso>
        <volume-id>alpine-.* 3.6.\d x86_64.*</volume-id>
      </iso>
    </media>
  </os>
</libosinfo>
EOF

}

sha512sums="5ca13ced160f19dced65f3552e17a0379a47a05f1aa3bdd533550022f0023050b6cc1b43b2da6cff3fa10451f81560fbb0db241a11ed072b9f101db1bd301833  osinfo-db-20170423.tar.xz
f56cc5598fcc426e1c1b03814c9e6167602d7ebb096f7a0288ba6c432910405d26692135d7edd13c9d3de11507d1b361a1951056952a462f951d9b75be71f17f  0001-Add-alpine-linux-3.5-and-3.6.patch"