diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db71728 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gst-plugins-ugly-free-1.10.4.tar.xz diff --git a/.gstreamer1-plugins-ugly-free.metadata b/.gstreamer1-plugins-ugly-free.metadata new file mode 100644 index 0000000..932f029 --- /dev/null +++ b/.gstreamer1-plugins-ugly-free.metadata @@ -0,0 +1 @@ +e6b2fc457b8c6dd04497ffee838e41f9498441d0 SOURCES/gst-plugins-ugly-free-1.10.4.tar.xz diff --git a/SOURCES/gst-p-ugly-cleanup.sh b/SOURCES/gst-p-ugly-cleanup.sh new file mode 100755 index 0000000..6fc69cf --- /dev/null +++ b/SOURCES/gst-p-ugly-cleanup.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +# Process a gst-plugins-ugly tarball to remove +# unwanted GStreamer plugins. +# +# See https://bugzilla.redhat.com/show_bug.cgi?id=1397261 +# for details +# +# Bastien Nocera - 2010 +# Yaakov Selkowitz - 2016 +# + +SOURCE="$1" +NEW_SOURCE=`echo $SOURCE | sed 's/ugly-/ugly-free-/'` +DIRECTORY=`echo $SOURCE | sed 's/\.tar\.xz//'` + +ALLOWED=" +xingmux +" + +NOT_ALLOWED=" +asfdemux +dvdlpcmdec +dvdsub +realmedia +" + +error() +{ + MESSAGE=$1 + echo $MESSAGE + exit 1 +} + +check_allowed() +{ + MODULE=$1 + for i in $ALLOWED ; do + if test x$MODULE = x$i ; then + return 0; + fi + done + # Ignore errors coming from ext/ directory + # they require external libraries so are ineffective anyway + return 1; +} + +check_not_allowed() +{ + MODULE=$1 + for i in $NOT_ALLOWED ; do + if test x$MODULE = x$i ; then + return 0; + fi + done + return 1; +} + +rm -rf $DIRECTORY +tar xJf $SOURCE || error "Cannot unpack $SOURCE" +pushd $DIRECTORY > /dev/null || error "Cannot open directory \"$DIRECTORY\"" + +unknown="" +for subdir in gst ext; do + for dir in $subdir/* ; do + # Don't touch non-directories + if ! [ -d $dir ] ; then + continue; + fi + MODULE=`basename $dir` + if ( check_not_allowed $MODULE ) ; then + echo "**** Removing $MODULE ****" + echo "Removing directory $dir" + rm -r $dir || error "Cannot remove $dir" + if grep -q "AG_GST_CHECK_PLUGIN($MODULE)" configure.ac ; then + echo "Removing element check for $MODULE" + grep -v "AG_GST_CHECK_PLUGIN($MODULE)" configure.ac > configure.ac.new && mv configure.ac.new configure.ac + fi + echo "Removing Makefile generation for $MODULE" + grep -v "$dir/Makefile" configure.ac > configure.ac.new && mv configure.ac.new configure.ac + echo "Removing documentation for $MODULE" + if grep -q "$MODULE" docs/plugins/Makefile.am ; then + grep -v $dir docs/plugins/Makefile.am > docs/plugins/Makefile.am.new && mv docs/plugins/Makefile.am.new docs/plugins/Makefile.am + fi + echo + elif test $subdir = ext || test $subdir = sys; then + # Ignore library or system non-blacklisted plugins + continue; + elif ! ( check_allowed $MODULE ) ; then + echo "Unknown module in $dir" + unknown="$unknown $dir" + fi + done +done + +echo "Fixing up AC_CONFIG_SRCDIR" +sed -e '/AC_CONFIG_SRCDIR/s/asfdemux/xingmux/g' configure.ac > configure.ac.new && mv configure.ac.new configure.ac + +echo "Fixing up docs/plugins/Makefile.am" +sed -e ':a;N;$!ba;s| *\\\n\n|\n\n|g' docs/plugins/Makefile.am > docs/plugins/Makefile.am.new && mv docs/plugins/Makefile.am.new docs/plugins/Makefile.am + +echo + +if test "x$unknown" != "x"; then + echo -n "Aborting due to unknown modules: " + echo "$unknown" | sed "s/ /\n /g" + exit 1 +fi + +autoreconf + +popd > /dev/null + +tar cJf $NEW_SOURCE $DIRECTORY +echo "$NEW_SOURCE is ready to use" + diff --git a/SPECS/gstreamer1-plugins-ugly-free.spec b/SPECS/gstreamer1-plugins-ugly-free.spec new file mode 100644 index 0000000..565d3ab --- /dev/null +++ b/SPECS/gstreamer1-plugins-ugly-free.spec @@ -0,0 +1,164 @@ +%global majorminor 1.0 + +#global gitrel 140 +#global gitcommit 4ca3a22b6b33ad8be4383063e76f79c4d346535d +#global shortcommit %(c=%{gitcommit}; echo ${c:0:5}) + +%if 0%{?fedora} +%global enable_a52 1 +%endif + +Name: gstreamer1-plugins-ugly-free +Version: 1.10.4 +Release: 3%{?dist} +Summary: GStreamer streaming media framework "ugly" plugins + +License: LGPLv2+ and LGPLv2 +URL: http://gstreamer.freedesktop.org/ +%if 0%{?gitrel} +# git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly +# cd gst-plugins-ugly; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck +# modified with gst-p-ugly-cleanup.sh from SOURCE1 +%else +# The source is: +# http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-%{version}.tar.xz +# modified with gst-p-ugly-cleanup.sh from SOURCE1 +%endif +Source0: gst-plugins-ugly-free-%{version}.tar.xz +Source1: gst-p-ugly-cleanup.sh + +BuildRequires: gstreamer1-devel >= %{version} +BuildRequires: gstreamer1-plugins-base-devel >= %{version} + +BuildRequires: check +BuildRequires: gettext-devel +BuildRequires: gtk-doc + +%if 0%{?enable_a52} +BuildRequires: liba52-devel +%endif +BuildRequires: libcdio-devel +BuildRequires: libdvdread-devel +BuildRequires: mpg123-devel + +Obsoletes: gstreamer1-plugin-mpg123 < %{version}-%{release} +Provides: gstreamer1-plugin-mpg123 = %{version}-%{release} + + +%description +GStreamer is a streaming media framework, based on graphs of elements which +operate on media data. + +This package contains plug-ins whose license is not fully compatible with LGPL. + +%package devel +Summary: Development files for the GStreamer media framework "ugly" plug-ins +Requires: %{name} = %{version}-%{release} +Requires: gstreamer1-plugins-base-devel + + +%description devel +GStreamer is a streaming media framework, based on graphs of elements which +operate on media data. + +This package contains the development files for the plug-ins whose license +is not fully compatible with LGPL. + + +%prep +%setup -q -n gst-plugins-ugly-%{version} + + +%build +# libsidplay was removed as obsolete, not forbidden +%configure --disable-silent-rules --disable-fatal-warnings \ + --with-package-name="GStreamer-plugins-ugly package" \ + --with-package-origin="http://www.redhat.com" \ + --enable-debug --disable-static --enable-gtk-doc --enable-experimental \ + --disable-amrnb --disable-amrwb --disable-lame \ + %{!?enable_a52:--disable-a52dec} \ + --disable-mpeg2dec --disable-sidplay --disable-twolame --disable-x264 +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +# Register as an AppStream component to be visible in the software center +# +# NOTE: It would be *awesome* if this file was maintained by the upstream +# project, translated and installed into the right place during `make install`. +# +# See http://www.freedesktop.org/software/appstream/docs/ for more details. +# +mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata +cat > $RPM_BUILD_ROOT%{_datadir}/appdata/gstreamer-ugly-free.appdata.xml < + + + gstreamer-ugly-free + CC0-1.0 + GStreamer Multimedia Codecs - Extra + Multimedia playback for CD, DVD, and MP3 + +

