1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 19:19:46 +01:00
build/pkg/ncurses/build
David Oberhollenzer 2235d8e6a0 Upgrade package versions
Upgrade the following packages to newer releases:

  - bash
  - busybox
  - coreutils
  - ethtool
  - iproute2
  - libbsd
  - nano
  - ncurses
  - sqlite3

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-10 19:59:51 +01:00

116 lines
3 KiB
Text
Executable file

VERSION="6.1"
SRCDIR="ncurses-${VERSION}"
TARBALL="${SRCDIR}.tar.gz"
URL="https://ftp.gnu.org/gnu/ncurses/"
SHA256SUM="aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17"
DEPENDS=""
prepare() {
return
}
build() {
local INPUT="$1"
local OUTPUT="$2"
$INPUT/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 BUILD="$2"
local DEPLOY="$3"
local DEVDEPLOY="$4"
make DESTDIR="$DEPLOY" install
rm -r "$DEPLOY/share/man"
rm "$DEPLOY/bin/ncursesw6-config"
for i in ${DEPLOY}/bin/*; do
${TARGET}-strip --discard-all $i
done
unset -v i
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"
mv "$newdir" "$olddir"
for x in {0..9} ; do
mkdir -p "$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"
}