packaging: Initial packaging on 1.2.0 for Tizen
authorYan Yin <yan.yin@intel.com>
Wed, 9 Oct 2013 02:23:39 +0000 (10:23 +0800)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Tue, 18 Nov 2014 12:49:02 +0000 (13:49 +0100)
Change-Id: I6bf89cdea193498b52f3ed27a6f52c342f5590c9

.gbs.conf [new file with mode: 0644]
.gitignore
packaging/baselibs.conf [new file with mode: 0644]
packaging/common.tar.bz2 [new file with mode: 0644]
packaging/gitmodules.sh [new file with mode: 0755]
packaging/gstreamer.changes [new file with mode: 0644]
packaging/gstreamer.macros [new file with mode: 0644]
packaging/gstreamer.manifest [new file with mode: 0644]
packaging/gstreamer.prov [new file with mode: 0644]
packaging/gstreamer.spec [new file with mode: 0644]

diff --git a/.gbs.conf b/.gbs.conf
new file mode 100644 (file)
index 0000000..fa9fdc5
--- /dev/null
+++ b/.gbs.conf
@@ -0,0 +1,3 @@
+[general]
+upstream_branch = upstream
+upstream_tag = ${upstreamversion}
index d5ae273..52c0b9d 100644 (file)
@@ -17,7 +17,6 @@ gstreamer-[0-9]*
 gstreamer-config
 gstreamer.pc
 gstreamer-uninstalled.pc
