2024-03-14 13:20:59 +00:00
|
|
|
%global tag_version release-%%(echo "%version" | tr '~' '-')
|
2023-09-15 07:05:13 +00:00
|
|
|
#%%global is_official 0%%(echo %%{tag_version} | grep -qE 'alpha|beta|final'; echo $?)
|
2022-08-04 13:50:13 +00:00
|
|
|
#%%global is_official 0
|
2023-10-31 04:03:47 +00:00
|
|
|
%global is_official 0
|
2020-09-11 08:22:23 +00:00
|
|
|
|
2017-03-06 16:46:08 +00:00
|
|
|
Name: cldr-emoji-annotation
|
2024-04-19 14:37:55 +00:00
|
|
|
Version: 45
|
2024-04-05 14:42:06 +00:00
|
|
|
Release: %autorelease
|
2020-10-22 09:42:25 +00:00
|
|
|
%if 0%{?fedora:1}%{?rhel:0}
|
2020-09-25 11:32:49 +00:00
|
|
|
Epoch: 1
|
2020-10-22 09:42:25 +00:00
|
|
|
%endif
|
2017-03-06 16:46:08 +00:00
|
|
|
# Annotation files are in Unicode license
|
|
|
|
Summary: Emoji annotation files in CLDR
|
2022-11-16 04:47:23 +00:00
|
|
|
License: Unicode-DFS-2016
|
2020-09-25 11:32:49 +00:00
|
|
|
URL: https://unicode.org/cldr
|
2020-11-04 07:59:34 +00:00
|
|
|
%if %is_official
|
2023-04-13 04:03:54 +00:00
|
|
|
Source0: https://github.com/unicode-org/cldr/releases/download/%{tag_version}/cldr-core-%{version}.zip
|
2020-11-04 07:59:34 +00:00
|
|
|
%else
|
2021-08-24 09:20:20 +00:00
|
|
|
Source0: https://github.com/unicode-org/cldr/archive/refs/tags/%{tag_version}.zip#/cldr-%{tag_version}.zip
|
2020-11-04 07:59:34 +00:00
|
|
|
%endif
|
2018-03-09 11:31:37 +00:00
|
|
|
#Patch0: %%{name}-HEAD.patch
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2017-03-06 16:46:08 +00:00
|
|
|
BuildArch: noarch
|
2020-08-01 01:22:47 +00:00
|
|
|
Requires: %{name}-dtd
|
2017-03-06 16:46:08 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides the emoji annotation file by language in CLDR.
|
|
|
|
|
2020-08-01 01:22:47 +00:00
|
|
|
%package dtd
|
|
|
|
Summary: DTD files of CLDR common
|
2020-10-22 09:42:25 +00:00
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2020-08-01 01:22:47 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description dtd
|
|
|
|
This package contains DTD files of CLDR common which are required by
|
|
|
|
cldr-emoji-annotations.
|
|
|
|
|
2017-03-06 16:46:08 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Files for development using cldr-annotations
|
2020-10-22 09:42:25 +00:00
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2017-03-06 16:46:08 +00:00
|
|
|
Requires: pkgconfig
|
2017-04-21 07:22:51 +00:00
|
|
|
BuildArch: noarch
|
2017-03-06 16:46:08 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the pkg-config files for development
|
2020-08-01 01:22:47 +00:00
|
|
|
when building programs that use cldr-emoji-annotations.
|
2017-03-06 16:46:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-11-04 07:59:34 +00:00
|
|
|
%if %is_official
|
2020-12-18 11:23:55 +00:00
|
|
|
%autosetup -c -n cldr-%{tag_version}
|
2020-11-04 07:59:34 +00:00
|
|
|
%else
|
2020-12-18 11:23:55 +00:00
|
|
|
%autosetup -n cldr-%{tag_version}
|
2020-11-04 07:59:34 +00:00
|
|
|
%endif
|
2017-03-06 16:46:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
2020-09-25 11:32:49 +00:00
|
|
|
pushd $PWD
|
|
|
|
ANNOTATION_DIR=common/annotations
|
|
|
|
CLDR_DIR=%{_datadir}/unicode/cldr/$ANNOTATION_DIR
|
|
|
|
pushd $ANNOTATION_DIR
|
|
|
|
for xml in *.xml ; do
|
|
|
|
install -pm 644 -D $xml $RPM_BUILD_ROOT$CLDR_DIR/$xml
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
ANNOTATION_DIR=common/annotationsDerived
|
|
|
|
CLDR_DIR=%{_datadir}/unicode/cldr/$ANNOTATION_DIR
|
|
|
|
pushd $ANNOTATION_DIR
|
|
|
|
for xml in *.xml ; do
|
|
|
|
install -pm 644 -D $xml $RPM_BUILD_ROOT$CLDR_DIR/$xml
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
DTD_DIR=common/dtd
|
|
|
|
CLDR_DIR=%{_datadir}/unicode/cldr/$DTD_DIR
|
|
|
|
pushd $DTD_DIR
|
|
|
|
for dtd in *.dtd ; do
|
|
|
|
install -pm 644 -D $dtd $RPM_BUILD_ROOT$CLDR_DIR/$dtd
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
install -pm 755 -d $RPM_BUILD_ROOT%{_datadir}/pkgconfig
|
|
|
|
cat >> $RPM_BUILD_ROOT%{_datadir}/pkgconfig/%{name}.pc <<_EOF
|
|
|
|
prefix=/usr
|
|
|
|
|
2020-09-25 11:39:27 +00:00
|
|
|
Name: cldr-emoji-annotations
|
2020-09-25 11:32:49 +00:00
|
|
|
Description: annotation files in CLDR
|
|
|
|
Version: %{version}
|
|
|
|
_EOF
|
|
|
|
|
2017-03-06 16:46:08 +00:00
|
|
|
|
2020-08-01 01:22:47 +00:00
|
|
|
%check
|
2020-09-25 11:32:49 +00:00
|
|
|
ANNOTATION_DIR=common/annotations
|
|
|
|
CLDR_DIR=%{_datadir}/unicode/cldr/$ANNOTATION_DIR
|
|
|
|
for xml in $ANNOTATION_DIR/*.xml ; do
|
|
|
|
xmllint --noout --valid --postvalid $xml
|
|
|
|
done
|
|
|
|
|
|
|
|
ANNOTATION_DIR=common/annotationsDerived
|
|
|
|
CLDR_DIR=%{_datadir}/unicode/cldr/$ANNOTATION_DIR
|
|
|
|
for xml in $ANNOTATION_DIR/*.xml ; do
|
|
|
|
xmllint --noout --valid --postvalid $xml
|
|
|
|
done
|
|
|
|
|
2020-08-01 01:22:47 +00:00
|
|
|
|
2017-03-06 16:46:08 +00:00
|
|
|
%files
|
2021-11-04 21:22:45 +00:00
|
|
|
%if %is_official
|
|
|
|
%doc README-common.md
|
|
|
|
%license LICENSE.txt
|
|
|
|
%else
|
|
|
|
%doc README.md
|
2023-09-15 09:55:13 +00:00
|
|
|
%license LICENSE
|
2021-11-04 21:22:45 +00:00
|
|
|
%endif
|
2020-08-01 01:22:47 +00:00
|
|
|
%{_datadir}/unicode/cldr/common/annotations
|
|
|
|
%{_datadir}/unicode/cldr/common/annotationsDerived
|
|
|
|
|
|
|
|
%files dtd
|
|
|
|
%dir %{_datadir}/unicode
|
|
|
|
%dir %{_datadir}/unicode/cldr
|
|
|
|
%dir %{_datadir}/unicode/cldr/common
|
|
|
|
%{_datadir}/unicode/cldr/common/dtd
|
2017-03-06 16:46:08 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_datadir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%changelog
|
2024-04-05 14:42:06 +00:00
|
|
|
%autochangelog
|
2024-03-14 13:20:59 +00:00
|
|
|
|