File tsduck-arib.spec of Package tsduck

#
# spec file for package tsduck-arib 
#
# Copyright (c) 2020 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 to lapis@ku-ten.net
#

%define tsplugins_path %{_libdir}/tsduck/plugins

Name:           tsduck-arib
Version:        0
Release:        1
Summary:        The MPEG Transport Stream Toolkit
License:        BSD-2-Clause
Group:          Productivity/Multimedia/Video/Record
Url:            https://github.com/mirakc/%{name}
Source:         %{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  doxygen
BuildRequires:  dos2unix
BuildRequires:  graphviz
BuildRequires:  curl
BuildRequires:  pcsc-tools
BuildRequires:  pcsc-lite-devel
BuildRequires:  libcurl-devel
BuildRequires:  rpmdevtools
BuildRequires:  libaribb24-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
TSDuck is an extensible toolkit for MPEG/DVB transport streams.
TSDuck is used in digital television systems for test, monitoring, integration, debug, lab or demo.
A TSDuck fork working with Japanese TV broadcast contents.

%package devel
Summary:        Development files for tsduck-arib, The MPEG Transport Stream Toolkit
Group:          Development/Languages/C and C++
Requires:       glibc-devel
Requires:       %{name} = %{version}
BuildArch:      noarch

%description devel
TSDuck is an extensible toolkit for MPEG/DVB transport streams.

This subpackage holds the development headers for the library.

%package devel-static
Summary:        Static library for tsduck-arib
Group:          Development/Languages/C and C++
Requires:       %{name}-devel = %{version}
Provides:       %{name}-devel:%{_libdir}/libtsduck.a

%description devel-static
TSDuck is an extensible toolkit for MPEG/DVB transport streams.

This subpackage contains the static version of the library
used for development.


%prep
%setup -q
sed -e "s/^.*-Wl,-rpath,'\$\$ORIGIN'.*$//g" -i Makefile.tsduck

%build
%__make CFLAGS_EXTRA=-g CXXFLAGS_EXTRA=-g NODTAPI=1 ARIB=1

%install
%make_install SYSROOT=%{buildroot} USRLIBDIR=%{_libdir} ARIB=1
%__make install-devel SYSROOT=%{buildroot} USRLIBDIR=%{_libdir} ARIB=1

install -D -d -m0755 %{buildroot}%{tsplugins_path}
find "%{buildroot}%{_bindir}" -type f -name 'tsplugin_*.so' -exec mv -t "%{buildroot}%{tsplugins_path}" {} +
find "%{buildroot}%{_bindir}" -type f \( -name 'tsduck.so' -o -name 'tsplugin_*.so' -o -name 'tsduck.*.xml' -o -name 'tsduck.*names' \) -exec mv -t "%{buildroot}%{tsplugins_path}" {} +

find "%{buildroot}%{_bindir}" -type f -exec strip {} +
find "%{buildroot}%{_libdir}" -type f -name 'lib*.so*' -exec strip {} +
find "%{buildroot}%{_libdir}" -type f -name 'tsplugin_*.so*' -exec strip {} +
find "%{buildroot}%{_libdir}" -type f -name 'tsduck*.so*' -exec strip {} +

install -D -d -m0755 %{buildroot}%{_prefix}/%{_lib}/udev/rules.d
mv -f %{buildroot}/etc/udev/rules.d/80-tsduck.rules %{buildroot}%{_prefix}/%{_lib}/udev/rules.d/80-tsduck.rules

install -D -d -m0755 %{buildroot}%{_etcdir}/profile.d
echo "TSPLUGINS_PATH=%{tsplugins_path}" > "%{buildroot}%{_etcdir}/profile.d/tsduck.sh"
install -D -d -m0755 %{buildroot}%{_etcdir}/ld.so.conf.d
echo "%{tsplugins_path}" > "%{buildroot}%{_etcdir}/ld.so.conf.d/tsduck.conf"

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%doc README.md README.ARIB.md TODO.txt CHANGELOG.txt CONTRIBUTORS.txt LICENSE.txt OTHERS.txt
%defattr(-,root,root,-)
%{_bindir}/tsanalyze
%{_bindir}/tsbitrate
%{_bindir}/tscmp
%{_bindir}/tsdate
%{_bindir}/tsdektec
%{_bindir}/tsdump
%{_bindir}/tsecmg
%{_bindir}/tsemmg
%{_bindir}/tsfixcc
%{_bindir}/tsftrunc
%{_bindir}/tsgenecm
%{_bindir}/tshides
%{_bindir}/tslsdvb
%{_bindir}/tsp
%{_bindir}/tspacketize
%{_bindir}/tspcontrol
%{_bindir}/tspsi
%{_bindir}/tsresync
%{_bindir}/tsscan
%{_bindir}/tssmartcard
%{_bindir}/tsstuff
%{_bindir}/tsswitch
%{_bindir}/tstabcomp
%{_bindir}/tstabdump
%{_bindir}/tstables
%{_bindir}/tsterinfo
%{_bindir}/tsversion
%{_libdir}/tsduck
%dir %{_sysconfdir}/security/console.perms.d
%config %{_sysconfdir}/security/console.perms.d/80-tsduck.perms
%dir %{_prefix}/%{_lib}/udev
%dir %{_prefix}/%{_lib}/udev/rules.d
%{_prefix}/%{_lib}/udev/rules.d/80-tsduck.rules

%files devel
%{_includedir}/tsduck

%files devel-static
%{_libdir}/libtsduck.a

%changelog
* Thu Apr 24 2025 - lapis@ku-ten.net
- update sources
- fix lint errors

* Thu Mar 5 2020 - lapis@ku-ten.net
- Initial package.
openSUSE Build Service is sponsored by