-gstreamer.spec
 gst-element-check-*.m4
 libtool
 ltconfig
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..10121bf
--- /dev/null
@@ -0,0 +1,2 @@
+gstreamer
+libgstreamer
diff --git a/packaging/common.tar.bz2 b/packaging/common.tar.bz2
new file mode 100644 (file)
index 0000000..3470760
Binary files /dev/null and b/packaging/common.tar.bz2 differ
diff --git a/packaging/gitmodules.sh b/packaging/gitmodules.sh
new file mode 100755 (executable)
index 0000000..71a66cd
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/sh
+# @author: Philippe Coval <mailto:philippe.coval@eurogiciel.com>
+# @description: manage git submodules with git-build-package-rpm
+
+set -x
+set -e
+
+cat .gitmodules || return 1
+
+
+git submodule status | awk '{ print $2 }' | while read dir  ; do
+    name=$(basename "$dir" )
+    echo "name="
+    echo "dir=$dir"
+    git submodule init
+    git submodule update
+
+    tar cjvf "./packaging/${name}.tar.bz2" "${dir}"
+
+    cat<<EOF
+# Please add "SourceN: $name.tar.bz2" and "%setup -q -T -D -a N" to "packaging/*.spec"
+EOF
+
+done
diff --git a/packaging/gstreamer.changes b/packaging/gstreamer.changes
new file mode 100644 (file)
index 0000000..8e4f12f
--- /dev/null
@@ -0,0 +1,8 @@
+* Fri Mar 29 2013 Anas Nashif <anas.nashif@intel.com> upstream/1.0.6@8cb0dd3
+- Update to 1.0.6
+
+* Mon Mar 18 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130123.171619@c9f5335
+- Fixed package groups
+
+* Wed Jan 23 2013 Anas Nashif <anas.nashif@intel.com> upstream/1.0.5@3de29c4
+- Update to 1.0.5
diff --git a/packaging/gstreamer.macros b/packaging/gstreamer.macros
new file mode 100644 (file)
index 0000000..d8662ff
--- /dev/null
@@ -0,0 +1,4 @@
+%__gstreamer_provides  %{_rpmconfigdir}/gstreamer-provides
+%__gstreamer_path      libgst
+%__gstreamer_magic     ELF.*shared object
+%__gstreamer_flags     magic_and_path
diff --git a/packaging/gstreamer.manifest b/packaging/gstreamer.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/gstreamer.prov b/packaging/gstreamer.prov
new file mode 100644 (file)
index 0000000..304da2f
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Script to install in:
+# /usr/lib/rpm/redhat/find-provides.d
+#
+# Transform GStreamer auto install info into RPM provides
+#
+# Author: Bastien Nocera <hadess@hadess.net>
+# Based on other provides scripts from RPM
+#
+
+# We need a way to disable automatic gst provides.
+# Simply "%define SKIP_GSTPROVIDES 1" anywhere in the spec file
+grep -q -E '^[^#]?%define\s+SKIP_GSTPROVIDES\s.*[^0\s].*' "$RPMBUILD_SPECFILE" && exit 0
+
+filelist=`grep -e '.so$' | sed "s/['\"]/\\\&/g"`
+
+# --- Alpha does not mark 64bit dependencies•
+case `uname -m` in
+  alpha*)      mark64="" ;;
+  *)           mark64="()(64bit)" ;;
+esac
+
+solist=$(echo $filelist | grep "libgst" | \
+       xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1 )
+
+function getmark()
+{
+       lib64=`if file -L $1 2>/dev/null | \
+               grep "ELF 64-bit" >/dev/null; then echo -n "$mark64"; fi`
+}
+
+function libdir()
+{
+       buildlibdir=`dirname $1`
+       buildlibdir=`dirname $buildlibdir`
+}
+
+for so in $solist ; do
+       getmark $so
+       libdir $so
+       LD_LIBRARY_PATH=$buildlibdir gst-inspect-1.0 --print-plugin-auto-install-info --rpm $so 2> /dev/null | while read line ; do
+               echo -n "$line";
+               echo -n "$lib64"
+               echo
+       done
+done
diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec
new file mode 100644 (file)
index 0000000..17fed74
--- /dev/null
@@ -0,0 +1,183 @@
+%bcond_with introspection
+
+Name:           gstreamer
+Version:        1.2.0
+Release:        0
+%define gst_branch 1.0
+Summary:        Streaming-Media Framework Runtime
+License:        LGPL-2.1+
+Group:          Multimedia/Framework
+Url:            http://gstreamer.freedesktop.org/
+Source0:        http://download.gnome.org/sources/gstreamer/1.0/%{name}-%{version}.tar.xz
+Source1:        gstreamer.macros
+Source2:        gstreamer.prov
+Source99:       baselibs.conf
+Source100:      common.tar.bz2
+Source1001:    gstreamer.manifest
+BuildRequires:  bison
+BuildRequires: gettext-tools
+BuildRequires:  check-devel
+BuildRequires:  fdupes
+BuildRequires:  flex
+BuildRequires:  glib2-devel >= 2.32.0
+BuildRequires:  libtool
+BuildRequires:  gst-common
+BuildRequires:  libxml2-devel
+%if %{with introspection}
+BuildRequires:  gobject-introspection-devel >= 1.31.1
+%endif
+Requires:       libgstreamer >= %{version}
+
+%description
+GStreamer is a streaming-media framework, based on graphs of filters
+which operate on media data. Applications using this library can do
+anything from real-time sound processing to playing videos, and just
+about anything else media-related.  Its plug-in-based architecture
+means that new data types or processing capabilities can be added by
+installing new plug-ins.
+
+%package -n libgstreamer
+Summary:        Streaming-Media Framework Runtime
+Group:          Multimedia/Framework
+# We want to have core modules installed:
+Requires:       %{name}
+
+%description -n libgstreamer
+GStreamer is a streaming-media framework, based on graphs of filters
+which operate on media data. Applications using this library can do
+anything from real-time sound processing to playing videos, and just
+about anything else media-related.  Its plug-in-based architecture
+means that new data types or processing capabilities can be added by
+installing new plug-ins.
+
+%package -n typelib-Gst
+Summary:        Streaming-Media Framework Runtime -- Introspection bindings
+Group:          Multimedia/Framework
+
+%description -n typelib-Gst
+GStreamer is a streaming-media framework, based on graphs of filters
+which operate on media data. Applications using this library can do
+anything from real-time sound processing to playing videos, and just
+about anything else media-related.  Its plug-in-based architecture
+means that new data types or processing capabilities can be added by
+installing new plug-ins.
+
+This package provides the GObject Introspection bindings for GStreamer.
+
+%package utils
+Summary:        Streaming-Media Framework Runtime
+Group:          Multimedia/Framework
+Provides:       gstreamer:%{_bindir}/gst-launch-%{gst_branch} = %{version}
+# Symbol for unversioned wrappers:
+Provides:       gstreamer-utils_versioned = %{version}
+
+%description utils
+GStreamer is a streaming-media framework, based on graphs of filters
+which operate on media data. Applications using this library can do
+anything from real-time sound processing to playing videos, and just
+about anything else media-related.  Its plug-in-based architecture
+means that new data types or processing capabilities can be added by
+installing new plug-ins.
+
+%package devel
+Summary:        Include Files and Libraries mandatory for Development
+Group:          Development/Libraries
+Requires:       %{name} = %{version}
+# gstreamer-utils is required for the gstreamer-provides rpm magic.
+Requires:       gstreamer-utils = %{version}
+Requires:       libgstreamer = %{version}
+%if %{with introspection}
+Requires:       typelib-Gst = %{version}
+%endif
+
+%description devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+%lang_package
+
+%prep
+%setup -q -n gstreamer-%{version}
+%setup -q -T -D -a 100
+cp %{SOURCE1001} .
+
+%build
+# FIXME: GTKDOC_CFLAGS, GST_OBJ_CFLAGS:
+# Silently ignored compilation of uninstalled gtk-doc scanners without RPM_OPT_FLAGS.
+export V=1
+NOCONFIGURE=1 ./autogen.sh
+export CFLAGS="%{optflags} -fno-strict-aliasing"
+%configure\
+%if %{with introspection}
+        --enable-introspection\
+%endif
+       --disable-static
+make %{?_smp_mflags}
+
+%install
+%make_install
+mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
+mkdir -p %{buildroot}%{_docdir}/%{name}
+%find_lang %{name}-%{gst_branch}
+mv %{name}-%{gst_branch}.lang %{name}.lang
+rm -rf %{buildroot}%{_datadir}/gtk-doc
+rm -rf %{buildroot}%{_docdir}/%{name}/manual
+rm -rf %{buildroot}%{_docdir}/%{name}/pwg
+mkdir -p %{buildroot}%{_datadir}/gstreamer-%{gst_branch}/presets
+%__install -m644 -D %{S:1} %{buildroot}%{_libexecdir}/rpm/fileattrs/gstreamer.attr
+%__install -m755 -D %{S:2} %{buildroot}%{_libexecdir}/rpm/gstreamer-provides
+%fdupes %{buildroot}
+
+
+%post -n libgstreamer -p /sbin/ldconfig
+
+%postun -n libgstreamer -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license COPYING
+%dir %{_datadir}/gstreamer-%{gst_branch}
+%dir %{_datadir}/gstreamer-%{gst_branch}/presets
+%dir %{_libdir}/gstreamer-%{gst_branch}
+%{_libdir}/gstreamer-%{gst_branch}/*.so
+%dir %{_libexecdir}/gstreamer-%{gst_branch}
+%{_libexecdir}/gstreamer-%{gst_branch}/gst-plugin-scanner
+
+%files -n libgstreamer
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libdir}/*.so.*
+
+
+%if %{with introspection}
+%files -n typelib-Gst
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libdir}/girepository-1.0/Gst-1.0.typelib
+%{_libdir}/girepository-1.0/GstBase-1.0.typelib
+%{_libdir}/girepository-1.0/GstCheck-1.0.typelib
+%{_libdir}/girepository-1.0/GstController-1.0.typelib
+%{_libdir}/girepository-1.0/GstNet-1.0.typelib
+%endif
+
+%files utils
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_bindir}/*-%{gst_branch}
+%doc %{_mandir}/man?/*-%{gst_branch}.*
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_datadir}/aclocal/*.m4
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+%{_libexecdir}/rpm/gstreamer-provides
+%{_libexecdir}/rpm/fileattrs/gstreamer.attr
+%if %{with introspection}
+%{_datadir}/gir-1.0/*.gir
+%endif
+
+%changelog