877b556
Name:           libmpeg2
877b556
Version:        0.5.1
877b556
Release:        18%{?dist}
877b556
Summary:        MPEG-2 decoder libraries
877b556
877b556
License:        GPLv2+
877b556
URL:            http://libmpeg2.sourceforge.net
877b556
Source0:        %{url}/files/libmpeg2-%{version}.tar.gz
877b556
# https://github.com/videolan/vlc/blob/master/contrib/src/libmpeg2/libmpeg2-inline.patch
877b556
Patch0:         libmpeg2-inline.patch
877b556
877b556
BuildRequires:  gcc
877b556
BuildRequires:  SDL-devel
877b556
BuildRequires:  libXt-devel
877b556
BuildRequires:  libXv-devel
877b556
# bootstrap deps
877b556
BuildRequires:  automake
877b556
BuildRequires:  libtool
877b556
877b556
877b556
%description
877b556
libmpeg2 is a free library for decoding mpeg-2 and mpeg-1 video
877b556
streams. It is released under the terms of the GPL license.
877b556
877b556
%package -n     mpeg2dec
877b556
Summary:        MPEG-2 decoder program
877b556
Requires:       %{name}%{?_isa} = %{version}-%{release}
877b556
877b556
%description -n mpeg2dec
877b556
The %{name}-devel package contains libraries and header files for
877b556
developing applications that use %{name}.
877b556
877b556
%package        devel
877b556
Summary:        Development files for %{name}
877b556
Requires:       %{name}%{?_isa} = %{version}-%{release}
877b556
877b556
877b556
%description    devel
877b556
The %{name}-devel package contains libraries and header files for
877b556
developing applications that use %{name}.
877b556
877b556
877b556
%prep
877b556
%setup -q
877b556
%patch0 -p1
877b556
autoreconf -fiv
877b556
877b556
iconv -f ISO-8859-1 -t UTF-8 AUTHORS > AUTHORS.tmp
877b556
touch -r AUTHORS AUTHORS.tmp 
877b556
cp -p -f AUTHORS.tmp AUTHORS
877b556
rm AUTHORS.tmp
877b556
877b556
#Disable ppc altivec case
877b556
sed -i -e 's/ppc-/noppc64-/' configure.ac configure
877b556
sed -i -e 's/powerpc-/nopowerpc64-/' configure.ac configure
877b556
877b556
%build
877b556
%configure --disable-static \
877b556
%ifarch %{ix86} ppc
877b556
  --disable-accel-detect \
877b556
%endif
877b556
877b556
# mpeg2dec have rpath
877b556
# remove rpath from libtool
877b556
sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
877b556
sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
877b556
877b556
%{make_build} \
877b556
%ifarch %{ix86}
877b556
  OPT_CFLAGS="-fPIC -DPIC" \
877b556
%else
877b556
  OPT_CFLAGS="" \
877b556
%endif
877b556
877b556
877b556
%install
877b556
%{make_install}
877b556
find %{buildroot} -name '*.la' -exec rm -f {} ';'
877b556
877b556
877b556
#Fix datatype internal definitions
877b556
install -pm 0644 libmpeg2/mpeg2_internal.h \
877b556
  %{buildroot}%{_includedir}/mpeg2dec/
877b556
877b556
%ldconfig_scriptlets
877b556
877b556
%files
877b556
%doc AUTHORS ChangeLog NEWS README TODO
877b556
%license COPYING
877b556
%{_libdir}/*.so.*
877b556
877b556
%files -n mpeg2dec
877b556
%{_bindir}/corrupt_mpeg2
877b556
%{_bindir}/extract_mpeg2
877b556
%{_bindir}/mpeg2dec
877b556
%{_mandir}/man1/*.1*
877b556
877b556
%files devel
877b556
%doc CodingStyle doc/libmpeg2.txt doc/sample*.c
877b556
%{_includedir}/mpeg2dec/
877b556
%{_libdir}/*.so
877b556
%{_libdir}/pkgconfig/libmpeg2.pc
877b556
%{_libdir}/pkgconfig/libmpeg2convert.pc
877b556
877b556
877b556
%changelog
877b556
* Wed May 08 2019 Yaakov Selkowitz <yselkowi@redhat.com> - 0.5.1-18
877b556
- Rebuilt for inclusion in Fedora
877b556
877b556
* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.5.1-17
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
877b556
877b556
* Thu Jul 26 2018 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.5.1-16
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
877b556
877b556
* Sun Apr 29 2018 Leigh Scott <leigh123linux@googlemail.com> - 0.5.1-15
877b556
- Add patch to fix inline warnings
877b556
- Spec file clean up
877b556
877b556
* Thu Mar 01 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 0.5.1-14
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
877b556
877b556
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 0.5.1-13
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
877b556
877b556
* Sun Mar 19 2017 RPM Fusion Release Engineering <kwizart@rpmfusion.org> - 0.5.1-12
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
877b556
877b556
* Sun Aug 31 2014 Sérgio Basto <sergio@serjux.com> - 0.5.1-11
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
877b556
877b556
* Sun Mar 03 2013 Nicolas Chauvet <kwizart@gmail.com> - 0.5.1-10
877b556
- Mass rebuilt for Fedora 19 Features
877b556
877b556
* Wed Jan 25 2012 Nicolas Chauvet <kwizart@gmail.com> - 0.5.1-9
877b556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
877b556
877b556
* Sat Oct 17 2009 kwizart < kwizart at gmail.com > - 0.5.1-8
877b556
- Rebuild for F-12
877b556
877b556
* Wed Apr  8 2009 kwizart < kwizart at gmail.com > - 0.5.1-7
877b556
- New attempt
877b556
877b556
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.5.1-6
877b556
- rebuild for new F11 features
877b556
877b556
* Fri Mar 27 2009 kwizart < kwizart at gmail.com > - 0.5.1-5
877b556
- Rebuild
877b556
- Fix target_arch conditionals
877b556
- Provides internal definitions mpeg2_internal.h
877b556
- Disable ppc altivec optim (TODO improve asm optim later)
877b556
 
877b556
* Sat Oct  4 2008 kwizart < kwizart at gmail.com > - 0.5.1-3
877b556
- Fix CFLAGS on x86 producing selinux denials.
877b556
877b556
* Wed Jul 30 2008 Thorsten Leemhuis 
877b556
- rebuild for buildsys cflags issue
877b556
877b556
* Fri Jul 18 2008 kwizart < kwizart at gmail.com > - 0.5.1-1
877b556
- Update to 0.5.1
877b556
877b556
* Tue Jul 15 2008 kwizart < kwizart at gmail.com > - 0.5.0-1
877b556
- Initial package (based on mpeg2dec)
877b556