Add mingw subpackages
This commit is contained in:
parent
5f733d8e32
commit
f735b0f3b5
14
nuspell-dllver.patch
Normal file
14
nuspell-dllver.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -rupN --no-dereference nuspell-5.1.0/src/nuspell/CMakeLists.txt nuspell-5.1.0-new/src/nuspell/CMakeLists.txt
|
||||
--- nuspell-5.1.0/src/nuspell/CMakeLists.txt 2022-02-15 16:12:01.000000000 +0100
|
||||
+++ nuspell-5.1.0-new/src/nuspell/CMakeLists.txt 2022-08-04 23:36:06.613462669 +0200
|
||||
@@ -22,6 +22,10 @@ set_target_properties(nuspell PROPERTIES
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
+if(MINGW)
|
||||
+ set_target_properties(nuspell PROPERTIES SUFFIX "-${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+endif(MINGW)
|
||||
+
|
||||
target_compile_features(nuspell PUBLIC cxx_std_17)
|
||||
|
||||
target_include_directories(nuspell
|
118
nuspell.spec
118
nuspell.spec
@ -1,63 +1,135 @@
|
||||
Name: nuspell
|
||||
Version: 5.1.0
|
||||
Release: 2%{?dist}
|
||||
Summary: Fast and safe spellchecking C++ library and command-line tool
|
||||
License: LGPLv3+
|
||||
URL: https://nuspell.github.io
|
||||
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: catch-devel
|
||||
Requires: hunspell-en-US
|
||||
Name: nuspell
|
||||
Version: 5.1.0
|
||||
Release: 3%{?dist}
|
||||
Summary: Fast and safe spellchecking C++ library and command-line tool
|
||||
License: LGPLv3+
|
||||
URL: https://nuspell.github.io
|
||||
Source0: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Add DLL version suffix
|
||||
Patch0: nuspell-dllver.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: pandoc
|
||||
BuildRequires: catch-devel
|
||||
|
||||
BuildRequires: mingw32-filesystem
|
||||
BuildRequires: mingw32-dlfcn
|
||||
BuildRequires: mingw32-gcc-c++
|
||||
BuildRequires: mingw32-icu
|
||||
|
||||
BuildRequires: mingw64-filesystem
|
||||
BuildRequires: mingw64-dlfcn
|
||||
BuildRequires: mingw64-gcc-c++
|
||||
BuildRequires: mingw64-icu
|
||||
|
||||
Requires: hunspell-en-US
|
||||
|
||||
%description
|
||||
Nuspell is a fast and safe spelling checker software program. It is designed \
|
||||
for languages with rich morphology and complex word compounding. Nuspell is \
|
||||
written in modern C++ and it supports Hunspell dictionaries.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development tools for %{name}
|
||||
Requires: libicu-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Summary: Development tools for %{name}
|
||||
Requires: libicu-devel
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains the header files and developer docs for \
|
||||
%{name}.
|
||||
|
||||
|
||||
%package -n mingw32-%{name}
|
||||
Summary: MinGW Windows %{name} library
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n mingw32-%{name}
|
||||
MinGW Windows %{pkgname} library.
|
||||
|
||||
|
||||
%package -n mingw64-%{name}
|
||||
Summary: MinGW Windows %{name} library
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n mingw64-%{name}
|
||||
MinGW Windows %{name} library.
|
||||
|
||||
|
||||
%{?mingw_debug_package}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%cmake -DCMAKE_BUILD_TYPE=Release
|
||||
%cmake_build
|
||||
|
||||
%mingw_cmake
|
||||
%mingw_make_build
|
||||
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
%mingw_make_install
|
||||
|
||||
# Drop docs from mingw packages
|
||||
rm -rf %{buildroot}%{mingw32_docdir}/%{name}
|
||||
rm -rf %{buildroot}%{mingw64_docdir}/%{name}
|
||||
|
||||
%mingw_debug_install_post
|
||||
|
||||
|
||||
%check
|
||||
%ctest
|
||||
|
||||
|
||||
%files
|
||||
%{_bindir}/%{name}
|
||||
%{_libdir}/*.so.5*
|
||||
%license COPYING COPYING.LESSER
|
||||
%doc AUTHORS CHANGELOG.md README.md
|
||||
%license COPYING COPYING.LESSER
|
||||
%{_bindir}/%{name}
|
||||
%{_libdir}/lib%{name}.so.5*
|
||||
|
||||
%files devel
|
||||
%doc %{_docdir}/nuspell/
|
||||
%{_includedir}/%{name}/
|
||||
%{_libdir}/cmake/%{name}/
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/lib%{name}.so
|
||||
|
||||
%files -n mingw32-%{name}
|
||||
%license COPYING COPYING.LESSER
|
||||
%{mingw32_bindir}/%{name}.exe
|
||||
%{mingw32_bindir}/lib%{name}-5.dll
|
||||
%{mingw32_includedir}/%{name}/
|
||||
%{mingw32_libdir}/cmake/%{name}/
|
||||
%{mingw32_libdir}/pkgconfig/%{name}.pc
|
||||
%{mingw32_libdir}/lib%{name}.dll.a
|
||||
|
||||
|
||||
%files -n mingw64-%{name}
|
||||
%license COPYING COPYING.LESSER
|
||||
%{mingw64_bindir}/%{name}.exe
|
||||
%{mingw64_bindir}/lib%{name}-5.dll
|
||||
%{mingw64_includedir}/%{name}/
|
||||
%{mingw64_libdir}/cmake/%{name}/
|
||||
%{mingw64_libdir}/pkgconfig/%{name}.pc
|
||||
%{mingw64_libdir}/lib%{name}.dll.a
|
||||
|
||||
%doc %{_docdir}/nuspell/
|
||||
|
||||
%changelog
|
||||
* Thu Aug 04 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-3
|
||||
- Add mingw subpackages
|
||||
|
||||
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 5.1.0-2
|
||||
- Rebuilt for ICU 71.1
|
||||
|
||||
* Sun Apr 17 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-1
|
||||
* Sun Jul 31 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-1
|
||||
- Update to 5.1.0
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-3
|
||||
|
Loading…
Reference in New Issue
Block a user