1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-20 12:36:14 +02:00
build/pkg/openrc/build
David Oberhollenzer fc0b587074 Cleanup deployed files and directories
- Remove empty directories installed to / by install targets
 - Make sure we strip everything
 - Remove charset.alias file installed by every pacakge, add
   centralized version to rootfs package

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-24 22:44:59 +01:00

70 lines
1.6 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"
source "$SCRIPTDIR/board/$BOARD/INIT"
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
}