From aedeebc90d0c2dc9f9b273e056207883447b29cc Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Jun 04 2023 09:56:34 +0000 Subject: Switch to libreoffice dictionaries from libreitalia.org --- diff --git a/.gitignore b/.gitignore index 10c191d..a1d1e95 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hyph_it_IT.zip +/italiano-5.1.1.tar.xz diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..a282ff7 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +VERSION=$1 + +# Clone LO dictionaries sources +git clone https://git.libreoffice.org/dictionaries + +# Extract italian language only +mkdir italiano-$VERSION +cp -p dictionaries/it_IT/CHANGELOG.txt italiano-$VERSION/ +cp -p dictionaries/it_IT/README_hyph_it_IT.txt italiano-$VERSION/ +cp -p dictionaries/it_IT/hyph_it_IT.dic italiano-$VERSION/ + +# Make compressed tarball +tar -cJvf italiano-$VERSION.tar.xz italiano-$VERSION + +# Remove temporary directory +rm -rf italiano-$VERSION +rm -rf dictionaries diff --git a/hyphen-it.spec b/hyphen-it.spec index 9bd3fbd..a044f91 100644 --- a/hyphen-it.spec +++ b/hyphen-it.spec @@ -1,24 +1,32 @@ -Name: hyphen-it -Summary: Italian hyphenation rules -%global upstreamid 20071127 -Version: 0.%{upstreamid} -Release: %autorelease -Source: http://download.services.openoffice.org/contrib/dictionaries/hyph_it_IT.zip -URL: http://wiki.services.openoffice.org/wiki/Dictionaries -License: LGPL-2.1-or-later -BuildArch: noarch -Requires: hyphen -Supplements: (hyphen and langpacks-it) -Provides: hyphen-la = 0.%{upstreamid}-3%{?dist} +Name: hyphen-it +Summary: Italian hyphenation rules +Version: 5.1.1 +Release: %autorelease +# The license text is embedded within the README files +License: LGPL-2.1-or-later +URL: https://libreitalia.org +# A ready source tarball is not provided +# We use the generate-tarball.sh script to clone libreoffice dictionaries +# repository and set up the source tarball. You'll need git installed. +# ./generate-tarball %%version +Source: italiano-%{version}.tar.xz + +BuildArch: noarch +Requires: hyphen +Supplements: (hyphen and langpacks-it) +Provides: hyphen-la = %{version} %description Italian hyphenation rules. + %prep -%autosetup -c -n hyphen-it +%autosetup -n italiano-%{version} chmod -x * + %build +# Nothing to do %install mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hyphen @@ -33,8 +41,11 @@ done %files -%doc README_hyph_it_IT.txt -%{_datadir}/hyphen/* +%doc CHANGELOG.txt README_hyph_it_IT.txt +%{_datadir}/hyphen/hyph_it_IT.dic +%{_datadir}/hyphen/hyph_it_CH.dic +%{_datadir}/hyphen/hyph_la_VA.dic + %changelog %autochangelog diff --git a/sources b/sources index 89b2b80..31afd92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee57402fa3930e0641d627ec7f4f1619 hyph_it_IT.zip +SHA512 (italiano-5.1.1.tar.xz) = d4d2d7adf12f782a4685c9bf2ad7d3b43f5f81ceef84c510d3a492a76aeb8a87a74e00124f5e710a6972f29cc4969ac7d80cf6f88c9d93ccbd45c50d6cbf0a76