remove %abi macro and version checking 68/9668/1
authorAnas Nashif <anas.nashif@intel.com>
Wed, 4 Sep 2013 10:24:49 +0000 (06:24 -0400)
committerAnas Nashif <anas.nashif@intel.com>
Wed, 4 Sep 2013 12:28:25 +0000 (08:28 -0400)
Change-Id: I036c7b6a426c92f1232c470774f7c5bb520cc8e4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
packaging/ncurses.spec

index 1e7edba..3d47294 100644 (file)
@@ -37,7 +37,6 @@ Source1001:   ncurses.manifest
 %global         _miscdir    %{_datadir}/misc
 %global         _incdir     %{_includedir}
 %global         root        %{_tmppath}/%{name}-%{version}-store
-%global         abi         %(ver=%{version}; echo ${ver%.*})
 
 %description
 As soon as a text application needs to directly control its output to
@@ -80,7 +79,6 @@ This database is the official successor to the 4.4BSD termcap file and
 contains information about any known terminal. The ncurses library
 makes use of this database to use terminals correctly.
 
-%if %abi == 5
 
 %package -n libncurses
 Summary:        The New curses Libraries
@@ -95,18 +93,13 @@ Recommends:     ncurses-utils = %{version}
 The ncurses library is used by the most curses based terminal
 applications for controling its output and input to the screen.
 
-%endif
 
 %package -n libncurses6
 Summary:        The New curses Libraries
 License:        MIT
 Group:          Base/Libraries
 Requires:       terminfo-base
-%if %abi == 5
 Provides:       ncurses = 6.0
-%else
-Provides:       ncurses = %{version}
-%endif
 
 %description -n libncurses6 
 The ncurses library is used by the most curses based terminal
@@ -132,12 +125,8 @@ License:        MIT
 Group:          Base/Development
 Provides:       ncurses:%{_incdir}/ncurses.h
 Requires:       ncurses = %{version}-%{release}
-%if %abi >= 6
-Requires:       libncurses6 = %{version}-%{release}
-%else
 Requires:       libncurses = %{version}-%{release}
 Requires:       libncurses6 = %{version}-%{release}
-%endif
 
 %description -n ncurses-devel
 This package contains all necessary include files and libraries needed
@@ -268,19 +257,11 @@ rm -vf mk-dlls.sh
     --with-pkg-config \
        --enable-colorfgbg      \
        --enable-sp-funcs       \
-%if %abi >= 6
-       --with-pthread          \
-       --enable-reentrant      \
-       --enable-ext-mouse      \
-       --disable-widec         \
-       --enable-ext-colors     \
-%else
        --without-pthread       \
        --disable-reentrant     \
        --disable-ext-mouse     \
        --disable-widec         \
        --disable-ext-colors    \
-%endif
        --enable-weak-symbols   \
        --enable-wgetch-events  \
        --enable-pthreads-eintr \
@@ -346,7 +327,6 @@ export BUILD_TIC=$PWD/../progs/tic
     make install DESTDIR=%{root} includedir=${inc} libdir=${lib}
     ln -sf ${inc##*/}/{curses,ncurses,term,termcap}.h %{root}${inc%%/*}/
     sh %{S:6} --cflags "-I${inc}" --libs "-lncurses" --libs "-ltinfo" %{root}%{_bindir}/ncurses5-config
-%if %abi < 6
     #
     # Now use --with-pthread for reentrant pthread support (abi > 5).
     #
@@ -363,17 +343,12 @@ export BUILD_TIC=$PWD/../progs/tic
     pushd man
        sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
     popd
-%endif
     #
     # Now use --enable-widec for UTF8/wide character support.
     # The libs with 16 bit wide characters are binary incompatible
     # to the normal 8bit wide character libs.
     #
-%if %abi >= 6
-    eval ./${c#*./} --with-pthread --enable-reentrant --enable-ext-mouse --enable-widec --enable-ext-colors --without-progs
-%else
     eval ./${c#*./} --disable-ext-mouse --enable-widec --disable-ext-colors --without-progs
-%endif
     find -name fallback.o | xargs -r rm -vf
     cp fallback.c.backup ncurses/fallback.c
     make %{?_smp_mflags}
@@ -385,7 +360,6 @@ export BUILD_TIC=$PWD/../progs/tic
     pushd man
        sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1
     popd
-%if %abi < 6
     #
     # Do both --enable-widec and --with-pthread (abi > 5).
     #
@@ -401,7 +375,6 @@ export BUILD_TIC=$PWD/../progs/tic
     pushd man
        sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw6-config.1
     popd
-%endif
 
 %install
     GZIP="-9"
@@ -438,7 +411,6 @@ export BUILD_TIC=$PWD/../progs/tic
     chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
     chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
     chmod a-x  %{buildroot}/%{_libdir}/lib*.a
-%if %abi < 6
     if test -d %{buildroot}%{_libdir}/ncurses6 ; then
        mv %{buildroot}%{_libdir}/ncurses6/*.so.6*   %{buildroot}%{_libdir}/
        for lib in %{buildroot}%{_libdir}/ncurses6/*.so
@@ -486,7 +458,6 @@ export BUILD_TIC=$PWD/../progs/tic
        chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
        chmod a-x  %{buildroot}/%{_libdir}/ncurses6/lib*.a
     fi
-%endif
     test -n "%{buildroot}" || ldconfig -N
     mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
     bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2
@@ -564,12 +535,10 @@ export BUILD_TIC=$PWD/../progs/tic
        grep -v -F -x -f default.list \
        > extension.list
     rm -f %{buildroot}%{_prefix}/lib/terminfo
-%if %abi < 6
 
 %post   -n libncurses -p /sbin/ldconfig
 
 %postun -n libncurses -p /sbin/ldconfig
-%endif
 
 %post   -n libncurses6 -p /sbin/ldconfig
 
@@ -600,13 +569,11 @@ export BUILD_TIC=$PWD/../progs/tic
 %doc %{_mandir}/man1/tput.1.gz
 %doc %{_mandir}/man1/tset.1.gz
 %doc %{_mandir}/man5/*.gz
-%if %abi == 5
 
 %files -n libncurses
 %manifest %{name}.manifest
 %defattr(-,root,root)
 %{_libdir}/lib*.so.5*
-%endif
 
 %files -n libncurses6
 %manifest %{name}.manifest