[packages/bc-ispell] - initial: ispell built as library for BC linphone project
qboosh
qboosh at pld-linux.org
Mon Apr 1 08:31:41 CEST 2024
commit 465aac48a1d6be1c32e603288f5aad4a8e2dd225
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Apr 1 07:10:04 2024 +0200
- initial: ispell built as library for BC linphone project
bc-ispell.spec | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ispell-cmake.patch | 41 +++++++++++++++++++++++++++
ispell-config.patch | 17 +++++++++++
3 files changed, 140 insertions(+)
---
diff --git a/bc-ispell.spec b/bc-ispell.spec
new file mode 100644
index 0000000..48e417d
--- /dev/null
+++ b/bc-ispell.spec
@@ -0,0 +1,82 @@
+Summary: ISpell spell checker library
+Summary(pl.UTF-8): Biblioteka sprawdzania pisowni ISpell
+Name: bc-ispell
+Version: 0
+%define gitref 05574fe160222c3d0b6283c1433c9b087271fad1
+%define snap 20231108
+Release: 0.%{snap}.1
+License: LGPL v2+
+Group: Libraries
+#Source0Download: https://gitlab.linphone.org/BC/public/bcunit/tags
+Source0: https://gitlab.linphone.org/BC/public/external/ispell/-/archive/%{gitref}/ispell-%{snap}.tar.bz2
+# Source0-md5: 0a56f85ccfbfffad109d98e38ab27063
+Patch0: ispell-config.patch
+Patch1: ispell-cmake.patch
+URL: https://gitlab.linphone.org/BC/public/external/ispell
+BuildRequires: cmake >= 3.16
+BuildRequires: ncurses-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ISpell spell checker library.
+
+%description -l pl.UTF-8
+Biblioteka sprawdzania pisowni ISpell.
+
+%package devel
+Summary: Header files for ISpell library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ISpell
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for ISpell library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki ISpell.
+
+%prep
+%setup -q -n ispell-%{gitref}
+%patch0 -p1
+%patch1 -p1
+
+%{__sed} -i -e 's,/lib/,/%{_lib}/,' local.h.linux
+
+%build
+%cmake -B build \
+ -DENABLE_BCUNIT_AUTOMATED=ON \
+ -DENABLE_BCUNIT_BASIC=ON \
+ -DENABLE_BCUNIT_CONSOLE=ON \
+ -DENABLE_BCUNIT_CURSES=ON \
+ -DENABLE_BCUNIT_DOC=ON \
+ -DENABLE_BCUNIT_EXAMPLES=ON
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/ispell
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_includedir}/ISpell
+cp -p config.h defhash.h ispell.h libispell.h local.h $RPM_BUILD_ROOT%{_includedir}/ISpell
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES README WISHES
+%attr(755,root,root) %{_libdir}/libISpell.so
+# for dictionaries, shared with ispell
+%dir %{_libdir}/ispell
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/ISpell
+%{_datadir}/cmake/ISpell
diff --git a/ispell-cmake.patch b/ispell-cmake.patch
new file mode 100644
index 0000000..d47b077
--- /dev/null
+++ b/ispell-cmake.patch
@@ -0,0 +1,41 @@
+--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt.orig 2023-11-07 11:53:37.000000000 +0100
++++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/CMakeLists.txt 2024-03-28 20:53:45.068632010 +0100
+@@ -49,6 +49,26 @@ set(ISPELL_SOURCES
+
+ add_library(${ISPELL_TARGET_NAME} SHARED ${ISPELL_SOURCES})
+
++set(CMAKE_MODULES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${ISPELL_TARGET_NAME}")
++configure_package_config_file("${ISPELL_TARGET_NAME}Config.cmake.in" "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
++ INSTALL_DESTINATION "${CMAKE_MODULES_INSTALL_DIR}"
++ NO_SET_AND_CHECK_MACRO
++)
++write_basic_package_version_file("${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
++ VERSION ${PROJECT_VERSION}
++ COMPATIBILITY AnyNewerVersion
++)
++install(FILES
++ "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}Config.cmake"
++ "${PROJECT_BINARY_DIR}/${ISPELL_TARGET_NAME}ConfigVersion.cmake"
++ DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
++)
++
++install(EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
++ FILE "${ISPELL_TARGET_NAME}LibraryDepends.cmake"
++ DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
++)
++
+ install(TARGETS ${ISPELL_TARGET_NAME}
+ EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in.orig 2023-11-07 11:53:37.000000000 +0100
++++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/ISpellConfig.cmake.in 2024-03-28 21:54:40.692161132 +0100
+@@ -12,7 +12,7 @@ set(ISPELL_LIBRARIES "@ISPELL_TARGET_NAM
+ get_target_property(ISPELL_INCLUDE_DIRS "@ISPELL_TARGET_NAME@" INTERFACE_INCLUDE_DIRECTORIES)
+
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18.0)
+- add_library(@ISpell_TARGET_NAME@::@ISpell_TARGET_NAME@ ALIAS @ISpell_TARGET_NAME@)
++ add_library(@ISPELL_TARGET_NAME@::@ISPELL_TARGET_NAME@ ALIAS @ISPELL_TARGET_NAME@)
+ endif()
+
+-check_required_components(@ISpell_TARGET_NAME@)
++check_required_components(@ISPELL_TARGET_NAME@)
diff --git a/ispell-config.patch b/ispell-config.patch
new file mode 100644
index 0000000..f2461c8
--- /dev/null
+++ b/ispell-config.patch
@@ -0,0 +1,17 @@
+--- ispell-05574fe160222c3d0b6283c1433c9b087271fad1/local.h.linux.orig 2023-11-07 11:53:37.000000000 +0100
++++ ispell-05574fe160222c3d0b6283c1433c9b087271fad1/local.h.linux 2024-03-28 20:44:44.701559430 +0100
+@@ -76,10 +76,10 @@
+ * MAN45EXT (but not if you keep the man pages in section 5 and just
+ * store them in a different place).
+ */
+-#define BINDIR "/usr/local/bin"
+-#define LIBDIR "/usr/local/ispell_dictionaries"
+-#define MAN1DIR "/usr/local/man/man1"
+-#define MAN45DIR "/usr/local/man/man5"
++#define BINDIR "/usr/bin"
++#define LIBDIR "/usr/lib/ispell"
++#define MAN1DIR "/usr/share/man/man1"
++#define MAN45DIR "/usr/share/man/man5"
+ #define MAN45EXT ".5"
+ #define DEFHASH "en.hash"
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bc-ispell.git/commitdiff/465aac48a1d6be1c32e603288f5aad4a8e2dd225
More information about the pld-cvs-commit
mailing list