Пакет libkate: Specfile

%set_automake_version 1.11

%def_without gui

Name: libkate
Version: 0.4.1
Release: alt1.6
Summary: kate is a karaoke and text codec for embedding in ogg
License: BSD-3-Clause
Group: Video
URL: http://code.google.com/p/libkate/
Packager: Valery Inozemtsev <shrek@altlinux.ru>

Source: %name-%version.tar
Patch: %name-%version-%release.patch

BuildRequires(pre): rpm-build-python
BuildRequires: flex libogg-devel liboggz libpng-devel

%description
Kate is a codec for karaoke and text encapsulation for Ogg. Most of the time,
this would be multiplexed with audio/video to carry subtitles, song lyrics
(with or without karaoke data), etc, but doesn't have to be. A possible use
of a lone Kate stream would be an e-book. Moreover, the motion feature gives
Kate a powerful means to describe arbitrary curves, so hand drawing of shapes
can be achieved. This was originally meant for karaoke use, but can be used
for any purpose. Motions can be attached to various semantics, like position,
color, etc, so scrolling or fading text can be defined.

%package devel
Summary: %name Library and Header Files
Group: Development/C

%description devel
%name-devel contains the libraries and header files needed to
develop programs which make use of %name.

%package utils
Summary: Kate codec utilities
Group: Video
Requires: %name = %version-%release

%description utils
Basic utilities for encoding, decoding and manipulating subtitles.

%package -n KateDJ
Summary: simple UI for kate
Group: Video
Requires: %name-utils = %version-%release liboggz
BuildArch: noarch

%description -n KateDJ
KateDJ is a simple UI driven program that can extract Kate
streams from Ogg files, and merge them back in. It can be
used to make alterations to Kate streams easily, or to add
new Kate streams to an Ogg file.

%prep
%setup -q
%patch -p1
subst 's|#!.*python$|#!%__python|' tools/KateDJ/KateDJ

%build
export PYTHON=%__python
%autoreconf
%configure \
	--disable-static
%make

%install
export PYTHON=%__python
%make DESTDIR=%buildroot pythondir=%python_sitelibdir_noarch install
rm -rf %buildroot%_datadir/doc/libkate

%files
%doc AUTHORS THANKS
%_libdir/*.so.*

%files devel
%_includedir/kate
%_libdir/*.so
%_pkgconfigdir/*.pc

%files utils
%doc README
%_bindir/kat*
%_man1dir/kat*.1*

%if_with gui
%files -n KateDJ
%_bindir/KateDJ
%python_sitelibdir_noarch/kdj
%_man1dir/KateDJ.1*
%endif

%changelog
* Sat Aug 14 2021 Vitaly Lipatov <lav@altlinux.ru> 0.4.1-alt1.6
- NMU: build without KateDJ (gui subpackage)

* Thu Jun 04 2020 Andrey Cherepanov <cas@altlinux.org> 0.4.1-alt1.5
- FTBFS: set correct python 2.x executable for autotools and in shebang.
- Remove unpackaged files.
- Fix License tag according to SPDX.

* Thu Jan 16 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.4.1-alt1.4
- Fixed build

* Thu Oct 04 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.4.1-alt1.3
- Rebuilt with libpng15

* Fri Jul 20 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 0.4.1-alt1.2
- Fixed build

* Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 0.4.1-alt1.1
- Rebuild with Python-2.7

* Tue Aug 23 2011 Valery Inozemtsev <shrek@altlinux.ru> 0.4.1-alt1
- 0.4.1

* Sat Oct 23 2010 Valery Inozemtsev <shrek@altlinux.ru> 0.3.8-alt1
- 0.3.8

* Tue Dec 01 2009 Eugeny A. Rostovtsev (REAL) <real@altlinux.org> 0.3.7-alt1.1
- Rebuilt with python 2.6

* Tue Nov 17 2009 Valery Inozemtsev <shrek@altlinux.ru> 0.3.7-alt1
- 0.3.7

* Thu Oct 29 2009 Valery Inozemtsev <shrek@altlinux.ru> 0.3.6-alt1
- 0.3.6

* Sat Aug 08 2009 Valery Inozemtsev <shrek@altlinux.ru> 0.3.4-alt1
- 0.3.4

* Sun Dec 07 2008 Valery Inozemtsev <shrek@altlinux.ru> 0.2.7-alt1
- 0.2.7

* Sat Nov 22 2008 Valery Inozemtsev <shrek@altlinux.ru> 0.2.5-alt2
- removed obsolete %%post_ldconfig/%%postun_ldconfig calls

* Fri Oct 31 2008 Valery Inozemtsev <shrek@altlinux.ru> 0.2.5-alt1
- 0.2.5

* Wed Oct 15 2008 Valery Inozemtsev <shrek@altlinux.ru> 0.2.3-alt1
- initial build