1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-12-23 23:50:51 +01:00

Minor cleanup

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-02-19 12:43:22 +01:00
parent b36d66bb9b
commit 96966bf73b
18 changed files with 52 additions and 116 deletions

10
mk.sh
View file

@ -45,7 +45,6 @@ source "$SCRIPTDIR/util/depends.sh"
source "$SCRIPTDIR/util/download.sh"
source "$SCRIPTDIR/util/pkgcmd.sh"
source "$SCRIPTDIR/util/toolchain.sh"
source "$SCRIPTDIR/util/cmake.sh"
source "$SCRIPTDIR/util/misc.sh"
############################### build packages ###############################
@ -62,21 +61,20 @@ while read pkg; do
fetch_package
done < "$PACKAGELIST"
echo "--- building package ---"
echo "--- building packages ---"
while read pkg; do
if [ ! -e "$PKGLOGDIR/.$pkg" ]; then
include_pkg "$pkg"
install_build_deps
run_pkg_command "build"
run_pkg_command "deploy"
rm -rf "$PKGBUILDDIR"
restore_toolchain
rm -rf "$PKGBUILDDIR"
touch "$PKGLOGDIR/.$pkg"
fi
done < "$PACKAGELIST"
echo "--- done ---"

View file

@ -22,6 +22,5 @@ deploy() {
make DESTDIR="$DEPLOY" install
mkdir -p "$DEVDEPLOY/lib"
mv "$DEPLOY/share/pkgconfig" "$DEVDEPLOY/lib"
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
}

View file

@ -29,5 +29,4 @@ deploy() {
mkdir -p "$DEPLOY/bin"
cp "$PKGBUILDDIR/busybox" "$DEPLOY/bin"
ln -s "/bin/busybox" "$DEPLOY/bin/sh"
}

View file

