Mageia Bugzilla – Attachment 14183 Details for
Bug 32568
mingw-termcap - consider adding a pkgconfig capability.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
proposed mingw-termcap spec file
mingw-termcap.spec (text/plain), 5.71 KB, created by
Aurelian R
on 2023-11-25 14:09:38 CET
(
hide
)
Description:
proposed mingw-termcap spec file
Filename:
MIME Type:
Creator:
Aurelian R
Created:
2023-11-25 14:09:38 CET
Size:
5.71 KB
patch
obsolete
># Note: Termcap was deprecated and removed from Fedora after F-8. It ># has been replaced by ncurses. However ncurses cannot be compiled on ># Windows so we have to supply termcap. In addition, the last stand- ># alone Fedora termcap package was actually just /etc/termcap from ># ncurses. So here we are using the GNU termcap library which is ># regretably GPL'd. > >%?mingw_package_header > >%global mingw_build_win32 1 >%global mingw_build_win64 1 > >Name: mingw-termcap >Version: 1.3.1 >Release: %mkrel 24 >Summary: MinGW terminal feature database > >License: GPLv2+ >Group: Development/Other >URL: https://ftp.gnu.org/gnu/termcap/ >Source0: https://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz >Source1: termcap.pc.in > >BuildArch: noarch > >BuildRequires: mingw32-filesystem >= 95 >BuildRequires: mingw32-gcc >BuildRequires: mingw32-binutils > >BuildRequires: mingw64-filesystem >= 95 >BuildRequires: mingw64-gcc >BuildRequires: mingw64-binutils > >BuildRequires: autoconf > > >%description >This is the GNU termcap library -- a library of C functions that >enable programs to send control strings to terminals in a way >independent of the terminal type. The GNU termcap library does not >place an arbitrary limit on the size of termcap entries, unlike most >other termcap libraries. > >This package contains libraries and development tools for the MinGW >cross-compiled version. > > ># Win32 >%package -n mingw32-termcap >Summary: MinGW terminal feature database > >%description -n mingw32-termcap >This is the GNU termcap library -- a library of C functions that >enable programs to send control strings to terminals in a way >independent of the terminal type. The GNU termcap library does not >place an arbitrary limit on the size of termcap entries, unlike most >other termcap libraries. > >This package contains libraries and development tools for the MinGW >cross-compiled version. > >%package -n mingw32-termcap-static >Summary: Static version of the cross compiled termcap library >Requires: mingw32-termcap = %{version}-%{release} > >%description -n mingw32-termcap-static >Static version of the cross compiled termcap library. > ># Win64 >%package -n mingw64-termcap >Summary: MinGW terminal feature database > >%description -n mingw64-termcap >This is the GNU termcap library -- a library of C functions that >enable programs to send control strings to terminals in a way >independent of the terminal type. The GNU termcap library does not >place an arbitrary limit on the size of termcap entries, unlike most >other termcap libraries. > >This package contains libraries and development tools for the MinGW >cross-compiled version. > >%package -n mingw64-termcap-static >Summary: Static version of the cross compiled termcap library >Requires: mingw64-termcap = %{version}-%{release} > >%description -n mingw64-termcap-static >Static version of the cross compiled termcap library. > > >%?mingw_debug_package > > >%prep >%setup -q -n termcap-%{version} > ># Packaged script doesn't understand --bindir, so rebuild: >autoconf > > >%build >%mingw_configure >%mingw_make %{?_smp_mflags} > ># Build a shared library. No need for -fPIC on Windows. >pushd build_win32 >%{mingw32_cc} -shared \ > -Wl,--out-implib,libtermcap.dll.a \ > -o libtermcap-0.dll \ > termcap.o tparam.o version.o >popd >pushd build_win64 >%{mingw64_cc} -shared \ > -Wl,--out-implib,libtermcap.dll.a \ > -o libtermcap-0.dll \ > termcap.o tparam.o version.o >popd > > >%install ># We can't use the %%mingw_make_install macro here as ># the Makefile doesn't support the DESTDIR=... flag >make install -C build_win32 \ > prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \ > exec_prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \ > oldincludedir= >make install -C build_win64 \ > prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \ > exec_prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \ > oldincludedir= > ># Move the shared library to the correct locations. >mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir} >install -m 0755 build_win32/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw32_bindir} >install -m 0755 build_win32/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw32_libdir} > >mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir} >install -m 0755 build_win64/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw64_bindir} >install -m 0755 build_win64/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw64_libdir} > ># Move the info files to the correct location. >mkdir -p $RPM_BUILD_ROOT%{mingw32_infodir} >mv $RPM_BUILD_ROOT%{mingw32_prefix}/info/* $RPM_BUILD_ROOT%{mingw32_infodir} > >mkdir -p $RPM_BUILD_ROOT%{mingw64_infodir} >mv $RPM_BUILD_ROOT%{mingw64_prefix}/info/* $RPM_BUILD_ROOT%{mingw64_infodir} > ># Generate package config file. >install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc >sed -i 's|prefix=.*|prefix=%{mingw32_prefix}|' $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc >sed -i 's|Version:.*|Version: %{version}|' $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc > >install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc >sed -i 's|prefix=.*|prefix=%{mingw64_prefix}|' $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc >sed -i 's|Version:.*|Version: %{version}|' $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc > > >%files -n mingw32-termcap >%doc COPYING >%{mingw32_bindir}/libtermcap-0.dll >%{mingw32_libdir}/libtermcap.dll.a >%{mingw32_libdir}/pkgconfig/termcap.pc >%{mingw32_includedir}/termcap.h ># Note that we want the info files in this package because ># there is no equivalent native Fedora package. >%{mingw32_infodir}/* > >%files -n mingw32-termcap-static >%{mingw32_libdir}/libtermcap.a > >%files -n mingw64-termcap >%doc COPYING >%{mingw64_bindir}/libtermcap-0.dll >%{mingw64_libdir}/libtermcap.dll.a >%{mingw64_libdir}/pkgconfig/termcap.pc >%{mingw64_includedir}/termcap.h >%{mingw64_infodir}/* > >%files -n mingw64-termcap-static >%{mingw64_libdir}/libtermcap.a > >
# Note: Termcap was deprecated and removed from Fedora after F-8. It # has been replaced by ncurses. However ncurses cannot be compiled on # Windows so we have to supply termcap. In addition, the last stand- # alone Fedora termcap package was actually just /etc/termcap from # ncurses. So here we are using the GNU termcap library which is # regretably GPL'd. %?mingw_package_header %global mingw_build_win32 1 %global mingw_build_win64 1 Name: mingw-termcap Version: 1.3.1 Release: %mkrel 24 Summary: MinGW terminal feature database License: GPLv2+ Group: Development/Other URL: https://ftp.gnu.org/gnu/termcap/ Source0: https://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz Source1: termcap.pc.in BuildArch: noarch BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-gcc BuildRequires: mingw64-binutils BuildRequires: autoconf %description This is the GNU termcap library -- a library of C functions that enable programs to send control strings to terminals in a way independent of the terminal type. The GNU termcap library does not place an arbitrary limit on the size of termcap entries, unlike most other termcap libraries. This package contains libraries and development tools for the MinGW cross-compiled version. # Win32 %package -n mingw32-termcap Summary: MinGW terminal feature database %description -n mingw32-termcap This is the GNU termcap library -- a library of C functions that enable programs to send control strings to terminals in a way independent of the terminal type. The GNU termcap library does not place an arbitrary limit on the size of termcap entries, unlike most other termcap libraries. This package contains libraries and development tools for the MinGW cross-compiled version. %package -n mingw32-termcap-static Summary: Static version of the cross compiled termcap library Requires: mingw32-termcap = %{version}-%{release} %description -n mingw32-termcap-static Static version of the cross compiled termcap library. # Win64 %package -n mingw64-termcap Summary: MinGW terminal feature database %description -n mingw64-termcap This is the GNU termcap library -- a library of C functions that enable programs to send control strings to terminals in a way independent of the terminal type. The GNU termcap library does not place an arbitrary limit on the size of termcap entries, unlike most other termcap libraries. This package contains libraries and development tools for the MinGW cross-compiled version. %package -n mingw64-termcap-static Summary: Static version of the cross compiled termcap library Requires: mingw64-termcap = %{version}-%{release} %description -n mingw64-termcap-static Static version of the cross compiled termcap library. %?mingw_debug_package %prep %setup -q -n termcap-%{version} # Packaged script doesn't understand --bindir, so rebuild: autoconf %build %mingw_configure %mingw_make %{?_smp_mflags} # Build a shared library. No need for -fPIC on Windows. pushd build_win32 %{mingw32_cc} -shared \ -Wl,--out-implib,libtermcap.dll.a \ -o libtermcap-0.dll \ termcap.o tparam.o version.o popd pushd build_win64 %{mingw64_cc} -shared \ -Wl,--out-implib,libtermcap.dll.a \ -o libtermcap-0.dll \ termcap.o tparam.o version.o popd %install # We can't use the %%mingw_make_install macro here as # the Makefile doesn't support the DESTDIR=... flag make install -C build_win32 \ prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \ exec_prefix=$RPM_BUILD_ROOT%{mingw32_prefix} \ oldincludedir= make install -C build_win64 \ prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \ exec_prefix=$RPM_BUILD_ROOT%{mingw64_prefix} \ oldincludedir= # Move the shared library to the correct locations. mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir} install -m 0755 build_win32/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw32_bindir} install -m 0755 build_win32/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw32_libdir} mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir} install -m 0755 build_win64/libtermcap-0.dll $RPM_BUILD_ROOT%{mingw64_bindir} install -m 0755 build_win64/libtermcap.dll.a $RPM_BUILD_ROOT%{mingw64_libdir} # Move the info files to the correct location. mkdir -p $RPM_BUILD_ROOT%{mingw32_infodir} mv $RPM_BUILD_ROOT%{mingw32_prefix}/info/* $RPM_BUILD_ROOT%{mingw32_infodir} mkdir -p $RPM_BUILD_ROOT%{mingw64_infodir} mv $RPM_BUILD_ROOT%{mingw64_prefix}/info/* $RPM_BUILD_ROOT%{mingw64_infodir} # Generate package config file. install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc sed -i 's|prefix=.*|prefix=%{mingw32_prefix}|' $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc sed -i 's|Version:.*|Version: %{version}|' $RPM_BUILD_ROOT%{mingw32_libdir}/pkgconfig/termcap.pc install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc sed -i 's|prefix=.*|prefix=%{mingw64_prefix}|' $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc sed -i 's|Version:.*|Version: %{version}|' $RPM_BUILD_ROOT%{mingw64_libdir}/pkgconfig/termcap.pc %files -n mingw32-termcap %doc COPYING %{mingw32_bindir}/libtermcap-0.dll %{mingw32_libdir}/libtermcap.dll.a %{mingw32_libdir}/pkgconfig/termcap.pc %{mingw32_includedir}/termcap.h # Note that we want the info files in this package because # there is no equivalent native Fedora package. %{mingw32_infodir}/* %files -n mingw32-termcap-static %{mingw32_libdir}/libtermcap.a %files -n mingw64-termcap %doc COPYING %{mingw64_bindir}/libtermcap-0.dll %{mingw64_libdir}/libtermcap.dll.a %{mingw64_libdir}/pkgconfig/termcap.pc %{mingw64_includedir}/termcap.h %{mingw64_infodir}/* %files -n mingw64-termcap-static %{mingw64_libdir}/libtermcap.a
View Attachment As Raw
Actions:
View
Attachments on
bug 32568
:
14182
| 14183 |
14186