Verified Commit 44905a2b authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

Better organisation of package lists and post scripts

parent 0f4eabe1
#!/bin/sh -e
def_arch=$(uname -m)
def_ver="1.0-beta4"
def_ver="1.0"
declare -r PROGNAME=$(basename $0)
......@@ -143,9 +143,9 @@ clean_dirs() {
install_pkgs() {
header "Installing base system to squash root..."
declare -r PACKAGES=$(cat packages 2>/dev/null || fatal 'No core packages specified')
declare -r ARCH_PKGS=$(cat packages-$ARCH 2>/dev/null || echo '')
declare -r KIND_PKGS=$(cat packages-$KIND 2>/dev/null || echo '')
declare -r PACKAGES=$(cat packages/base 2>/dev/null || fatal 'No core packages specified')
declare -r ARCH_PKGS=$(cat packages/arch/$ARCH 2>/dev/null || echo '')
declare -r KIND_PKGS=$(cat packages/kind/$KIND 2>/dev/null || echo '')
mkdir -p squashroot-$ARCH/etc/apk/keys
cp 'packages@adelielinux.org.pub' squashroot-$ARCH/etc/apk/keys/
......@@ -183,12 +183,11 @@ make_structure() {
squashroot-$ARCH/etc/runlevels/boot/$bootservice
done
if [ -f services-$KIND ]; then
for service in $(cat services-$KIND 2>/dev/null || echo ''); do
ln -s /etc/init.d/$service \
sqaushroot-$ARCH/etc/runlevels/default/$service
done
fi
for service in $(cat services/base 2>/dev/null || echo '')
$(cat services/kind/$KIND 2>/dev/null || echo ''); do
ln -s /etc/init.d/$service \
sqaushroot-$ARCH/etc/runlevels/default/$service
done
cat >squashroot-$ARCH/etc/fstab <<- FSTAB
# Welcome to Adélie Linux.
......@@ -308,9 +307,14 @@ make_initrd() {
}
prepare_cdroot() {
if test -f post-$ARCH.sh; then
if test -f post/arch/$ARCH.sh; then
header 'Running architecture-specific scripts...'
sh post-$ARCH.sh
sh post/arch/$ARCH.sh
fi
if test -f post/kind/$KIND.sh; then
header "Running $KIND script..."
sh post/kind/$KIND.sh
fi
header 'Adding kernel...'
......
......@@ -89,10 +89,10 @@ is not specified.
Kinds are a specific set of packages and optional startup scripts that define
a specific 'kind' of CD image. Official Kinds include Horizon, KDE Live, and
MATE Live. You can specify your own by creating a
.Pa packages-$KIND
.Pa packages/kind/$KIND
file containing the names of packages you wish (one per line). Additionally,
you may optionally create a
.Pa services-$KIND
.Pa services/kind/$KIND
file containing the names of services to start up in the default runlevel (one
per line).
.Sh ENVIRONMENT
......@@ -120,7 +120,7 @@ A list of additional parameters to provide to
when generating the ISO image for the specified architecture. This is used to
specify the correct layout for bootable discs on that architecture.
.Pp
.It Pa packages-$ARCH
.It Pa packages/arch/$ARCH
A list of architecture-specific packages to install on the created media, in
addition to the default packages installed on every architecture. This is
typically used for bootloaders and firmware manipulation packages. It can also
......@@ -130,7 +130,7 @@ or
.Xr strace 1
and so on) on architectures that are still experimental.
.Pp
.It Pa post-$ARCH.sh
.It Pa post/arch/$ARCH.sh
If this file exists and is executable, it will be run just before
.Xr mkisofs 8
to do any final preparation to the disc root before creating the image.
......@@ -140,7 +140,7 @@ adelie-build-cd -a x86_64
.Pp
LDARCH=powerpc adelie-build-cd -a ppc
.Pp
EXTRA_MIRROR=i525 LDARCH=i386 SIGNING_KEY=/etc/portage/adelie.key ./build-cd -a x86
LDARCH=i386 SIGNING_KEY=/etc/portage/adelie.key ./adelie-build-cd -a pmmx
.Sh SEE ALSO
.Xr mksquashfs 1 ,
.Xr apk 8 ,
......
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment