1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-09 15:26:13 +02:00
build/pkg/openrc/build
David Oberhollenzer 94cc2d2c46 Implement board/product config schema
- build needs a pair of product and board name
 - some products can only be built for some boards
 - Config files in product/<name> directory override those in board/<name>
 - For some config files, like LDPATH or ROOTFS, the files are merged
 - product/common provides defaults

Add default config for various services:
 - Add default config for unbound
 - Add default config for dnsmasq

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 18:28:29 +01:00

75 lines
1.8 KiB
Plaintext
Executable file

VERSION="0.34.11"
SRCDIR="openrc-${VERSION}"
TARBALL="${VERSION}.tar.gz"
URL="https://github.com/OpenRC/openrc/archive"
SHA256SUM="4e7b7510c363e99622400feba4b009ec0e0b57dbb99fd4cc678a7b5d2036e00a"
DEPENDS="ncurses"
prepare() {
return
}
build() {
local SOURCE="$1"
local DEPLOY="$2"
local distroname="${OS_NAME}-${OS_RELEASE}"
cp -R ${SOURCE}/* ${PKGBUILDDIR}
apply_patches
make CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
LD=${TARGET}-ld LIBTERMCAP="-lncursesw" \
SBINDIR="/bin" INCDIR="/include" LIBNAME="lib" \
DESTDIR="$DEPLOY" OS=Linux BRANDING="$distroname" \
MKNET=no MKSELINUX=no MKSTATICLIBS=no MKSYSVINIT=yes \
MKTERMCAP=ncurses UPREFIX="" \
-j $NUMJOBS
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local DEVDEPLOY="$3"
local distroname="${OS_NAME}-${OS_RELEASE}"
make SBINDIR="/bin" INCDIR="/include" LIBNAME="lib" \
DESTDIR="$DEPLOY" OS=Linux BRANDING="$distroname" UPREFIX="" \
install
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
rm -r ${DEPLOY}/share
rm -r ${DEPLOY}/etc
chmod 755 ${DEPLOY}/lib/*.so*
strip_files ${DEPLOY}/{bin,lib}/* ${DEPLOY}/libexec/rc/{bin,sbin}/*
mkdir -p ${DEPLOY}/etc/{conf.d,init.d,runlevels,sysctl.d}
mkdir -p ${DEPLOY}/etc/runlevels/{boot,sysinit,shutdown,default}
cp -R "$SCRIPTDIR/pkg/$PKGNAME/etc" "$DEPLOY"
if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then
source "$SCRIPTDIR/board/$BOARD/INIT"
fi
if [ -e "$SCRIPTDIR/product/$PRODUCT/INIT" ]; then
source "$SCRIPTDIR/product/$PRODUCT/INIT"
fi
for i in $GETTY_TTY; do
cat > "$DEPLOY/etc/conf.d/agetty.$i" << _EOF
#quiet="yes"
#baud="38400"
term_type="linux"
#agetty_options=""
_EOF
ln -s "/etc/init.d/agetty" "$DEPLOY/etc/init.d/agetty.$i"
ln -s "/etc/init.d/agetty.$i" "$DEPLOY/etc/runlevels/default/agetty.$i"
done
unset -v i GETTY_TTY
}