--- /dev/null
+#! /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
+
--- /dev/null
+Name: gst-omx
+Summary: GStreamer plug-in that allows communication with OpenMAX IL components
+Version: 1.0.0
+Release: 1
+License: LGPL-2.1+
+Group: Multimedia/Framework
+Source0: %{name}-%{version}.tar.gz
+Source100: common.tar.bz2
+Source1001: gst-omx.manifest
+BuildRequires: which
+BuildRequires: pkgconfig(gstreamer-1.0)
+BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
+
+%description
+gst-openmax is a GStreamer plug-in that allows communication with OpenMAX IL components.
+Multiple OpenMAX IL implementations can be used.
+
+%prep
+%setup -q
+%setup -q -T -D -a 100
+cp %{SOURCE1001} .
+
+%build
+./autogen.sh --noconfigure
+%configure --disable-static --prefix=/usr
+
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%files
+%manifest gst-omx.manifest
+%{_libdir}/gstreamer-1.0/libgstomx.so
+