# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'alpine-base'
setvar pkgver = '3.6.0'
setvar pkgrel = '0'
setvar pkgdesc = ""Meta package for minimal alpine base""
setvar url = ""http://alpinelinux.org""
setvar arch = ""noarch""
setvar license = ""MIT""
setvar depends = ""alpine-baselayout alpine-conf apk-tools busybox busybox-suid busybox-initscripts
	openrc libc-utils alpine-keys""
setvar makedepends = """"
setvar install = """"
setvar subpackages = """"
setvar replaces = ""alpine-baselayout""
setvar source = """"

proc build {
	return 0
}

proc package {
	mkdir -p "$pkgdir"/etc
	# create /etc/alpine-release
	echo $pkgver > "$pkgdir"/etc/alpine-release

	# create /etc/issue
	cat >"$pkgdir"/etc/issue<<< """
Welcome to Alpine Linux ${pkgver%.*}
Kernel '\'r on an '\'m ('\'l)

"""

	setvar _ver = "$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
	# create os-release
	cat >"$pkgdir"/etc/os-release<<< """
NAME="Alpine Linux"
ID=alpine
VERSION_ID=$pkgver
PRETTY_NAME="Alpine Linux v$_ver"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
"""
}