Compare commits

..

No commits in common. "rawhide" and "f38" have entirely different histories.

9 changed files with 36 additions and 228 deletions

View file

@ -1 +0,0 @@
1

View file

@ -1,3 +0,0 @@
Files under the CMake directory originate from code licensed under the BSD-3-Clause license, the Boost Software License or (possibly) the BSD-2-Clause license. Modifications to these files made by the SWORD developers are licensed under GPLv2, effectively mixing code of two different licenses into the same file.
The files sword-1.9.0/include/ftpparse.h and sword-1.9.0/src/utilfuns/ftpparse.c contain an informal non-free license, however their author (D. J. Bernstein) has placed them into the public domain and alternately allowed them to be used under any one of several FOSS licenses. (See https://cr.yp.to/distributors.html, section "What are the distribution terms for ftpparse?") The versions of these files in SWORD aren't *quite* identical to the originals (they appear to have been modified to work properly and safely in SWORD), but they're very nearly identical. The License field of the package contains the three Fedora-allowable licenses given.

View file

@ -1,82 +0,0 @@
From 07b31a74ea920077fa0d69cdab2ab188dd17b322 Mon Sep 17 00:00:00 2001
From: Aaron Rainbolt <arraybolt3@gmail.com>
Date: Wed, 27 Sep 2023 10:51:27 -0600
Subject: [PATCH] Migrate to setuptools
---
bindings/swig/oldmake/Makefile.am | 2 +-
bindings/swig/package/Makefile.am | 3 +--
bindings/swig/package/Makefile.in | 3 +--
bindings/swig/python/CMakeLists.txt | 7 +++++--
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/bindings/swig/oldmake/Makefile.am b/bindings/swig/oldmake/Makefile.am
index 45a37ef..789813b 100644
--- a/bindings/swig/oldmake/Makefile.am
+++ b/bindings/swig/oldmake/Makefile.am
@@ -76,7 +76,7 @@ python_makebuild: $(PYTHONSWIG)
echo "writing python/setup.py"
@echo "#! /usr/bin/python" > python/setup.py
@echo "" >> python/setup.py
- @echo "from distutils.core import setup, Extension" >> python/setup.py
+ @echo "from setuptools import setup, Extension" >> python/setup.py
@echo "setup (name = \"sword\"," >> python/setup.py
@echo " version = \"$(VERSION)\"," >> python/setup.py
@echo " maintainer = \"Sword Developers\"," >> python/setup.py
diff --git a/bindings/swig/package/Makefile.am b/bindings/swig/package/Makefile.am
index 14500c3..f44974d 100644
--- a/bindings/swig/package/Makefile.am
+++ b/bindings/swig/package/Makefile.am
@@ -84,8 +84,7 @@ python_makebuild: $(PYTHONSWIG)
echo "writing python/setup.py"
@echo "#! /usr/bin/python" > python/setup.py
@echo "" >> python/setup.py
- @echo "from distutils.core import setup" >> python/setup.py
- @echo "from distutils.extension import Extension" >> python/setup.py
+ @echo "from setuptools import setup, Extension" >> python/setup.py
@echo "import commands" >> python/setup.py
@echo "" >> python/setup.py
@echo "def pkgconfig(*packages, **kw):" >> python/setup.py
diff --git a/bindings/swig/package/Makefile.in b/bindings/swig/package/Makefile.in
index b5f05c9..370a9e7 100644
--- a/bindings/swig/package/Makefile.in
+++ b/bindings/swig/package/Makefile.in
@@ -938,8 +938,7 @@ python_makebuild: $(PYTHONSWIG)
echo "writing python/setup.py"
@echo "#! /usr/bin/python" > python/setup.py
@echo "" >> python/setup.py
- @echo "from distutils.core import setup" >> python/setup.py
- @echo "from distutils.extension import Extension" >> python/setup.py
+ @echo "from setuptools import setup, Extension" >> python/setup.py
@echo "import commands" >> python/setup.py
@echo "" >> python/setup.py
@echo "def pkgconfig(*packages, **kw):" >> python/setup.py
diff --git a/bindings/swig/python/CMakeLists.txt b/bindings/swig/python/CMakeLists.txt
index cbb4058..247bc79 100644
--- a/bindings/swig/python/CMakeLists.txt
+++ b/bindings/swig/python/CMakeLists.txt
@@ -25,7 +25,7 @@ ENDIF(NOT PYTHONLIBS_FOUND)
SET(PY_SCRIPT "#!${PYTHON_EXECUTABLE}
-from distutils.core import setup, Extension
+from setuptools import setup, Extension
setup(
name='sword',
version='${SWORD_VERSION}',
@@ -51,8 +51,11 @@ ADD_CUSTOM_TARGET(swordswig_python${SWORD_PYTHON_VERSION} ALL
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
# Allow user installation to custom directory
+IF(NOT SWORD_PYTHON_INSTALL_ROOT STREQUAL "")
+ SET(SETUP_ARGS "\"--root=${SWORD_PYTHON_INSTALL_ROOT}\"")
+ENDIF(NOT SWORD_PYTHON_INSTALL_ROOT STREQUAL "")
IF(NOT SWORD_PYTHON_INSTALL_DIR STREQUAL "")
- SET(SETUP_ARGS "\"--prefix=${SWORD_PYTHON_INSTALL_DIR}\"")
+ SET(SETUP_ARGS "${SETUP_ARGS}\"--prefix=${SWORD_PYTHON_INSTALL_DIR}\"")
ENDIF(NOT SWORD_PYTHON_INSTALL_DIR STREQUAL "")
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/install.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/install.cmake")
--
2.41.0

View file

@ -1,5 +0,0 @@
summary: Run installmgr tests
discover:
how: fmf
execute:
script: installmgr_tests.sh

View file

@ -1 +1 @@
SHA512 (sword-1.9.0.tar.gz) = b5a4e30bf088d4b8187fc3addb58a4b6d8ce011f25cecdd4e547f710fa9ffed49c69f36a21ea1c15d1a21205bca09b2fd7c04d6ed176a5c81900a784b9b76d92
SHA512 (sword-1.9.0.tar.gz) = 9ed3fbb5024af1f93b1473bae0d95534d02a5b00b3c9d41a0f855cee8106dc4e330844080adbee7c3f74c0e5ce1480bf16c87c842421337a341f641bae11137f

View file

@ -1,39 +1,33 @@
%global soversion 1.9
%define soversion 1.9
%define pkg_version 1.9.0
Name: sword
Epoch: 1
Version: 1.9.0
Release: 36%{?dist}
Release: 16%{?dist}
Summary: Free Bible Software Project
License: GPL-2.0-only AND LicenseRef-Fedora-Public-Domain AND Apache-2.0 AND LGPL-2.0-or-later AND Zlib AND LGPL-2.1-or-later AND (0BSD OR MIT-0 OR MIT)
License: GPLv2
URL: http://www.crosswire.org/sword/
# Source0 tarball is generated by sword_gen_free_tarball.sh, which documents
# repack rationale and automates tarball fetching and repacking
Source0: sword-1.9.0.tar.gz
Source1: sword_gen_free_tarball.sh
Source2: LICENSE_README
# Patch0 was created by a SWORD developer, not applied upstream
Patch0: cmake-perl-bindings.diff
# Patch1 emailed to upstream
Patch1: migrate-to-setuptools.diff
Source0: http://www.crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-%{version}.tar.gz
BuildRequires: make
BuildRequires: cmake
BuildRequires: cmake-data
BuildRequires: openssl-devel
BuildRequires: curl-devel
BuildRequires: zlib-devel
BuildRequires: libidn-devel
BuildRequires: libicu-devel
BuildRequires: icu
BuildRequires: libicu-devel icu
BuildRequires: clucene-core-devel
BuildRequires: cppunit-devel
BuildRequires: swig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: gcc
BuildRequires: gcc-c++
Patch0: cmake-perl-bindings.diff
%description
The SWORD Project is the CrossWire Bible Society's free Bible software
project. Its purpose is to create cross-platform open-source tools--
@ -47,9 +41,7 @@ texts in over 50 languages.
Summary: Development files for the sword project
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: pkgconfig
Requires: curl-devel
Requires: clucene-core-devel
Requires: libicu-devel
Requires: curl-devel clucene-core-devel libicu-devel
%description devel
This package contains the development headers and libraries for the
@ -69,18 +61,20 @@ release schedule of the library. However, these utilities were the
latest at the time of the current library release.
%package -n python3-sword
%py_provides python3-sword
%{?python_provide:%python_provide python3-sword}
Summary: Python bindings for Sword
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: python3
%py_provides python3-Sword
%description -n python3-sword
Python bindings for The SWORD Library.
%package -n perl-sword
%{?perl_provide:%perl_provide perl-sword}
Summary: Perl bindings for Sword
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: perl-interpreter
Requires: perl
Requires: perl-XML-LibXML
Requires: perl-HTML-Strip
@ -88,44 +82,37 @@ Requires: perl-HTML-Strip
Perl bindings for The SWORD Library.
%prep
%autosetup -p1
%setup -q
%patch0 -p1 -b .perl
%build
%cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
-DLIB_INSTALL_DIR:PATH=%{_libdir} \
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \
%if "%{?_lib}" == "lib64"
%{?_cmake_lib_suffix64} \
%endif
-DLIBSWORD_LIBRARY_TYPE=Shared \
%cmake -DLIBSWORD_LIBRARY_TYPE=Shared \
-DSWORD_PYTHON_3:BOOL=TRUE \
-DSWORD_PERL:BOOL=TRUE \
-DSWORD_BUILD_UTILS="Yes" \
-DLIBSWORD_SOVERSION=%{soversion} \
-DLIBDIR=%{_libdir} \
-DSWORD_BUILD_TESTS=Yes \
-DSWORD_PYTHON_INSTALL_ROOT="%{buildroot}" \
-DSWORD_PYTHON_INSTALL_DIR="%{_prefix}"
-DSWORD_PYTHON_INSTALL_DIR="%{buildroot}%{_prefix}"
%cmake_build
%install
%cmake_install
mkdir -p %{buildroot}%{_datadir}/sword/modules
find %{buildroot} -type f -name "*.la" -delete -print
%check
make tests
%files
%doc AUTHORS ChangeLog NEWS README
%doc samples/
%doc doc/
%license COPYING LICENSE
%doc AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README
%doc samples doc
# Re-enable after upstream includes it with CMake builds
%config(noreplace) %{_sysconfdir}/sword.conf
%{_libdir}/libsword.so.%{soversion}
%{_datadir}/sword/
%{_datadir}/sword
%files devel
%doc CODINGSTYLE
@ -156,7 +143,7 @@ make tests
%files -n python3-sword
%pycached %{python3_sitearch}/Sword.py
%{python3_sitearch}/_Sword%{python3_ext_suffix}
%{python3_sitearch}/sword-%{version}-py%{python3_version}.egg-info/
%{python3_sitearch}/sword-%{pkg_version}-py%{python3_version}.egg-info
%files -n perl-sword
%{perl_vendorarch}/*
@ -164,74 +151,6 @@ make tests
%changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1:1.9.0-36
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1:1.9.0-35
- Rebuilt for Python 3.14.0rc2 bytecode
* Wed Aug 06 2025 František Zatloukal <fzatlouk@redhat.com> - 1:1.9.0-34
- Rebuilt for icu 77.1
* Sat Jul 26 2025 Aaron Rainbolt <arraybolt@fedoraproject.org> - 1:1.9.0-33
- Set minimum CMake version to 3.5 (rhbz#2381472)
- Set non-standard CMake variables back to expected values (rhbz#2381665)
- Migrate InstallMgr test to tmt framework (rhbz#2383081)
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jul 07 2025 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.9.0-31
- Perl 5.42 rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 1:1.9.0-30
- Rebuilt for Python 3.14
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sun Dec 08 2024 Pete Walter <pwalter@fedoraproject.org> - 1:1.9.0-28
- Rebuild for ICU 76
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jun 12 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.9.0-26
- Perl 5.40 rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1:1.9.0-25
- Rebuilt for Python 3.13
* Wed Jan 31 2024 Pete Walter <pwalter@fedoraproject.org> - 1:1.9.0-24
- Rebuild for ICU 74
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Sep 29 2023 Aaron Rainbolt <arraybolt3@fedoraproject.org> - 1:1.9.0-22
- Replace distutils with setuptools in python setup scripts (rhbz#2220606)
- Don't install the INSTALL file as part of the documentation
- Remove Android bindings as they contain a prebuild binary
- Remove gSOAP bindings as they contain a non-free source file
- Remove Objective C bindings as they contain a non-free source file
- Remove win32-related utility code as it is non-free
- Remove some sort of pre-built PalmOS application binary
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 František Zatloukal <fzatlouk@redhat.com> - 1:1.9.0-20
- Rebuilt for ICU 73.2
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.9.0-19
- Perl 5.38 rebuild
* Fri Jun 30 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.9.0-18
- Replace requirement of meta-package perl by perl-interpreter
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:1.9.0-17
- Rebuilt for Python 3.12
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View file

@ -1,30 +0,0 @@
#!/bin/bash
# SWORD's gSOAP bindings contain a file at bindings/gsoap/include/stdsoap.h
# that is labeled "All rights reserved." We therefore have to repack the
# tarball to eliminate this file. Doing so most likely ruins the gSOAP
# bindings, so we just remove the gSOAP bindings altogether.
#
# The Objective C bindings have the same problem as the gSOAP bindings.
#
# There's some win32-related code that has a similar problem too.
#
# Also some sort of PalmOS application binary needs removed.
#
# We also remove the Android bindings since they contain a prebuilt .jar file.
# This could be handled in %prep but it's just as easy and probably a bit
# faster to do it here.
set -e
wget http://www.crosswire.org/ftpmirror/pub/sword/source/v1.9/sword-1.9.0.tar.gz
test "$(sha512sum sword-1.9.0.tar.gz | cut -d' ' -f1)" = "9ed3fbb5024af1f93b1473bae0d95534d02a5b00b3c9d41a0f855cee8106dc4e330844080adbee7c3f74c0e5ce1480bf16c87c842421337a341f641bae11137f"
tar -xf sword-1.9.0.tar.gz
rm sword-1.9.0.tar.gz
rm -r sword-1.9.0/bindings/gsoap
rm -r sword-1.9.0/bindings/Android
rm -r sword-1.9.0/bindings/objc
rm -r sword-1.9.0/src/utilfuns/win32
rm sword-1.9.0/utilities/diatheke/pqa/Diatheke.pqa
tar -czf sword-1.9.0.tar.gz sword-1.9.0
rm -r sword-1.9.0

10
tests/tests.yml Normal file
View file

@ -0,0 +1,10 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
- container
tests:
- installmgr:
dir: .
run: installmgr.sh