You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libunibreak/libunibreak.spec

103 lines
2.5 KiB

# latest liblinebreak is v2.1, we obsolete anything below 2.2
%global obsEVR 2.2-1
%global forgeurl https://github.com/adah1972/libunibreak
Name: libunibreak
1 year ago
Version: 5.1
Release: %autorelease -n
Summary: A Unicode line-breaking library
# Upstream uses tags of the form `libunibreak_X_Y`
%global tag %{name}_%{lua: v = string.gsub(rpm.expand('%{version}'), '%.', '_'); print(v) }
%forgemeta
# SPDX identifier
License: Zlib
URL: %forgeurl
Source0: %forgesource
# test files
Source1: LineBreakTest.txt
Source2: WordBreakTest.txt
Source3: GraphemeBreakTest.txt
# For regenerating src/*data.c
Source4: LineBreak.txt
Source5: WordBreakProperty.txt
Source6: GraphemeBreakProperty.txt
Source7: emoji-data.txt
# don't download test data
Patch: offline_files.patch
# update list of broken tests
Patch: disable_broken_tests.patch
# remove unused var and other build fixes
Patch: remove_unused_var.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: automake, autoconf, libtool
BuildRequires: python3
Provides: liblinebreak = %{version}-%{release}
Obsoletes: liblinebreak < %{obsEVR}
%description
Libunibreak is an implementation of the line breaking and word
breaking algorithms as described in Unicode Standard Annex 14 and
Unicode Standard Annex 29. It is designed to be used in a generic text
renderer.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: liblinebreak-devel = %{version}-%{release}
Obsoletes: liblinebreak-devel < %{obsEVR}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%forgeautosetup -p1
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} src/
sed -r -i 's|^(#!/usr/bin/)env (python)|\1\23|' src/generate_linebreakdata.py
sed -r -i 's|^(#!/usr/bin/)env (python)|\1\23|' src/sort_numeric_hex.py
%build
./autogen.sh
%configure --disable-static
# Regenerate src/*data.c
# Build fails with the updated files
#make linebreakdata
#make wordbreakdata
#make graphemebreakdata
#make emojidata
%make_build
%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%check
%make_build check
%ldconfig_scriptlets
%files
%doc AUTHORS NEWS README.md
%license LICENCE
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog
%autochangelog