forked from nielsterp/LFS-X-KDE-RPM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmk-lfs-post-kde
executable file
·48 lines (46 loc) · 1.63 KB
/
mk-lfs-post-kde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#################################################
# Title: mk-lfs-x #
# Date: 2015-06-01 #
# Version: 1.0 #
# Author: [email protected] #
# Options: This script is designed to run #
# in CHROOT on your host system. #
# Do NOT attempt to run it from #
# your LFS environment ! #
# #
# Run as root or use sudo. #
#################################################
#
#
set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized
set +h # disable hashall
source config.inc
source function.inc
PRGNAME=${0##*/} # script name minus the path
[ ${EUID} -eq 0 ] || die "${PRGNAME}: Need to be root user: FAILURE"
[ -z ${PARENT} ] && die "${PRGNAME}: PARENT not set: FAILURE"
[ -z ${LFS} ] && die "${PRGNAME}: LFS not set: FAILURE"
#
# Build X-Org, X libraries, Multimedia libraries and KDE
#
[ -d "${LFS}" ] && die "${PRGNAME}: Not in chroot environment: FAILURE"
#
# Packages for KDE
LIST+="firefox "
LIST+="VirtualBox "
for i in ${LIST}; do
RPMPKG=""
rm -rf BUILD/* BUILDROOT/* > /dev/null 2>&1
RPMPKG=$(find RPMS -name "${i}-[0-9]*.rpm" -print)
[ -z $RPMPKG ] || printf "%s\n" " Skipping: ${i}"
[ -z $RPMPKG ] && > "LOGS/${i}.log" # clean log files
[ -z $RPMPKG ] && build "Building: ${i}" 'rpmbuild -ba --nocheck SPECS/${i}.spec' "LOGS/${i}.log"
[ -e LOGS/${i}.completed ] && continue;
RPMPKG=$(find RPMS -name "${i}-[0-9]*.rpm" -print)
[ -z $RPMPKG ] && die "installation error: rpm package not found\n"
build "Installing: ${i}" "rpm -ivh --nodeps --force ${RPMPKG}" "LOGS/${i}.completed"
done
msg "System finished !"
exit 0