+ This addon includes several additional codecs that have good quality and + correct functionality, but whose license is not fully compatible with LGPL. +

+

+ These codecs can be used to encode and decode media files where the + format is not patent encumbered. +

+

+ A codec decodes audio and video for for playback or editing and is also + used for transmission or storage. + Different codecs are used in video-conferencing, streaming media and + video editing applications. +

+
+ + CD + DVD + MP3 + + http://gstreamer.freedesktop.org/ + https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer + http://gstreamer.freedesktop.org/documentation/ + http://www.gnome.org/friends/ + +
+EOF + +%find_lang gst-plugins-ugly-%{majorminor} +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + + +%files -f gst-plugins-ugly-%{majorminor}.lang +%license COPYING +%doc AUTHORS README REQUIREMENTS + +%{_datadir}/appdata/*.appdata.xml + +# Plugins without external dependencies +%{_libdir}/gstreamer-%{majorminor}/libgstxingmux.so + +# Plugins with external dependencies +%if 0%{?enable_a52} +%{_libdir}/gstreamer-%{majorminor}/libgsta52dec.so +%endif +%{_libdir}/gstreamer-%{majorminor}/libgstcdio.so +%{_libdir}/gstreamer-%{majorminor}/libgstdvdread.so +%{_libdir}/gstreamer-%{majorminor}/libgstmpg123.so + +%files devel +%doc %{_datadir}/gtk-doc/html/gst-plugins-ugly-plugins-%{majorminor} + + +%changelog +* Tue Oct 17 2017 Wim Taymans - 1.10.4-3 +- Fix for RHEL +- Disable a52dec +Resolves: #1481754 + +* Thu May 11 2017 Yaakov Selkowitz - 1.10.4-2 +- Initial Fedora spec file