Name: mingw32-termcap
Version: 1.3.1
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: MinGW terminal feature database
License: GPLv2+
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
+BuildRequires: autoconf
+
%description
This is the GNU termcap library -- a library of C functions that
%prep
%setup -q -n termcap-%{version}
+# Packaged script doesn't understand --bindir, so rebuild:
+autoconf
+
%build
%{_mingw32_configure}
make
# Build a shared library. No need for -fPIC on Windows.
-%{_mingw32_cc} -shared -Wl,--out-implib,termcap.dll.a -o termcap.dll \
+%{_mingw32_cc} -shared \
+ -Wl,--out-implib,libtermcap.dll.a \
+ -o libtermcap-0.dll \
termcap.o tparam.o version.o
make install \
prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} \
+ exec_prefix=$RPM_BUILD_ROOT%{_mingw32_prefix} \
oldincludedir=
# Move the shared library to the correct locations.
mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
-mv termcap.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
-mv termcap.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
+install -m 0755 libtermcap-0.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
+install -m 0755 libtermcap.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
# Don't want the static library, thank you.
rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libtermcap.a
%files
%defattr(-,root,root)
-%{_mingw32_bindir}/termcap.dll
-%{_mingw32_libdir}/termcap.dll.a
-%{_mingw32_infodir}/*
+%{_mingw32_bindir}/libtermcap-0.dll
+%{_mingw32_libdir}/libtermcap.dll.a
%{_mingw32_includedir}/termcap.h
+# Note that we want the info files in this package because
+# there is no equivalent native Fedora package.
+%{_mingw32_infodir}/*
%changelog
+* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-4
+- Rerun autoconf because the standard configure doesn't know --bindir.
+- Set exec_prefix during make install step.
+
+* Fri Oct 31 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-3
+- Fix so it builds a working DLL.
+
* Thu Sep 25 2008 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-1
- Initial RPM release.