mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
97 lines
3.2 KiB
Bash
97 lines
3.2 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=ncurses
|
|
pkgver=5.9
|
|
pkgrel=3
|
|
pkgdesc="System V Release 4.0 curses emulation library"
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.gnu.org/software/ncurses/"
|
|
license=('MIT')
|
|
depends=('glibc')
|
|
source=("ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz"
|
|
'gentoo-ncurses-5.9-rxvt-unicode-9.15.patch')
|
|
md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1'
|
|
'da9ffd52d5826c661aa02be2bf1fa8c1')
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
patch -Np0 -i "${srcdir}/gentoo-ncurses-5.9-rxvt-unicode-9.15.patch"
|
|
|
|
cd "${srcdir}"
|
|
rm -rf ncurses{,w}-build && mkdir -p ncurses{,w}-build
|
|
|
|
cd "${srcdir}/ncursesw-build"
|
|
"${srcdir}/${pkgname}-${pkgver}/configure" \
|
|
--prefix=/usr \
|
|
--mandir=/usr/share/man \
|
|
--with-shared \
|
|
--with-normal \
|
|
--without-debug \
|
|
--without-ada \
|
|
--with-install-prefix="${pkgdir}" \
|
|
--enable-widec
|
|
make || return 1
|
|
|
|
# libncurses.so.5 for external binary support
|
|
cd ${srcdir}/ncurses-build
|
|
[ "${CARCH}" = 'x86_64' ] && CONFIGFLAG="--with-chtype=long"
|
|
"${srcdir}/${pkgname}-${pkgver}/configure" \
|
|
--prefix=/usr \
|
|
--with-shared \
|
|
--with-normal \
|
|
--without-debug \
|
|
--without-ada \
|
|
--with-install-prefix="${pkgdir}" \
|
|
"${CONFIGFLAG}"
|
|
make || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/ncursesw-build"
|
|
make install
|
|
|
|
# move libraries needed for boot to /lib (we call tput in initscripts)
|
|
install -d -m755 "${pkgdir}/lib"
|
|
mv "${pkgdir}/usr/lib"/libncursesw.so.5* "${pkgdir}/lib"
|
|
ln -sf ../../lib/libncursesw.so.5 "${pkgdir}/usr/lib/libncursesw.so"
|
|
|
|
# Fool packages looking to link to non-wide-character ncurses libraries
|
|
for lib in curses ncurses form panel menu ; do \
|
|
rm -f "${pkgdir}/usr/lib/lib${lib}.so" ; \
|
|
echo "INPUT(-l${lib}w)" >"${pkgdir}/usr/lib/lib${lib}.so" ; \
|
|
ln -sf "lib${lib}w.a" "${pkgdir}/usr/lib/lib${lib}.a" ; \
|
|
done
|
|
ln -sf libncurses++w.a "${pkgdir}/usr/lib/libncurses++.a"
|
|
|
|
#############################################################################
|
|
# Commented out, the systemd move will require things in /usr/bin anyway.
|
|
#
|
|
## install tput to /bin
|
|
# install -d -m755 "${pkgdir}/bin"
|
|
# mv "${pkgdir}/usr/bin/tput" "${pkgdir}/bin/tput"
|
|
|
|
# Some packages look for -lcurses during build
|
|
rm -f "${pkgdir}/usr/lib/libcursesw.so"
|
|
echo "INPUT(-lncursesw)" >"${pkgdir}/usr/lib/libcursesw.so"
|
|
ln -sf libncurses.so "${pkgdir}/usr/lib/libcurses.so"
|
|
ln -sf libncursesw.a "${pkgdir}/usr/lib/libcursesw.a"
|
|
ln -sf libncurses.a "${pkgdir}/usr/lib/libcurses.a"
|
|
|
|
# non-widec compatibility library
|
|
cd "${srcdir}/ncurses-build"
|
|
install -D -m755 "lib/libncurses.so.${pkgver}" \
|
|
"${pkgdir}/usr/lib/libncurses.so.${pkgver}"
|
|
ln -sf "libncurses.so.${pkgver}" "${pkgdir}/usr/lib/libncurses.so.5"
|
|
|
|
# install license, rip it from the readme
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
grep -B 100 '$Id' README > "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|