[packages/apertium] - up to 3.9.12
baggins
baggins at pld-linux.org
Fri Aug 8 00:46:15 CEST 2025
commit bc0934dd994cdb2a12a2123cd3ddc1c3a5d6b15e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Aug 8 02:46:00 2025 +0200
- up to 3.9.12
apertium.spec | 41 ++++++++++++-------
no-apertium-get.patch | 11 -----
shebang.patch | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 137 insertions(+), 26 deletions(-)
---
diff --git a/apertium.spec b/apertium.spec
index c453a2d..d31e438 100644
--- a/apertium.spec
+++ b/apertium.spec
@@ -1,15 +1,13 @@
Summary: lttoolbox-based translation modules generator
Summary(pl.UTF-8): Oparty na pakiecie lttoolbox generator modułów tłumaczących
Name: apertium
-Version: 3.5.2
-Release: 3
+Version: 3.9.12
+Release: 1
License: GPL v2+
Group: Applications/Text
-Source0: http://downloads.sourceforge.net/apertium/%{name}-%{version}.tar.gz
-# Source0-md5: 9cce54e577dd4a1cc6f834e1bdd0bf73
-Source1: https://raw.githubusercontent.com/apertium/apertium-get/master/apertium-get
-# Source1-md5: e5c863207affed7db787138ae878ad56
-Patch0: no-apertium-get.patch
+Source0: https://github.com/apertium/apertium/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: b272baa484ac5977a7f9ea09f49c548f
+Patch0: shebang.patch
URL: http://www.apertium.org/
BuildRequires: autoconf >= 2.52
BuildRequires: automake
@@ -69,6 +67,21 @@ Statyczna biblioteka apertium.
%setup -q
%patch -P0 -p1
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
+ scripts/apertium-editdist \
+ scripts/apertium-filter-rules \
+ scripts/apertium-filter-xml \
+ scripts/apertium-genvdix \
+ scripts/apertium-genvldix \
+ scripts/apertium-genvrdix \
+ scripts/apertium-metalrx
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \
+ scripts/apertium-filter-dix.in \
+ scripts/apertium-metalrx-to-lrx.in \
+ scripts/apertium-translate-to-default-equivalent.in
+
+
%build
%{__libtoolize}
%{__aclocal}
@@ -85,8 +98,6 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -98,20 +109,20 @@ rm -rf $RPM_BUILD_ROOT
%doc AUTHORS ChangeLog NEWS README README-MODES
%attr(755,root,root) %{_bindir}/apertium
%attr(755,root,root) %{_bindir}/apertium-*
-%attr(755,root,root) %{_libdir}/libapertium3-3.5.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libapertium3-3.5.so.1
+%attr(755,root,root) %{_libdir}/libapertium.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libapertium.so.3
%{_datadir}/apertium
%{_mandir}/man1/apertium.1*
%{_mandir}/man1/apertium-*.1*
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libapertium3.so
-%{_libdir}/libapertium3.la
-%{_includedir}/apertium-3.5
+%attr(755,root,root) %{_libdir}/libapertium.so
+%{_libdir}/libapertium.la
+%{_includedir}/apertium
%{_pkgconfigdir}/apertium.pc
%{_aclocaldir}/apertium.m4
%files static
%defattr(644,root,root,755)
-%{_libdir}/libapertium3.a
+%{_libdir}/libapertium.a
diff --git a/no-apertium-get.patch b/no-apertium-get.patch
deleted file mode 100644
index 2d13752..0000000
--- a/no-apertium-get.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- apertium-3.5.2/apertium/Makefile.am~ 2018-08-04 17:52:54.000000000 +0200
-+++ apertium-3.5.2/apertium/Makefile.am 2020-03-23 17:37:06.996686819 +0100
-@@ -237,7 +237,7 @@
- apertium-tmxbuild \
- apertium-transfer
-
--bin_SCRIPTS = $(GENERATEDSCRIPTS) apertium-get/apertium-get
-+bin_SCRIPTS = $(GENERATEDSCRIPTS)
-
- # Workaround for git-svn clone not getting externals; should do
- # nothing in normal SVN checkouts
diff --git a/shebang.patch b/shebang.patch
new file mode 100644
index 0000000..cd87778
--- /dev/null
+++ b/shebang.patch
@@ -0,0 +1,111 @@
+--- apertium-3.9.12/apertium/Makefile.am~ 2025-03-26 10:26:26.000000000 +0100
++++ apertium-3.9.12/apertium/Makefile.am 2025-08-08 02:41:44.489995872 +0200
+@@ -447,49 +447,49 @@
+
+ apertium-validate-tagger: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-tagger script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/tagger.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-transfer: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-transfer script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/transfer.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-interchunk: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-interchunk script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/interchunk.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-postchunk: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-postchunk script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/postchunk.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-acx: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-acx script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --relaxng \"$(prefix)\"/share/lttoolbox/acx.rng --schema \"$(prefix)\"/share/lttoolbox/acx.xsd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-crx: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-crx script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/crx.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+
+ apertium-validate-modes: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-modes script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/modes.dtd --noout \"\$$FILE1\"" >>$@
+ @chmod a+x $@
+@@ -497,7 +497,7 @@
+
+ apertium-validate-dictionary: Makefile.am validate-header.sh
+ @echo "Creating apertium-validate-dictionary script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat validate-header.sh >> $@
+ @echo "# xsd is a non-final command, so just treated as a warning when compiling:" >> $@
+ @echo "xmllint --schema \"$(prefix)\"/share/lttoolbox/dix.xsd --noout \"\$$FILE1\" 2>&1 | grep -ve ' validates$$' -e ' fails to validate$$'" >> $@
+@@ -506,7 +506,7 @@
+
+ apertium-gen-deformat: Makefile.am deformat-header.sh
+ @echo "Creating apertium-gen-deformat script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat deformat-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/format.dtd --noout \"\$$FILE1\" && \\" >> $@
+ @if [ `basename xsltproc` == xsltproc ]; \
+@@ -520,7 +520,7 @@
+
+ apertium-gen-reformat: Makefile.am gen-header.sh
+ @echo "Creating apertium-gen-reformat script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat gen-header.sh >> $@
+ @echo "xmllint --dtdvalid \"$(apertiumdir)\"/format.dtd --noout \"\$$FILE1\" && \\" >> $@
+ @echo "xsltproc \"$(apertiumdir)\"/reformat.xsl \"\$$FILE1\" >/tmp/\$$\$$.reformat.l && \\" >> $@
+@@ -531,13 +531,13 @@
+
+ apertium-utils-fixlatex: Makefile.am utils-fixlatex-header.sh
+ @echo "Creating apertium-utils-fixlatex script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @cat utils-fixlatex-header.sh >> $@
+ @chmod a+x $@
+
+ apertium: Makefile.am apertium-header.sh
+ @echo 'Creating apertium script'
+- @echo '#!/usr/bin/env bash' > $@
++ @echo '#!/bin/bash' > $@
+ @echo 'APERTIUM_PATH="$${APERTIUM_PATH:-$(prefix)/bin}"' >>$@
+ @echo 'APERTIUM_DATADIR="$${APERTIUM_DATADIR:-$(prefix)/share/apertium}"' >>$@
+ @echo 'apertium_version="Apertium $(VERSION)"' >>$@
+@@ -546,7 +546,7 @@
+
+ apertium-unformat: Makefile.am apertium-unformat-header.sh
+ @echo "Creating apertium-unformat script"
+- @echo "#!/usr/bin/env bash" > $@
++ @echo "#!/bin/bash" > $@
+ @echo "APERTIUM_PATH=\"$(prefix)/bin\"" >>$@
+ @cat apertium-unformat-header.sh >>$@
+ @chmod a+x $@
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apertium.git/commitdiff/bc0934dd994cdb2a12a2123cd3ddc1c3a5d6b15e
More information about the pld-cvs-commit
mailing list