%global gituser libass
%global gitname libass
%global commit 4d6e9ef3077fb279cab051cc00b216c5f08efb34
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global gitcounter 25
%global extraopts -v --nocfprotection
%if 0%{?fedora} <= 32
%global extraopts -v
%endif
Name: libass
Version: 0.17.3.git.%{gitcounter}
Release: %{shortcommit}%{?dist}
Summary: Portable library for SSA/ASS subtitles rendering
License: ISC
URL: https://github.com/%{gituser}/%{gitname}
Source0: %{url}/tarball/%{commit}/%{name}-%{shortcommit}.tar.gz
BuildRequires: gcc nasm autoconf automake libtool
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(fribidi)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libunibreak)
BuildRequires: devscripts
%description
Libass is a portable library for SSA/ASS subtitles rendering.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -p1 -n %{gituser}-%{gitname}-%{shortcommit}
%build
./autogen.sh
%configure --disable-static
%make_build
%install
%make_install
find %{buildroot} -name '*.la' -delete
%check
make check
hardening-check %{extraopts} %{buildroot}%{_libdir}/%{name}.so.9.*
%ldconfig_scriptlets
%files
%license COPYING
%doc Changelog
%{_libdir}/%{name}.so.9*
%files devel
%{_includedir}/ass/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Sat Aug 20 2022 samoht0 git-master
- enable libunibreak support
* Sat Jan 16 2021 samoht0 git-master
- spec and history cleanup