- Rerun autoconf because the standard configure doesn't know --bindir.
[fedora-mingw.git] / termcap / mingw32-termcap.spec
1 # Note: Termcap was deprecated and removed from Fedora after F-8.  It
2 # has been replaced by ncurses.  However ncurses cannot be compiled on
3 # Windows so we have to supply termcap.  In addition, the last stand-
4 # alone Fedora termcap package was actually just /etc/termcap from
5 # ncurses.  So here we are using the GNU termcap library which is
6 # regretably GPL'd.
7
8 %define __strip %{_mingw32_strip}
9 %define __objdump %{_mingw32_objdump}
10 %define _use_internal_dependency_generator 0
11 %define __find_requires %{_mingw32_findrequires}
12 %define __find_provides %{_mingw32_findprovides}
13
14 Name:           mingw32-termcap
15 Version:        1.3.1
16 Release:        4%{?dist}
17 Summary:        MinGW terminal feature database
18
19 License:        GPLv2+
20 Group:          Development/Libraries
21 URL:            ftp://ftp.gnu.org/gnu/termcap/
22 Source0:        ftp://ftp.gnu.org/gnu/termcap/termcap-%{version}.tar.gz
23 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24
25 BuildArch:      noarch
26
27 BuildRequires:  mingw32-filesystem >= 28
28 BuildRequires:  mingw32-gcc
29 BuildRequires:  mingw32-binutils
30
31 BuildRequires:  autoconf
32
33
34 %description
35 This is the GNU termcap library -- a library of C functions that
36 enable programs to send control strings to terminals in a way
37 independent of the terminal type.  The GNU termcap library does not
38 place an arbitrary limit on the size of termcap entries, unlike most
39 other termcap libraries.
40
41 This package contains libraries and development tools for the MinGW
42 cross-compiled version.
43
44
45 %prep
46 %setup -q -n termcap-%{version}
47
48 # Packaged script doesn't understand --bindir, so rebuild:
49 autoconf
50
51
52 %build
53 %{_mingw32_configure}
54 make
55
56 # Build a shared library.  No need for -fPIC on Windows.
57 %{_mingw32_cc} -shared \
58   -Wl,--out-implib,libtermcap.dll.a \
59   -o libtermcap-0.dll \
60   termcap.o tparam.o version.o
61
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65
66 make install \
67   prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} \
68   exec_prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} \
69   oldincludedir=
70
71 # Move the shared library to the correct locations.
72 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
73 install -m 0755 libtermcap-0.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
74 install -m 0755 libtermcap.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
75
76 # Don't want the static library, thank you.
77 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libtermcap.a
78
79 # Move the info files to the correct location.
80 mkdir -p $RPM_BUILD_ROOT%{_mingw32_infodir}
81 mv $RPM_BUILD_ROOT%{_mingw32_prefix}/info/* $RPM_BUILD_ROOT%{_mingw32_infodir}
82
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87
88 %files
89 %defattr(-,root,root)
90 %{_mingw32_bindir}/libtermcap-0.dll
91 %{_mingw32_libdir}/libtermcap.dll.a
92 %{_mingw32_includedir}/termcap.h
93 # Note that we want the info files in this package because
94 # there is no equivalent native Fedora package.
95 %{_mingw32_infodir}/*
96
97
98 %changelog
99 * Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-4
100 - Rerun autoconf because the standard configure doesn't know --bindir.
101 - Set exec_prefix during make install step.
102
103 * Fri Oct 31 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-3
104 - Fix so it builds a working DLL.
105
106 * Thu Sep 25 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-1
107 - Initial RPM release.