File cedict.spec of Package cedict

# spec file for package cedict
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           cedict
# Set version as official release date
Version:        20141224
Release:        0
Summary:        Free Chinese-English Dictionary in EDICT Format
License:        CC-BY-SA-3.0 and GPL-2.0+
Group:          System/I18n/Chinese
Source11:       README.SUSE
BuildRequires:  dos2unix
BuildRequires:  unzip
Provides:       locale(gjiten:zh)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

This is a free Chinese-English dictionary that can be used, for
example, with Gjiten.

The objective of the CEDICT project is to create an online,
downloadable (as opposed to searchable-only) public-domain
Chinese-English dictionary. For the most part, the project is modelled
on Jim Breen's highly successful EDICT (Japanese-English dictionary)
project and is intended to be a collaborative effort with users
providing entries and corrections to the main file.

cp %{SOURCE0} .
unzip %{name}
cp %{SOURCE11} .
chmod 755 $RPM_SOURCE_DIR/


mkdir -p %{buildroot}%{_datadir}/edict
dos2unix < cedict_ts.u8 | $RPM_SOURCE_DIR/  > %{buildroot}%{_datadir}/edict/cedict_ts.u8
chmod 644 %{buildroot}%{_datadir}/edict/cedict_ts.u8

%defattr(-, root, root)
%dir %{_datadir}/edict/