Blob Blame History Raw
%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%define __debug_install_post %{_mingw32_debug_install_post}

Name:           mingw-ftplib
Version:        3.1
Release:        7%{?dist}
Summary:        MinGW Library of FTP routines

License:        LGPLv2+
Group:          Development/Libraries
URL:            http://nbpfaus.net/~pfau/ftplib/
Source0:        http://nbpfaus.net/~pfau/ftplib/ftplib-%{version}-1.tar.gz
Source1:        ftplib-rc.rc
Source2:        mingw-ftplib-COPYING
Patch0:         ftplib-3.1-1-modernize.patch
Patch1:         ftplib-3.1-1-mingw.patch

BuildArch:      noarch

BuildRequires:  mingw32-filesystem >= 68
BuildRequires:  mingw32-gcc
BuildRequires:  mingw32-binutils
BuildRequires:  autoconf, automake, libtool


%description
ftplib is a set of routines that implement the FTP protocol. They allow
applications to create and access remote files through function calls
instead of needing to fork and exec an interactive ftp client program.
This library is cross-compiled for MinGW.


%package -n mingw32-ftplib
Summary:        MinGW Library of FTP routines


%description -n mingw32-ftplib
ftplib is a set of routines that implement the FTP protocol. They allow
applications to create and access remote files through function calls
instead of needing to fork and exec an interactive ftp client program.
This library is cross-compiled for MinGW.


%{?_mingw32_debug_package}


%prep
%setup -q -n ftplib-%{version}-1
%patch0 -p1
%patch1 -p1
cp -p %{SOURCE1} src/


%build
cd src/
%{_mingw32_env}
make libftp.dll


%install
mkdir -p $RPM_BUILD_ROOT/%{_mingw32_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mingw32_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_mingw32_includedir}
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
cp -p %{SOURCE2} ./COPYING
cd src/
cp -p libftp.dll $RPM_BUILD_ROOT/%{_mingw32_bindir}
cp -p libftp.dll.a $RPM_BUILD_ROOT/%{_mingw32_libdir}
cp -p ftplib.h $RPM_BUILD_ROOT/%{_mingw32_includedir}


%files -n mingw32-ftplib
%doc COPYING
# Docs are provided by native package
%{_mingw32_bindir}/libftp.dll
%{_mingw32_libdir}/libftp.dll.a
%{_mingw32_includedir}/ftplib.h


%changelog
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 3.1-5
- Rebuild against the mingw-w64 toolchain

* Thu Feb  9 2012 Michael Cronenworth <mike@cchtml.com> - 3.1-4
- Add COPYING file.

* Mon Jan 30 2012 Michael Cronenworth <mike@cchtml.com> - 3.1-3
- Update patch to work across arches.

* Fri Dec  2 2011 Michael Cronenworth <mike@cchtml.com> - 3.1-2
- Updated to new packaging policy.

* Wed Nov 23 2011 Michael Cronenworth <mike@cchtml.com> - 3.1-1
- Initial RPM release.