From dc13873bcf33f3a265e16a85e0d534359b75d29c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:54:46 +0100 Subject: [PATCH] install symlink libtermcap.so.2 [release 2.0.8-6mamba;Fri Mar 04 2011] --- README.md | 3 ++ libtermcap.spec | 86 +++++++++++++++++++++++++++++++++++++ termcap-fix-glibc-2.2.patch | 12 ++++++ 3 files changed, 101 insertions(+) create mode 100644 libtermcap.spec create mode 100644 termcap-fix-glibc-2.2.patch diff --git a/README.md b/README.md index 7f7e697..dc2ad77 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # libtermcap +The libtermcap package contains a basic system library needed to access the termcap database. +The termcap library supports easy access to the termcap database, so that programs can output character-based displays in a terminal-independent manner. + diff --git a/libtermcap.spec b/libtermcap.spec new file mode 100644 index 0000000..bf6d440 --- /dev/null +++ b/libtermcap.spec @@ -0,0 +1,86 @@ +Name: libtermcap +Version: 2.0.8 +Release: 6mamba +Summary: A basic system library for accessing the termcap database +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: ftp://metalab.unc.edu/pub/Linux/GCC/ +Source: termcap-%{version}.tar.gz +Patch: termcap-fix-glibc-2.2.patch.bz2 +License: LGPL +BuildRoot: %{_tmppath}/%{name}-%{version}-root +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END + +%description +The libtermcap package contains a basic system library needed to access the termcap database. +The termcap library supports easy access to the termcap database, so that programs can output character-based displays in a terminal-independent manner. + +%package devel +Summary: Development tools for programs which will access the termcap database +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package includes the libraries and header files necessary for developing programs which will access the termcap database. + +If you need to develop programs which will access the termcap database, you'll need to install this package. +You'll also need to install the libtermcap package. + +%prep +%setup -q -n termcap-%{version} +%patch0 -p0 +sed -i "s|/lib\([^[:alpha:]]*\)|/%_lib\1|g" Makefile + +%build +%make CC=%{_target_platform}-gcc + +sed -i "s|ldconfig;|true;|" Makefile + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}%{_libdir} +install -d %{buildroot}%{_includedir} +%makeoldinstall OWNER=`id -u`.`id -g` CC=%{_target_platform}-gcc +ln -sf %{name}.so.%{version} %{buildroot}%{_libdir}/%{name}.so +ln -sf %{name}.so.%{version} %{buildroot}%{_libdir}/%{name}.so.2 + +rm -f %{buildroot}%{_includedir}/termcap.h + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%attr(-,bin,bin) %{_libdir}/libtermcap.so.* + +%files devel +%defattr(-,root,root) +%{_libdir}/libtermcap.a +%{_libdir}/libtermcap.so + +%changelog +* Fri Mar 04 2011 Silvan Calarco 2.0.8-6mamba +- install symlink libtermcap.so.2 + +* Wed Jun 18 2008 Tiziana Ferro 2.0.8-5mamba +- update Vendor, Distribution and Packager +- add buildrequirements + +* Wed May 24 2006 Davide Madrisan 2.0.8-4qilnx +- fixed package group + +* Fri Oct 21 2005 Stefano Cotta Ramusino 2.0.8-3qilnx +- termcap header removed because confict with libncurses-devel + +* Tue Oct 19 2004 Silvan Calarco 2.0.8-2qilnx +- rebuilt (binary RPMs were missing) + +* Tue Apr 29 2003 Mirko Cortillaro 2.0.8-qilnx +- write a spec file for libtermcap diff --git a/termcap-fix-glibc-2.2.patch b/termcap-fix-glibc-2.2.patch new file mode 100644 index 0000000..c48c126 --- /dev/null +++ b/termcap-fix-glibc-2.2.patch @@ -0,0 +1,12 @@ +--- ./tparam.c.gege Fri Oct 27 18:27:15 2000 ++++ ./tparam.c Fri Oct 27 18:28:11 2000 +@@ -24,9 +24,6 @@ + #undef STDC_HEADERS + #define STDC_HEADERS + #define HAVE_UNISTD_H +-#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +-#define bcopy(s, d, n) memcpy ((d), (s), (n)) +-#endif + #endif + + #ifdef STDC_HEADERS