From 2d204106e1cb954aaa6ba699ba45c5bc84abdc2b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 10 Apr 2013 15:03:40 +0200 Subject: [PATCH] ncurses: convert to the new template format. --- srcpkgs/ncurses/{ => files}/base-files | 26 ---------- srcpkgs/ncurses/ncurses-base.template | 14 ------ srcpkgs/ncurses/ncurses-devel.template | 22 --------- srcpkgs/ncurses/ncurses-libs.template | 9 ---- srcpkgs/ncurses/ncurses-term.template | 12 ----- srcpkgs/ncurses/template | 66 +++++++++++++++++++++++--- 6 files changed, 60 insertions(+), 89 deletions(-) rename srcpkgs/ncurses/{ => files}/base-files (85%) delete mode 100644 srcpkgs/ncurses/ncurses-base.template delete mode 100644 srcpkgs/ncurses/ncurses-devel.template delete mode 100644 srcpkgs/ncurses/ncurses-libs.template delete mode 100644 srcpkgs/ncurses/ncurses-term.template diff --git a/srcpkgs/ncurses/base-files b/srcpkgs/ncurses/files/base-files similarity index 85% rename from srcpkgs/ncurses/base-files rename to srcpkgs/ncurses/files/base-files index 431990cbd7..995639ab95 100644 --- a/srcpkgs/ncurses/base-files +++ b/srcpkgs/ncurses/files/base-files @@ -1,26 +1,14 @@ -/usr/share/tabset -/usr/share/tabset/std -/usr/share/tabset/stdcrt -/usr/share/tabset/vt100 -/usr/share/tabset/vt300 -/usr/share/terminfo -/usr/share/terminfo/A /usr/share/terminfo/A/Apple_Terminal -/usr/share/terminfo/E /usr/share/terminfo/E/Eterm /usr/share/terminfo/E/Eterm-256color /usr/share/terminfo/E/Eterm-88color /usr/share/terminfo/E/Eterm-color -/usr/share/terminfo/a /usr/share/terminfo/a/ansi /usr/share/terminfo/a/ansi80x25 /usr/share/terminfo/a/ansis -/usr/share/terminfo/c /usr/share/terminfo/c/cons25 /usr/share/terminfo/c/cygwin -/usr/share/terminfo/d /usr/share/terminfo/d/dumb -/usr/share/terminfo/g /usr/share/terminfo/g/gnome /usr/share/terminfo/g/gnome-2007 /usr/share/terminfo/g/gnome-256color @@ -29,30 +17,22 @@ /usr/share/terminfo/g/gnome-rh72 /usr/share/terminfo/g/gnome-rh80 /usr/share/terminfo/g/gnome-rh90 -/usr/share/terminfo/h /usr/share/terminfo/h/hurd -/usr/share/terminfo/j /usr/share/terminfo/j/jfbterm -/usr/share/terminfo/k /usr/share/terminfo/k/kon /usr/share/terminfo/k/kon2 -/usr/share/terminfo/l /usr/share/terminfo/l/linux -/usr/share/terminfo/m /usr/share/terminfo/m/mach /usr/share/terminfo/m/mach-bold /usr/share/terminfo/m/mach-color /usr/share/terminfo/m/mlterm /usr/share/terminfo/m/mrxvt -/usr/share/terminfo/n /usr/share/terminfo/n/nsterm /usr/share/terminfo/n/nxterm -/usr/share/terminfo/p /usr/share/terminfo/p/pcansi /usr/share/terminfo/p/putty /usr/share/terminfo/p/putty-256color /usr/share/terminfo/p/putty-vt100 -/usr/share/terminfo/r /usr/share/terminfo/r/rxvt /usr/share/terminfo/r/rxvt-16color /usr/share/terminfo/r/rxvt-256color @@ -61,9 +41,7 @@ /usr/share/terminfo/r/rxvt-color /usr/share/terminfo/r/rxvt-cygwin /usr/share/terminfo/r/rxvt-cygwin-native -/usr/share/terminfo/r/rxvt-unicode /usr/share/terminfo/r/rxvt-xpm -/usr/share/terminfo/s /usr/share/terminfo/s/screen /usr/share/terminfo/s/screen-16color /usr/share/terminfo/s/screen-16color-bce @@ -86,9 +64,7 @@ /usr/share/terminfo/s/sun /usr/share/terminfo/s/sun1 /usr/share/terminfo/s/sun2 -/usr/share/terminfo/t /usr/share/terminfo/t/teraterm -/usr/share/terminfo/v /usr/share/terminfo/v/vs100 /usr/share/terminfo/v/vt100 /usr/share/terminfo/v/vt100-am @@ -97,10 +73,8 @@ /usr/share/terminfo/v/vt200 /usr/share/terminfo/v/vt220 /usr/share/terminfo/v/vt52 -/usr/share/terminfo/w /usr/share/terminfo/w/wsvt25 /usr/share/terminfo/w/wsvt25m -/usr/share/terminfo/x /usr/share/terminfo/x/xfce /usr/share/terminfo/x/xterm /usr/share/terminfo/x/xterm-1002 diff --git a/srcpkgs/ncurses/ncurses-base.template b/srcpkgs/ncurses/ncurses-base.template deleted file mode 100644 index 5e96892a4a..0000000000 --- a/srcpkgs/ncurses/ncurses-base.template +++ /dev/null @@ -1,14 +0,0 @@ -# Template file for 'ncurses-base'. -# -short_desc="${short_desc} -- base terminfo files" -noarch=yes - -do_install() { - cat $XBPS_SRCPKGDIR/ncurses/base-files | while read line; do - if [ -f ${SRCPKGDESTDIR}/${line} ]; then - install -D -m644 ${SRCPKGDESTDIR}/${line} \ - ${DESTDIR}/${line} - rm -f ${SRCPKGDESTDIR}/${line} - fi - done -} diff --git a/srcpkgs/ncurses/ncurses-devel.template b/srcpkgs/ncurses/ncurses-devel.template deleted file mode 100644 index 60e31bb25e..0000000000 --- a/srcpkgs/ncurses/ncurses-devel.template +++ /dev/null @@ -1,22 +0,0 @@ -# Template file for 'ncurses-devel'. -# -depends="ncurses-libs>=${version}" -short_desc="${short_desc} -- development files" -replaces="ncursesw-devel>=0" - -do_install() { - mkdir -p ${DESTDIR}/usr/lib - mkdir -p ${DESTDIR}/usr/bin - mkdir -p ${DESTDIR}/usr/share/man/man1 - - mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr - mv ${SRCPKGDESTDIR}/usr/lib/*.a ${DESTDIR}/usr/lib - mv ${SRCPKGDESTDIR}/usr/share/man/man3 ${DESTDIR}/usr/share/man - mv ${SRCPKGDESTDIR}/usr/bin/ncursesw6-config ${DESTDIR}/usr/bin - ln -sf ../../usr/bin/ncursesw6-config \ - ${DESTDIR}/usr/bin/ncursesw5-config - ln -sf ../../usr/bin/ncursesw6-config \ - ${DESTDIR}/usr/bin/ncurses5-config - mv ${SRCPKGDESTDIR}/usr/share/man/man1/ncursesw6-config.1* \ - ${DESTDIR}/usr/share/man/man1 -} diff --git a/srcpkgs/ncurses/ncurses-libs.template b/srcpkgs/ncurses/ncurses-libs.template deleted file mode 100644 index e1ff321f26..0000000000 --- a/srcpkgs/ncurses/ncurses-libs.template +++ /dev/null @@ -1,9 +0,0 @@ -# Template file for 'ncurses-libs'. -# -short_desc="${short_desc} -- shared libraries" -replaces="ncursesw>=0" - -do_install() { - vmove "usr/lib/*.so*" usr/lib - chmod 755 ${DESTDIR}/usr/lib/*.so* -} diff --git a/srcpkgs/ncurses/ncurses-term.template b/srcpkgs/ncurses/ncurses-term.template deleted file mode 100644 index eafe042033..0000000000 --- a/srcpkgs/ncurses/ncurses-term.template +++ /dev/null @@ -1,12 +0,0 @@ -# Template file for 'ncurses-term'. -# -depends="ncurses-base>=${version}" -short_desc="${short_desc} -- full terminal descriptions" -noarch=yes - -do_install() { - mkdir -p ${DESTDIR}/usr/share - - mv ${SRCPKGDESTDIR}/usr/share/tabset ${DESTDIR}/usr/share - mv ${SRCPKGDESTDIR}/usr/share/terminfo ${DESTDIR}/usr/share -} diff --git a/srcpkgs/ncurses/template b/srcpkgs/ncurses/template index 16287f3935..a7db289629 100644 --- a/srcpkgs/ncurses/template +++ b/srcpkgs/ncurses/template @@ -17,12 +17,6 @@ long_desc=" ecompiler infocmp, clear, tput, tset, and a termcap conversion tool captoinfo. Full manual pages are provided for the library and tools." -if [ "$CROSS_BUILD" ]; then - subpackages="ncurses-devel ncurses-libs" -else - subpackages="ncurses-base ncurses-devel ncurses-libs ncurses-term" -fi - do_configure() { mkdir ncurses-build ncursesw-build cd ${wrksrc}/ncursesw-build @@ -84,4 +78,64 @@ do_install() { # Remove broken symlink. rm -f ${DESTDIR}/usr/lib/terminfo + + ln -sfr ${DESTDIR}/usr/bin/ncursesw6-config \ + ${DESTDIR}/usr/bin/ncursesw5-config + ln -sfr ${DESTDIR}/usr/bin/ncursesw6-config \ + ${DESTDIR}/usr/bin/ncurses5-config } + +ncurses_package() { + pkg_install() { + vmove usr/bin usr + vmove usr/share/man/man1 usr/share/man + } +} + +ncurses-base_package() { + short_desc+=" -- base terminfo files" + noarch=yes + + pkg_install() { + cat ${FILESDIR}/base-files | while read line; do + vmove ${line} $(dirname ${line}) + done + } +} + +ncurses-term_package() { + depends="ncurses-base>=${version}" + short_desc+=" -- full terminal descriptions" + noarch=yes + + pkg_install() { + vmove usr/share/tabset usr/share + vmove usr/share/terminfo usr/share + } +} + +if [ -z "$CROSS_BUILD" ]; then + +ncurses-libs_package() { + short_desc+=" -- shared libraries" + replaces="ncursesw>=0" + + pkg_install() { + vmove "usr/lib/*.so*" usr/lib + } +} + +ncurses-devel_package() { + depends="ncurses-libs>=${version}" + short_desc+=" -- development files" + replaces="ncursesw-devel>=0" + + pkg_install() { + vmove usr/include usr + vmove "usr/lib/*.a" usr/lib + vmove usr/share/man/man3 usr/share/man + vmove usr/share/man/man1/ncursesw6-config.1 usr/share/man/man1 + } +} + +fi