File rtmpdump.spec of Package bookends

#
# spec file for package rtmpdump
#
# Copyright (c) 2015 SUSE LINUX 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 via http://bugs.opensuse.org/
#


%define soname 1
Name:           rtmpdump
Version:        2.4.20151223.fa8646d
Release:        1699.1.pm.37
Summary:        RTMP Stream Dumper
License:        GPL-2.0+ and LGPL-2.1+
Group:          Productivity/Networking/Other
Url:            http://rtmpdump.mplayerhq.hu/
Source:         %{name}-%{version}.tar.xz
Source1:        baselibs.conf
Patch1:         rtmpdump-fix_u32.patch
BuildRequires:  libgnutls-devel
BuildRequires:  pkgconfig
BuildRequires:  zlib-devel
Requires:       librtmp%{soname} = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A small dumper for media content streamed over the RTMP protocol (like BBC's
iPlayer high quality streams). Supplying an rtmp url will result in a dumped
flv file, which can be played/transcoded using ffmpeg/mplayer, etc.

%package -n librtmp%{soname}
Summary:        RTMP Stream Dumper Library
Group:          System/Libraries
License:        LGPL-2.1+

%description -n librtmp%{soname}
A small dumper for media content streamed over the RTMP protocol (like BBC's
iPlayer high quality streams). Supplying an rtmp url will result in a dumped
flv file, which can be played/transcoded using ffmpeg/mplayer, etc.

%package -n rtmpsuck
Summary:        RTMP Transparent Proxy Server
Group:          Productivity/Networking/Other
License:        GPL-2.0+

%description -n rtmpsuck
Proxy server that dumps RTMP streams.

%package -n rtmpsrv
Summary:        RTMP Server
Group:          Productivity/Networking/Other
License:        GPL-2.0+

%description -n rtmpsrv
Server for RTMP streams.

%package -n rtmpgw
Summary:        RTMP to HTTP Gateway
Group:          Productivity/Networking/Other
License:        GPL-2.0+

%description -n rtmpgw
HTTP gateway: this is an HTTP server that accepts requests that consist of
rtmpdump parameters. It then connects to the specified RTMP server and returns
the retrieved data in the HTTP response.

%package -n librtmp-devel
Summary:        RTMP Stream Dumping Library
Group:          Development/Libraries/C and C++
Requires:       librtmp%{soname} = %{version}
License:        LGPL-2.1+

%description -n librtmp-devel
A small dumper for media content streamed over the RTMP protocol (like BBC's
iPlayer high quality streams). Supplying an rtmp url will result in a dumped
flv file, which can be played/transcoded using ffmpeg/mplayer, etc.

%prep
%setup -q
%patch -P1

%build
make \
	 CC="gcc"            \
	 CRYPTO="GNUTLS"     \
	 OPT="%{optflags}"   \
	 prefix="%{_prefix}" \
	 libdir="%{_libdir}" \
	 MANDIR="%{_mandir}"

make -C librtmp              \
	 CC="gcc"            \
	 CRYPTO="GNUTLS"     \
	 OPT="%{optflags}"   \
	 prefix="%{_prefix}" \
	 libdir="%{_libdir}" \
	 MANDIR="%{_mandir}" \
	 librtmp.pc

%install
install -d "%{buildroot}%{_bindir}"
find . -mindepth 1 -maxdepth 1 -type f -executable -exec install -m0755 {} "%{buildroot}%{_bindir}/" \;

pushd librtmp
install -d "%{buildroot}%{_includedir}/librtmp" "%{buildroot}%{_libdir}" "%{buildroot}%{_libdir}/pkgconfig"
make \
	 prefix="%{buildroot}%{_prefix}" \
	 libdir="%{buildroot}%{_libdir}" \
	 INCDIR="%{buildroot}%{_includedir}/librtmp" \
	 MANDIR="%{buildroot}%{_mandir}" \
	 install
popd #librtmp
rm %{buildroot}%{_libdir}/librtmp.a

%post   -n librtmp%{soname} -p /sbin/ldconfig

%postun -n librtmp%{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README ChangeLog COPYING
%{_bindir}/rtmpdump

%files -n librtmp%{soname}
%defattr(-,root,root)
%doc COPYING
%{_libdir}/librtmp.so.%{soname}

%files -n rtmpsuck
%defattr(-,root,root)
%doc README ChangeLog COPYING
%{_bindir}/rtmpsuck

%files -n rtmpgw
%defattr(-,root,root)
%doc README ChangeLog COPYING
%{_bindir}/rtmpgw

%files -n rtmpsrv
%defattr(-,root,root)
%doc README ChangeLog COPYING
%{_bindir}/rtmpsrv

%files -n librtmp-devel
%defattr(-,root,root)
%{_includedir}/librtmp
%{_libdir}/librtmp.so
%{_libdir}/pkgconfig/librtmp.pc
%doc %{_mandir}/man3/librtmp.3%{ext_man}

%changelog
* Fri Jun  2 2017 olaf@aepfle.de
- Update to version 2.4.20151223.fa8646d (bsc#1034575)
* Sun Apr  3 2016 olaf@aepfle.de
- Add baselibs.conf, required by ffmpeg and gstreamer
* Sat Sep 12 2015 joerg.lorenzen@ki.tng.de
- Changed version tag because '~' is an illegal character in
  openSUSE 11.4.
- Build against openssl for SLES 11 and openSUSE 11.4 because
  package libnettle-devel isn't available for these distros.
* Fri Sep 11 2015 olaf@aepfle.de
- Build also librtmp/ with CRYPTO to get correct pkgconfig() data
* Wed May  6 2015 joerg.lorenzen@ki.tng.de
- update to 2.4.git20150115
  * Add extended timestamp for Type 3 chunks if necessary
  * Replace RTMP_PUB_ALLOC with RTMP_LF_FTCU and RTMP_LF_FAPU
  * Simplify the logic for freeing reused strings in RTMP_Close
  * Set RTMP_PUB_ALLOC if tcUrl is allocated in PublisherAuth
  * Reconnect directly when authenticating, don't wait for the close message
  * Extended timestamp field may be present in type 3 chunk headers
  * Fix leaks in AMF objects that contain arrays
  * Free the extra read buffer if the initial FLV buffer overflowed
  * Correct the count of bytes written to the initial FLV buffer
* Mon Apr 13 2015 zaitor@opensuse.org
- Replace openssl-devel for libgnutls-devel BuildRequires and pass
  CRYPTO="GNUTLS" to configure. Makes licensing easier to deal
  with.
* Thu Mar 26 2015 dimstar@opensuse.org
- Initial package, version 2.4~git20131007
openSUSE Build Service is sponsored by