sysvinit: split build stuff into do_build().

--HG--
extra : convert_revision : e992416fb2be569c6a63814a293c5c55f08a5436
This commit is contained in:
Juan RP 2010-01-16 03:43:35 +01:00
parent 0ae9607dcc
commit d9a891b969

View file

@ -17,21 +17,27 @@ Add_dependency full util-linux-ng
Add_dependency full coreutils Add_dependency full coreutils
Add_dependency full gawk Add_dependency full gawk
do_install() do_build()
{ {
mkdir -p ${DESTDIR}/bin ${DESTDIR}/sbin cd ${wrksrc} || return 1
mkdir -p ${DESTDIR}/usr/bin ${DESTDIR}/usr/include
mkdir -p ${DESTDIR}/usr/share/man/man1
mkdir -p ${DESTDIR}/usr/share/man/man5
mkdir -p ${DESTDIR}/usr/share/man/man8
sed -i -e 's/utmpdump wall/utmpdump/' \ sed -i -e 's/utmpdump wall/utmpdump/' \
-e 's/mountpoint.1 wall.1/mountpoint.1/' src/Makefile -e 's/mountpoint.1 wall.1/mountpoint.1/' src/Makefile
sed -i 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \ sed -i 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \
$wrksrc/src/init.c src/init.c
make -C src || return 1
}
cd $wrksrc && make -C src && \ do_install()
make -C src MANDIR=/usr/share/man ROOT=${DESTDIR} install {
cd ${wrksrc} || return 1
install -d ${DESTDIR}/bin ${DESTDIR}/sbin \
${DESTDIR}/usr/bin ${DESTDIR}/usr/include \
${DESTDIR}/usr/share/man/man1 \
${DESTDIR}/usr/share/man/man5 \
${DESTDIR}/usr/share/man/man8
make -C src MANDIR=/usr/share/man ROOT=${DESTDIR} install
# Remove unneeded stuff # Remove unneeded stuff
rm -rf ${DESTDIR}/usr/include rm -rf ${DESTDIR}/usr/include
} }