source: scripts/target-scripts/target-sysklogd.sh@ 873009c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 873009c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 2.2 KB
RevLine 
[617118d]1#!/bin/sh
2
3# cross-lfs target sysklogd build
4# -------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=sysklogd-target.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball sysklogd-${SYSKLOGD_VER} &&
18cd ${PKGDIR}
19
20if [ "${USE_SYSROOT}" = "Y" ]; then
21 BUILD_PREFIX="/usr"
22 INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
23else
24 INSTALL_PREFIX="${TGT_TOOLS}"
25fi
26
27# If using 2.5+ kernels, patch (klogd linux/modules.h)
28case ${KERNEL_VER} in
29 2.[56].* )
30 case ${SYSKLOGD_VER} in
31 1.4.[1-9]* )
32 apply_patch sysklogd-${SYSKLOGD_VER}
33 ;;
34 esac
35 ;;
36esac
37
38apply_patch sysklogd-${SYSKLOGD_VER}-cross
39
40# This package defaults to optimisation level -O3
41# Following strips this out, allowing us to set CFLAGS
42# with whatever optimisation we want via RPM_OPT_FLAGS
43test -f Makefile-ORIG ||
44 cp Makefile Makefile-ORIG
45sed 's@CFLAGS= $(RPM_OPT_FLAGS) -O3@CFLAGS= $(RPM_OPT_FLAGS)@g' \
46 Makefile-ORIG > Makefile
47
48max_log_init Sysklogd ${SYSKLOGD_VER} "Final (shared)" ${BUILDLOGS} ${LOG}
49make -k CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
50 LDFLAGS="-s" RPM_OPT_FLAGS="-O2 -pipe ${TGT_CFLAGS}" \
51 >> ${LOGFILE} 2>&1 &&
52echo " o Build OK" &&
53
54min_log_init ${INSTLOGS} &&
55if [ ! -d ${INSTALL_PREFIX}/man/man8 ]; then mkdir -p ${INSTALL_PREFIX}/man/man8 ; fi
56if [ ! -d ${LFS}/usr/sbin ]; then mkdir -p ${LFS}/usr/sbin ; fi
57
58echo "Password: " &&
59if [ "${USE_SYSROOT}" = "Y" ]; then
60 su -c "make BINDIR=${INSTALL_PREFIX}/sbin MANDIR=${INSTALL_PREFIX}/man install &&
61 ln -fs ${TGT_TOOLS}/sbin/syslogd ${LFS}/usr/sbin &&
62 ln -fs ${TGT_TOOLS}/sbin/klogd ${LFS}/usr/sbin "
63 >> ${LOGFILE} 2>&1 &&
64 echo " o ALL OK" || barf
65else
66 su -c "make BINDIR=${INSTALL_PREFIX}/sbin MANDIR=${INSTALL_PREFIX}/man install"
67 >> ${LOGFILE} 2>&1 &&
68 echo " o ALL OK" || barf
69fi
70
71# Create /etc/syslog.conf
72# NOTE: Using LFS syslog.conf, copy in real one later
73cat > ${LFS}/etc/syslog.conf << "EOF"
74# Begin /etc/syslog.conf
75
76auth,authpriv.* -/var/log/auth.log
77*.*;auth,authpriv.none -/var/log/sys.log
78daemon.* -/var/log/daemon.log
79kern.* -/var/log/kern.log
80mail.* -/var/log/mail.log
81user.* -/var/log/user.log
82*.emerg *
83
84# End /etc/syslog.conf
85EOF
86
Note: See TracBrowser for help on using the repository browser.