Change package structure

This commit is contained in:
Alex D. 2021-08-02 17:21:27 +00:00
parent 4260a8cd97
commit 89c3d7a610
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
11 changed files with 53 additions and 65 deletions

View File

@ -1,51 +0,0 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-base
pkgver=3.14.0
pkgrel=0
pkgdesc="Meta package for minimal alpine base"
url="https://alpinelinux.org"
arch="noarch"
license="MIT"
options="!check"
depends="
alpine-baselayout
apk-tools
alpine-keys
busybox
busybox-initscripts
openrc
musl
"
package() {
mkdir -p "$pkgdir"/etc
# create /etc/alpine-release
echo $pkgver > "$pkgdir"/etc/alpine-release
local _ver="$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
local _rel="v$_ver"
case "$pkgver" in
*_alpha*|*_beta*|*_pre*)
_ver="$pkgver (edge)"
_rel="edge"
;;
esac
# create /etc/issue
cat >"$pkgdir"/etc/issue<<EOF
Welcome to Alpine Linux $_ver
Kernel \\r on an \\m (\\l)
EOF
# create os-release
cat >"$pkgdir"/etc/os-release<<EOF
NAME="Alpine Linux"
ID=alpine
VERSION_ID=$pkgver
PRETTY_NAME="Alpine Linux $_rel"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
EOF
}

View File

@ -1,12 +1,12 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-baselayout
pkgver=3.2.0
pkgrel=18
pkgdesc="Alpine base dir structure and init scripts"
url="https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout"
arch="all"
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=baselayout
pkgver=1.0
pkgrel=0
pkgdesc="Base directory structure for linux"
url="none"
arch="noarch"
license="GPL-2.0-only"
options="!check"
install="
@ -33,13 +33,15 @@ prepare() {
mv "$srcdir"/services-$_nbver "$srcdir"/services
}
_passwd2shadow() {
local name="$(echo "$1" | cut -d: -f1)"
printf '%s:!:::::::\n' "$name"
}
build() {
# generate shadow
awk -F: '{
pw = ":!:"
if ($1 == "root") { pw = "::" }
print($1 pw ":0:::::")
}' "$srcdir"/passwd > shadow
while read -r LINE; do
_passwd2shadow "$LINE"
done < "$srcdir"/passwd > shadow
}
package() {

37
distro/nnd/APKBUILD Normal file
View File

@ -0,0 +1,37 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
pkgname=nnd
pkgver=0.1
pkgrel=0
pkgdesc="Metapackage for nnd"
url="none"
arch="noarch"
license="MIT"
depends="
baselayout
apk-tools
sbase
"
builddir="$srcdir/"
build() {
local NAME="nonamedistribution"
echo "$pkgver" > release
cat >issue <<EOF
Welcome to $NAME $pkgver
Kernel \\r on an \\m (\\l)
EOF
cat >os-release <<EOF
NAME="$NAME"
ID=nnd
VERSION_ID=$pkgver
PRETTY_NAME="$NAME $pkgver"
EOF
}
package() {
install -Dm400 "$builddir"/os-release "$pkgdir"/etc/os-release
install -Dm400 "$builddir"/issue "$pkgdir"/etc/issue
}