Blob Blame History Raw
%{?mingw_package_header}

%global _pkg_name sword

Summary:	MinGW build of a cross-platform scripture text library
Name:		mingw-%{_pkg_name}
Version:	1.7.4
Release:	2%{?dist}
License:	GPLv2
Group:		Development/System
URL:		http://www.crosswire.org/sword
Source0:	http://crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-%{version}.tar.gz
BuildRequires:	cmake 
BuildRequires:	mingw32-zlib mingw64-zlib
BuildRequires:	mingw32-clucene mingw64-clucene
BuildRequires:	mingw32-glib2 mingw64-glib2
BuildRequires:	mingw32-curl mingw64-curl
BuildRequires:	mingw32-icu mingw64-icu
BuildRequires:	mingw32-libgnurx mingw64-libgnurx
BuildRequires:	mingw32-filesystem >= 95
BuildRequires:	mingw64-filesystem >= 95
%if 0%{?fedora} >= 20
BuildRequires:  mingw32-winpthreads mingw64-winpthreads
%endif

BuildArch:	noarch

## upstreamable patches
Patch0: xiphos_sword.patch

%description
SWORD is a cross-platform C++ library for storage, retrieval, conversion, and
search of texts with an emphasis on Biblical texts, commentaries, and related
works.

%package -n mingw32-%{_pkg_name}
Summary:	%{summary}

%description -n mingw32-%{_pkg_name}
SWORD is a cross-platform C++ library for storage, retrieval, conversion, and
search of texts with an emphasis on Biblical texts, commentaries, and related
works.

%package -n mingw64-%{_pkg_name}
Summary:	%{summary}

%description -n mingw64-%{_pkg_name}
SWORD is a cross-platform C++ library for storage, retrieval, conversion, and
search of texts with an emphasis on Biblical texts, commentaries, and related
works.

%{?mingw_debug_package}


%prep
%setup -qn %{_pkg_name}-%{version}

%patch0 -p1 -b .xiphos

%build
MINGW64_CXXFLAGS="${MINGW64_CXXFLAGS} -fpermissive -Wint-to-pointer-cast -D_ICUSWORD_"
MINGW32_CXXFLAGS="${MINGW32_CXXFLAGS} -D_ICUSWORD_"
export MINGW64_CXXFLAGS MINGW32_CXXFLAGS

MINGW32_CMAKE_ARGS=-DICU_CONFIG_BIN_PATH=%{mingw32_bindir}

MINGW64_CMAKE_ARGS=-DICU_CONFIG_BIN_PATH=%{mingw64_bindir}

%mingw_cmake -DLIBSWORD_LIBRARY_TYPE=Shared \
	-DSWORD_BUILD_EXAMPLES="Yes" \
	-DCMAKE_BUILD_TYPE="Debug" \
	-DICU_CONFIG_OPTS="--noverify" \
	-DCROSS_COMPILE_MINGW32=TRUE

%mingw_make %{?_smp_mflags}


%install
%mingw_make install DESTDIR=$RPM_BUILD_ROOT

%files -n mingw32-%{_pkg_name}
%doc AUTHORS ChangeLog COPYING LICENSE
%{mingw32_libdir}/libsword.dll.a
%{mingw32_bindir}/libsword.dll
%{mingw32_bindir}/addld.exe
%{mingw32_bindir}/diatheke.exe
%{mingw32_bindir}/imp2gbs.exe
%{mingw32_bindir}/imp2ld.exe
%{mingw32_bindir}/imp2vs.exe
%{mingw32_bindir}/installmgr.exe
%{mingw32_bindir}/mkfastmod.exe
%{mingw32_bindir}/mod2imp.exe
%{mingw32_bindir}/mod2osis.exe
%{mingw32_bindir}/mod2vpl.exe
%{mingw32_bindir}/mod2zmod.exe
%{mingw32_bindir}/osis2mod.exe
%{mingw32_bindir}/tei2mod.exe
%{mingw32_bindir}/vpl2mod.exe
%{mingw32_bindir}/vs2osisref.exe
%{mingw32_bindir}/vs2osisreftxt.exe
%{mingw32_bindir}/xml2gbs.exe
%{mingw32_bindir}/emptyvss.exe
%{mingw32_libdir}/pkgconfig/sword.pc
%{mingw32_includedir}/sword/
%{mingw32_datadir}/sword/
%{mingw32_sysconfdir}/sword.conf

%files -n mingw64-%{_pkg_name}
%doc AUTHORS ChangeLog COPYING LICENSE
%{mingw64_libdir}/libsword.dll.a
%{mingw64_bindir}/libsword.dll
%{mingw64_bindir}/addld.exe
%{mingw64_bindir}/diatheke.exe
%{mingw64_bindir}/imp2gbs.exe
%{mingw64_bindir}/imp2ld.exe
%{mingw64_bindir}/imp2vs.exe
%{mingw64_bindir}/installmgr.exe
%{mingw64_bindir}/mkfastmod.exe
%{mingw64_bindir}/mod2imp.exe
%{mingw64_bindir}/mod2osis.exe
%{mingw64_bindir}/mod2vpl.exe
%{mingw64_bindir}/mod2zmod.exe
%{mingw64_bindir}/osis2mod.exe
%{mingw64_bindir}/tei2mod.exe
%{mingw64_bindir}/vpl2mod.exe
%{mingw64_bindir}/vs2osisref.exe
%{mingw64_bindir}/vs2osisreftxt.exe
%{mingw64_bindir}/xml2gbs.exe
%{mingw64_bindir}/emptyvss.exe
%{mingw64_libdir}/pkgconfig/sword.pc
%{mingw64_includedir}/sword/
%{mingw64_datadir}/sword/
%{mingw64_sysconfdir}/sword.conf

%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jan 26 2015 Greg Hellings <greg.hellings@gmail.com> 1.7.4-1
- New upstream version
- Update Xiphos patch
- Take ownership of share dir
- Add emptyvss.exe and sword.conf to installed files

* Sun Nov 23 2014 Greg Hellings <greg.hellings@gmail.com> 1.7.3-2
- Added some improved rendering through a patch to osisxhtml.cpp

* Tue May 06 2014 Greg Hellings <greg.hellings@gmail.com> 1.7.3-1
- Final upstream 1.7.3 release
- Removed Xiphos patch because of breakages

* Wed Apr 30 2014 Greg Hellings <greg.hellings@gmail.com> 1.7.3-0.1
- Upstream alpha2 release

* Mon Jan 13 2014 Greg Hellings <greg.hellings@gmail.com> 1.7.2-1
- New upstream release

* Tue Dec 31 2013 Greg Hellings <greg.hellings@gmail.com> 1.7.1-1
- New upstream release

* Sat Dec 14 2013 Greg Hellings <greg.hellings@gmail.com> 1.7.0-2
- New upstream release

* Wed Jul 17 2013 Greg Hellings <greg.hellings@gmail.com> 1.6.2+svn2908
- Update to latest upstream commits

* Sat Jan 26 2013 Greg Hellings <greg.hellings@gmail.com> 1.6.2+svn2778
- Updated to latest upstream commits

* Fri Nov 16 2012 Greg Hellings <greg.hellings@gmail.com> 1.6.2+sv2746
- New upstream release
- Add glib build dependency
- Remove pthread build dependency
- Added locales directory, pkg-config file, and application .exe files

* Tue Oct 23 2012 Greg Hellings <greg.hellings@gmail.com> 1.6.2+svn2741
- Initial package for MinGW.