From bad483e1aee3ceffa15fcba6a8f4868d565c0f29 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Tue, 4 Apr 2023 17:00:08 +0000 Subject: [PATCH] Import rpm: c8s --- .gitignore | 2 + README-skkdic.rh.ja | 66 +++++++++++++ create-skkdic-source.sh | 14 +++ skkdic.spec | 200 ++++++++++++++++++++++++++++++++++++++++ sources | 1 + unannotation.awk | 75 +++++++++++++++ 6 files changed, 358 insertions(+) create mode 100644 .gitignore create mode 100644 README-skkdic.rh.ja create mode 100644 create-skkdic-source.sh create mode 100644 skkdic.spec create mode 100644 sources create mode 100644 unannotation.awk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ef6497 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/skkdic-20170102T1100.tar.bz2 +/skkdic-20170102T1100.tar.bz2 diff --git a/README-skkdic.rh.ja b/README-skkdic.rh.ja new file mode 100644 index 0000000..843d45f --- /dev/null +++ b/README-skkdic.rh.ja @@ -0,0 +1,66 @@ +## -*- text -*- +## +## README file for skkdic +## by SATO Satoru +## + + +このファイルはパッケージ skkdic に含まれる各辞書について簡単に +説明するものです。各辞書の詳細については、その本体および、 +OpenLab SKKプロジェクトの辞書についての説明のページ +(http://openlab.ring.gr.jp/skk/dic-ja.html)を参照して下さい。 + + +SKK-JISYO.S, SKK-JISYO.M, SKK-JISYO.ML, SKK-JISYO.L: + +SKKのための最も基本的な辞書です。S、M、L は辞書の大きさを表しますが、 +このパッケージに含まれているのは一番大きな SKK-JISYO.L だけです。 + +SKK-JISYO.JIS2: + +JIS 第二水準の文字だけが収録されています。 + +SKK-JISYO.wrong: + +以下前述のページより引用します。 + +=begin +SKK-JISYO.{SML} に間違えて含まれていたエントリを抽出したものです。このファイル +は SKK-JISYO.{SML} に再び誤ったエントリが含まれないようにするための指標であり、 +また、個人辞書から誤ったエントリを削除するためのファイルでもあります。 + +CVS 管理により作成されるファイルは、SKK-JISYO.wrong.annotated というファイルで +す。このファイルに何が間違いなのかについての註釈付きで作成されます。このファイ +ルを元に、openlab.ring.gr.jp により自動的に註釈が除かれて SKK-JISYO.wrong が作 +成されます。 + +個人辞書から誤ったエントリを取り除くには次のようにすれば良いでしょう。 + + % skkdic-expr ~/.skk-jisyo - SKK-JISYO.wrong | skkdic-sort - >.skk-jisyo + +=end + + +SKK-JISYO.geo: +SKK-JISYO.zipcode, SKK-JISYO.office.zipcode: + +郵政事業庁(旧郵政省)が使用、再配布、加工、移植、改良に制限を設けずに配布し +ている、地名データ、郵便番号辞書をOpenLabの方々が SKK辞書形式に加工し、GPL +を適用して配布しているものです。詳細についてはこのディレクトリ下のサブディ +レクトリ zipcode/ の中にある README ファイルを参照して下さい。 + +.zipcode は 7 桁郵便番号辞書、.office.zipcode は事業所郵便番号辞書となって +います。 + + +SKK-JISYO.okinawa: + +沖縄辞書プロジェクトが作成、メンテナンスしている沖縄辞書を SKK 辞書形式に +変換したものです。 + + +SKK-JISYO.law: + +弁護士 小松 弘氏が開発なさっていて GPL で配布されている法律辞書 +"法律用語電子化辞書 LKKS"(http://home2.highway.ne.jp/sui_feng/kks/) が +SKK 辞書形式に変換されたものです。 diff --git a/create-skkdic-source.sh b/create-skkdic-source.sh new file mode 100644 index 0000000..a8362af --- /dev/null +++ b/create-skkdic-source.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +DATE=$(date '+%Y%m%d') +TIME=$(date '+%H%M') + +mkdir -p skkdic-$DATE +cd skkdic-$DATE +wget -N -r -nH -np --cut-dirs=3 \ + -R 'index.html*' \ + -R '*.gz' -R '*.gz.md5' \ + http://openlab.ring.gr.jp/skk/skk/dic/ +rm -rf robots.txt +cd .. && tar cvfj skkdic-${DATE}T${TIME}.tar.bz2 skkdic-$DATE + diff --git a/skkdic.spec b/skkdic.spec new file mode 100644 index 0000000..b8ed461 --- /dev/null +++ b/skkdic.spec @@ -0,0 +1,200 @@ +%global cvsDATE 20170102 +%global cvsTIME 1100 + +Summary: Dictionaries for SKK (Simple Kana-Kanji conversion program) +Name: skkdic +Version: %{cvsDATE} +Release: 4.T%{cvsTIME}%{?dist} +License: GPLv2+ +Group: System Environment/Libraries +# To create source tarball, use Source10 +Source0: skkdic-%{cvsDATE}T%{cvsTIME}.tar.bz2 +Source1: http://openlab.ring.gr.jp/skk/skk/tools/unannotation.awk +Source10: create-skkdic-source.sh +Source200: README-skkdic.rh.ja +URL: http://openlab.ring.gr.jp/skk/skk/dic/ +BuildArch: noarch + +%description +This package includes the SKK dictionaries, including the large dictionary +SKK-JISYO.L and pubdic+ dictionary. + +%prep +%setup -q + +cp -p %SOURCE200 . +cp -p %SOURCE1 . +mv zipcode/README.ja zipcode/README-zipcode.ja + +%build +for dic in \ + SKK-JISYO.L.unannotated \ + SKK-JISYO.wrong +do + rm -f $dic + make $dic TOOLS_DIR=. +done + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_datadir}/skk + +for f in SKK-JISYO* zipcode/SKK-JISYO* +do + install -p -m 644 $f $RPM_BUILD_ROOT%{_datadir}/skk +done +gzip -9 ChangeLog + +%files +%defattr(-,root,root,-) +%doc ChangeLog.gz +%doc README-skkdic.rh.ja +%doc READMEs/committers.txt +%doc edict_doc.txt +%doc zipcode/README-zipcode.ja + +%{_datadir}/skk/ + + +%changelog +* Fri Feb 09 2018 Fedora Release Engineering - 20170102-4.T1100 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 20170102-3.T1100 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 20170102-2.T1100 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 02 2017 Mamoru TASAKA - 20170102-1.T0100 +- Update to the latest data + +* Fri Feb 05 2016 Fedora Release Engineering - 20151206-2.T0100 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Dec 06 2015 Mamoru TASAKA - 20151206-1.T0100 +- Update to the latest data + +* Fri Jun 19 2015 Fedora Release Engineering - 20150508-2.T1030 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 8 2015 Mamoru TASAKA - 20150508-1.T1030 +- Update to the latest data + +* Tue Nov 18 2014 Mamoru TASAKA - 20141118-1.T0000 +- Update to the latest data + +* Sun Jun 08 2014 Fedora Release Engineering - 20131114-8.T1121 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Nov 14 2013 Mamoru TASAKA - 20131114-7.T1121 +- Update to the latest data + +* Sun Aug 04 2013 Fedora Release Engineering - 20130104-6.T1435 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 20130104-5.T1435 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jan 4 2013 Mamoru TASAKA - 20130104-4.T1435 +- Update to the latest data + +* Sat Jul 21 2012 Fedora Release Engineering - 20111016-3.T0540 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 20111016-2.T0540 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Oct 16 2011 Mamoru Tasaka - 20111016-1.T0540 +- Update for F16 + +* Wed Mar 09 2011 Mamoru Tasaka - 20110309-1.T1520 +- Update dictionaries + +* Wed Feb 09 2011 Fedora Release Engineering - 20090929-2.T0800 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Sep 29 2009 Mamoru Tasaka - 20090929-1.T0800 +- Update for F12Beta + +* Wed Aug 5 2009 Mamoru Tasaka - 20090805-1.T0306 +- Update for F12Alpha +- A bit clean up for spec file + +* Sun Jul 26 2009 Fedora Release Engineering - 20080904-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 20080904-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Sep 4 2008 Tom "spot" Callaway - 20080904-1 +- fix license tag +- update source files + +* Tue Sep 23 2006 Ryo Dairiki - 20050614-2 +- mass rebuilding + +* Tue Jun 14 2005 Jens Petersen - 20050614-1 +- initial import to Fedora Extras +- update to latest dictionaries + +* Wed Sep 22 2004 Jens Petersen - 20040922-1 +- update to latest dictionaries +- update url +- gzip ChangeLog since it is growing fast + +* Thu Apr 15 2004 Jens Petersen - 20040415-1 +- update to latest +- update README-skkdic.rh.ja and convert it to utf-8 + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Tue Feb 11 2003 Jens Petersen - 20030211-1 +- update dictionaries +- move rh readme file into cvs +- don't build unannotated dictionaries + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 11 2002 Tim Powers 20020724-2 +- rebuild + +* Wed Jul 24 2002 Jens Petersen 20020724-1 +- update dictionaries + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Thu Feb 21 2002 Jens Petersen 20020220-2 +- rebuild in new environment + +* Tue Feb 20 2002 Jens Petersen 20020220-1 +- update to latest dictionaries +- put source in one bzip2ed tar file +- tidy spec file +- make unannotated +- include SKK-JISYO.pubdic+ + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Sat Jun 23 2001 SATO Satoru +- update and add more dictionaries: (jinmei,) law, okinawa, geo +- add README files + +* Mon Jan 22 2001 SATO Satoru +- update dictionaris +- add cdb-dictionaries +- clean up SPEC + +* Mon Dec 28 2000 SATO Satoru +- add many extra dictionaries +- clean up SPEC + +* Tue Sep 5 2000 SATO Satoru +- Initial release diff --git a/sources b/sources new file mode 100644 index 0000000..503258f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (skkdic-20170102T1100.tar.bz2) = 550ba8cde28c460fdb71fd15e74b76c2a752e574f56ffbb9d69001e2c4379d5640979983288d4b937c09d752f5784890ecf66abbc153953072a389b5c9979259 diff --git a/unannotation.awk b/unannotation.awk new file mode 100644 index 0000000..2216606 --- /dev/null +++ b/unannotation.awk @@ -0,0 +1,75 @@ +# unannotation.awk: filter to remove annotations in dictionaries. +# +# Copyright (C) 2001, 2002 SKK Development Team +# +# Maintainer: SKK Development Team +# Version: $Id: unannotation.awk,v 1.3 2006/01/04 10:35:06 skk-cvs Exp $ +# Last Modified: $Date: 2006/01/04 10:35:06 $ +# +# This file is part of Daredevil SKK. +# +# Daredevil SKK is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or +# (at your option) any later version. +# +# Daredevil SKK is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Daredevil SKK, see the file COPYING. If not, write to +# the Free Software Foundation Inc., 51 Franklin St, Fifth Floor, +# Boston, MA 02110-1301, USA. + +BEGIN{ + print ";; -*- text -*-"; + ctime = myctime(0); + this = ARGV[1]; + if (match(this, "\.annotated$") != 0){ + this = substr(this, 1, RSTART - 1); + } else + this = this ".unannotated"; + printf(";; %s was generated automatically by unannotation.awk at %s\n", + this, ctime); + #getline modeindicator + #if (match(modeindicator, /;; -*- text -*-/) != 0){ + # print modeindicator; + #} +} +#$0 !~ /"^;; -\*- text -\*-\n"/{ +{ + if (match($0, /^;/) == 0) { + gsub(";[^/]*/", "/"); + if (DEQUOTE && $0 ~ /\\073/) { + $0 = dequote($0); + } + } + print; +} +function myctime(ts, format) { + format = "%a %b %e %H:%M:%S %Y"; + if (ts == 0) + ts = systime(); # use current time as default + return strftime(format, ts); +} +# convert '\073' to ';' and strip '(concat "...")'. +# example: 'smile /(concat "^_^\073\073")/:-)/' to 'smile /^_^;;/:-)/' +# @param s string to convert +# @return converted string +function dequote(s) { + ret = ""; + n = split(s, a, "/"); + for (i = 1; i < n; i++) { + if (a[i] ~ /^\(concat ".*\\073.*"\)$/) { # \073 = ';' + gsub(/\\073/, ";", a[i]); + if (a[i] !~ /\\/) { # no other quote + a[i] = gensub(/^\(concat "(.*)"\)$/, "\\1", "g", a[i]); + } + } + ret = ret a[i] "/"; + } + return ret; +} +# end of unannotation.awk.