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