@ -26,10 +26,7 @@ deploy() {
strip_files ${DEPLOY}/bin/*
rm "$DEPLOY/bin/bzegrep"
rm "$DEPLOY/bin/bzfgrep"
rm "$DEPLOY/bin/bzless"
rm "$DEPLOY/bin/bzcmp"
rm ${DEPLOY}/bin/{bzegrep,bzfgrep,bzless,bzcmp}
ln -s "/bin/bzgrep" "$DEPLOY/bin/bzegrep"
ln -s "/bin/bzgrep" "$DEPLOY/bin/bzfgrep"

View file

@ -5,19 +5,6 @@ URL="https://github.com/raspberrypi/firmware/archive"
SHA256SUM="46ce28c8d87ef22bdcc57ac1836ca3f04d1ec6f46580ff5a30bf76b3c0822117"
DEPENDS=""
#export BRCM43430FW_BUILD_DIR=$(BUILD_DIR)/brcm43430fw
#export BRCM43430FW_SOURCE_DIR=$(SOURCE_DIR)/brcm43430fw
#export BRCM43430FW_DEPLOY_DIR=$(DEPLOY_DIR)/brcm43430fw
#BRCM43430FW_VERSION=brcmfmac43430-sdio
#BRCM43430FW_SRCDIR=$(BRCM43430FW_BUILD_DIR)/brcm43430fw-$(BRCM43430FW_VERSION)
#BRCM43430FW_FILE=$(BRCM43430FW_VERSION).txt
#BRCM43430FW_URL=https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/${BRCM43430FW_FILE}
#
#brcm43430fw_deploy:
# mkdir -p $(BRCM43430FW_DEPLOY_DIR)/lib/firmware/brcm/
# cp $(BRCM43430FW_BUILD_DIR)/${BRCM43430FW_FILE} $(BRCM43430FW_DEPLOY_DIR)/lib/firmware/brcm/
# rsync -aH $(BRCM43430FW_DEPLOY_DIR)/lib $(PRE_ROOTFS_DEPLOY_DIR)/rootfs/
prepare() {
return
}
@ -40,4 +27,8 @@ deploy() {
rm ${DEPLOY}/opt/vc/lib/*.a
rm -r "${DEPLOY}/opt/vc/lib/pkgconfig"
rm -r "${DEPLOY}/opt/vc/src"
strip_files ${DEPLOY}/opt/vc/{bin,sbin}/*
strip_files ${DEPLOY}/opt/vc/lib/*.so
strip_files ${DEPLOY}/opt/vc/lib/plugins/*.so
}

View file

@ -22,7 +22,5 @@ deploy() {
make DESTDIR="$DEPLOY" install-strip
rm "$DEPLOY/bin/gawk-$VERSION"
rm -r "$DEPLOY/include"
rm -r "$DEPLOY/share/info"
rm -r "$DEPLOY/share/man"
rm -r "$DEPLOY/include" "$DEPLOY/share/info" "$DEPLOY/share/man"
}

View file

@ -8,7 +8,6 @@ deploy() {
local INPUT="$1"
local DEPLOY="$2"
cp "$PKGDEPLOYDIR/bbstatic/bin/busybox" "$DEPLOY"
cp "$SCRIPTDIR/pkg/initrd/initrd.skel" "$DEPLOY/init"
chmod +x "$DEPLOY/init"
@ -22,7 +21,7 @@ dir /newroot 0775 0 0
dir /images 0775 0 0
slink /sbin /bin 0777 0 0
nod /dev/console 600 0 0 c 5 1
file /bin/busybox $DEPLOY/busybox 0775 0 0
file /bin/busybox $PKGDEPLOYDIR/bbstatic/bin/busybox 0775 0 0
slink /bin/sh /bin/busybox 0777 0 0
file /init $DEPLOY/init 0775 0 0
_EOF

View file

@ -23,9 +23,7 @@ deploy() {
mkdir -p "$DEPLOY/var/lib/arpd"
make DESTDIR="$DEPLOY" SYSROOT="$TCDIR/$TARGET" install
rm -r "$DEPLOY/include"
rm -r "$DEPLOY/share/doc"
rm -r "$DEPLOY/share/man"
rm -r "$DEPLOY/include" "$DEPLOY/share/doc" "$DEPLOY/share/man"
strip_files ${DEPLOY}/bin/*
}

View file

@ -23,11 +23,7 @@ deploy() {
make DESTDIR="$DEPLOY" install-strip
rm -r ${DEPLOY}/share/man
if [ -e ${DEPLOY}/share/doc ]; then
rm -r ${DEPLOY}/share/doc
fi
rm -rf ${DEPLOY}/share/doc ${DEPLOY}/share/man
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
}

View file

@ -20,6 +20,7 @@ deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local DEVDEPLOY="$3"
local target
make DESTDIR="$DEPLOY" install-strip

View file

@ -50,58 +50,22 @@ deploy() {
# only keep relevant terminfo files
local olddir="$DEPLOY/share/terminfo.old"
local newdir="$DEPLOY/share/terminfo"
local term x
mv "$newdir" "$olddir"
for x in {0..9} ; do
mkdir -p "$newdir/$x/"
for term in ansi dumb gnome gnome-fc5 gnome-rh72 gnome-rh80 \
gnome-rh90 gnome-256color klone+color konsole \
konsole-256color kvt linux linux-m linux-nic mlterm \
nxterm rxvt rxvt-256color rxvt-basic rxvt-color screen \
screen-256color screen-w unknown vt100 vt102 vt220 \
vt220-8 vt220-8bit vt320 vt52 vte xterm xterm-256color \
xterm-basic xterm-color xterm-nic xterm-r6;
do
x=${term:0:1}
mkdir -p "$newdir/$x"
mv "$olddir/$x/$term" "$newdir/$x"
done
for x in {a..z} ; do
mkdir -p "$newdir/$x/"
done
for x in {A..Z} ; do
mkdir -p "$newdir/$x/"
done
mv "$olddir/a/ansi" "$newdir/a/"
mv "$olddir/d/dumb" "$newdir/d/"
mv "$olddir/g/gnome" "$newdir/g/"
mv "$olddir/g/gnome-fc5" "$newdir/g/"
mv "$olddir/g/gnome-rh72" "$newdir/g/"
mv "$olddir/g/gnome-rh80" "$newdir/g/"
mv "$olddir/g/gnome-rh90" "$newdir/g/"
mv "$olddir/g/gnome-256color" "$newdir/g/"
mv "$olddir/k/klone+color" "$newdir/k/"
mv "$olddir/k/konsole" "$newdir/k/"
mv "$olddir/k/konsole-256color" "$newdir/k/"
mv "$olddir/k/kvt" "$newdir/k/"
mv "$olddir/l/linux" "$newdir/l/"
mv "$olddir/l/linux-m" "$newdir/l/"
mv "$olddir/l/linux-nic" "$newdir/l/"
mv "$olddir/m/mlterm" "$newdir/m/"
mv "$olddir/n/nxterm" "$newdir/n/"
mv "$olddir/r/rxvt" "$newdir/r/"
mv "$olddir/r/rxvt-256color" "$newdir/r/"
mv "$olddir/r/rxvt-basic" "$newdir/r/"
mv "$olddir/r/rxvt-color" "$newdir/r/"
mv "$olddir/s/screen" "$newdir/s/"
mv "$olddir/s/screen-256color" "$newdir/s/"
mv "$olddir/s/screen-w" "$newdir/s/"
mv "$olddir/u/unknown" "$newdir/u/"
mv "$olddir/v/vt100" "$newdir/v/"
mv "$olddir/v/vt102" "$newdir/v/"
mv "$olddir/v/vt220" "$newdir/v/"
mv "$olddir/v/vt220-8" "$newdir/v/"
mv "$olddir/v/vt220-8bit" "$newdir/v/"
mv "$olddir/v/vt320" "$newdir/v/"
mv "$olddir/v/vt52" "$newdir/v/"
mv "$olddir/v/vte" "$newdir/v/"
mv "$olddir/x/xterm" "$newdir/x/"
mv "$olddir/x/xterm-256color" "$newdir/x/"
mv "$olddir/x/xterm-basic" "$newdir/x/"
mv "$olddir/x/xterm-color" "$newdir/x/"
mv "$olddir/x/xterm-nic" "$newdir/x/"
mv "$olddir/x/xterm-r6" "$newdir/x/"
rm -r "$olddir"
}

View file

@ -26,8 +26,7 @@ deploy() {
make DESTDIR="$DEPLOY" install
rm "$DEPLOY/bin/c_rehash"
rm -r "$DEPLOY/etc/ssl/misc"
rm -r "$DEPLOY/share"
rm -r "$DEPLOY/etc/ssl/misc" "$DEPLOY/share"
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
strip_files ${DEPLOY}/bin/* ${DEPLOY}/lib/*.so*

View file

@ -5,6 +5,21 @@ build() {
}
deploy() {
gen_cmake_toolchain_file
cat > "$CMAKETCFILE" << _EOF
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSROOT ${TCDIR}/${TARGET})
set(CMAKE_C_COMPILER ${TCDIR}/bin/${TARGET}-gcc)
set(CMAKE_C_COMPILER_TARGET ${TARGET})
set(CMAKE_CXX_COMPILER ${TCDIR}/bin/${TARGET}-g++)
set(CMAKE_CXX_COMPILER_TARGET ${TARGET})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
_EOF
save_toolchain
}

View file

@ -33,13 +33,13 @@ deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local DEVDEPLOY="$3"
local UTIL
mkdir -p "$DEPLOY/var/lib/hwclock"
make DESTDIR="$DEPLOY" install-strip
rm -r "$DEPLOY/share/man"
rm -r "$DEPLOY/share/doc"
rm -r "$DEPLOY/share/man" "$DEPLOY/share/doc"
if [ -e "$DEPLOY/sbin" ]; then
mv ${DEPLOY}/sbin/* ${DEPLOY}/bin

View file

@ -24,8 +24,7 @@ deploy() {
make DESTDIR="$DEPLOY" install
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
mv "$DEPLOY/share/pkgconfig" "$DEVDEPLOY/lib"
strip_files ${DEPLOY}/lib/*
rm -r ${DEPLOY}/share
strip_files ${DEPLOY}/lib/*
}

View file

@ -1,18 +0,0 @@
gen_cmake_toolchain_file() {
cat > "$CMAKETCFILE" << _EOF
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSROOT ${TCDIR}/${TARGET})
set(CMAKE_C_COMPILER ${TCDIR}/bin/${TARGET}-gcc)
set(CMAKE_C_COMPILER_TARGET ${TARGET})
set(CMAKE_CXX_COMPILER ${TCDIR}/bin/${TARGET}-g++)
set(CMAKE_CXX_COMPILER_TARGET ${TARGET})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
_EOF
}

View file

@ -34,6 +34,11 @@ split_dev_deploy() {
mv "$1/lib/pkgconfig" "$2/lib"
fi
if [ -d "$1/share/pkgconfig" ]; then
mkdir -p "$2/lib"
mv "$1/share/pkgconfig" "$2/lib"
fi
for f in ${1}/lib/*.la; do
if [ -e "$f" ]; then
rm "$f"

View file

@ -16,10 +16,6 @@ restore_toolchain() {
}
install_build_deps() {
if [ -z "$DEPENDS" ]; then
return
fi
for deppkg in $DEPENDS; do
local devdir="$PKGDEVDEPLOYDIR/$deppkg"