1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-20 20:46:13 +02:00
build/pkg/ncurses/build
David Oberhollenzer 90b2586ea4 Restructure assembly of root filesystem image
Every package now has or generates a rootfs_files.txt containing a list
of files that should be packed into the rootfs, their permissions and
their owner.

This gives us fine grained controll over the owners and permissions of the
rootfs files (by generating a squashfs pseudo file).

In subsequent steps, this allows us to remove the deploy/devdeploy split and
actually simplifiy most of the build scripts.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17 20:22:10 +02:00

77 lines
2 KiB
Plaintext
Executable file

VERSION="6.1"
SRCDIR="ncurses-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://ftp.gnu.org/gnu/ncurses/"
SHA256SUM="aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17"
DEPENDS="toolchain"
prepare() {
return
}
build() {
$1/configure --prefix="" --host="$TARGET" --with-shared \
--without-debug --without-ada --enable-widec \
--with-pkg-config-libdir=/lib/pkgconfig \
--enable-pc-files --disable-stripping
make -j $NUMJOBS
}
deploy() {
local SOURCE="$1"
local DEPLOY="$2"
local DEVDEPLOY="$3"
make DESTDIR="$DEPLOY" install
cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY"
rm "$DEPLOY/bin/ncursesw6-config"
strip_files ${DEPLOY}/bin/* ${DEPLOY}/lib/*.so*
split_dev_deploy "$DEPLOY" "$DEVDEPLOY"
mkdir -p "${DEVDEPLOY}/include/ncurses"
for hdr in ${DEVDEPLOY}/include/ncursesw/*.h; do
local fname=$(basename $hdr)
local target="../$fname"
mv "$hdr" "${DEVDEPLOY}/include"
ln -s "$target" "${DEVDEPLOY}/include/ncursesw/${fname}"
ln -s "$target" "${DEVDEPLOY}/include/ncurses/${fname}"
done
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so"
ln -s "libncursesw.so.$VERSION" "$DEPLOY/lib/libtinfo.so.$VERSION"
ln -s "libncursesw.a" "$DEVDEPLOY/lib/libtinfo.a"
# only keep relevant terminfo files
local olddir="$DEPLOY/share/terminfo.old"
local newdir="$DEPLOY/share/terminfo"
local term x
mv "$newdir" "$olddir"
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
rm -r "$olddir"
}
check_update() {
curl --silent -L "$URL" | grep -o ">ncurses-[0-9.]*tar.gz<" | \
sed 's/>ncurses-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION"
}