add packaging
authorAnas Nashif <anas.nashif@intel.com>
Sun, 4 Nov 2012 03:48:46 +0000 (20:48 -0700)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Fri, 7 Nov 2014 16:31:55 +0000 (17:31 +0100)
packaging/baselibs.conf [new file with mode: 0644]
packaging/libogg.spec [new file with mode: 0644]
packaging/m4.diff [new file with mode: 0644]

diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..d4b86c4
--- /dev/null
@@ -0,0 +1,3 @@
+libogg0
+  obsoletes "libogg-<targettype> <= <version>"
+  provides "libogg-<targettype> = <version>"
diff --git a/packaging/libogg.spec b/packaging/libogg.spec
new file mode 100644 (file)
index 0000000..12bc737
--- /dev/null
@@ -0,0 +1,73 @@
+Name:           libogg
+Version:        1.3.0
+Release:        0
+License:        BSD-3-Clause
+Summary:        Ogg Bitstream Library
+Url:            http://www.vorbis.com/
+Group:          System/Libraries
+Source:         %{name}-%{version}.tar.bz2
+Source2:        baselibs.conf
+Patch1:         lib64.dif
+Patch2:         m4.diff
+BuildRequires:  pkg-config
+
+%description
+Libogg is a library for manipulating ogg bitstreams.  It handles both
+making ogg bitstreams and getting packets from ogg bitstreams.
+
+Ogg is the native bitstream format of the libvorbis (Ogg Vorbis audio
+codec ) and the libtheora (Theora video codec)
+
+%package devel
+Summary:        Include Files and Libraries mandatory for Ogg Development
+Group:          Development/Libraries/C and C++
+Requires:       glibc-devel
+Requires:       libogg = %{version}
+
+%description devel
+This package contains all necessary include files and libraries needed
+to compile and develop applications that use libogg.
+
+%prep
+%setup -q
+%patch2
+if [ "%{_lib}" == "lib64" ]; then
+%patch1
+fi
+
+%build
+# Fix optimization level
+sed -i s,-O20,-O3,g configure
+
+%configure --disable-static
+make %{?_smp_mflags}
+
+
+%check
+make check
+
+
+%install
+make DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-devel install
+# remove unneeded files
+rm -f %{buildroot}%{_libdir}/*.la
+
+%post  -p /sbin/ldconfig
+
+%postun  -p /sbin/ldconfig
+
+%files
+%defattr(0644,root,root,0755)
+%doc AUTHORS CHANGES COPYING README
+%{_libdir}/libogg.so.*
+
+%files devel
+%defattr(0644,root,root,0755)
+%{_docdir}/%{name}-devel
+%{_includedir}/ogg
+%{_libdir}/libogg.so
+%dir %{_datadir}/aclocal
+%{_datadir}/aclocal/ogg.m4
+%{_libdir}/pkgconfig/ogg.pc
+
+%changelog
diff --git a/packaging/m4.diff b/packaging/m4.diff
new file mode 100644 (file)
index 0000000..123555a
--- /dev/null
@@ -0,0 +1,31 @@
+Index: ogg.m4
+===================================================================
+--- ogg.m4.orig
++++ ogg.m4
+@@ -20,7 +20,7 @@ AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--
+     OGG_LIBS=""
+   elif test "x$ogg_prefix" != "x" ; then
+     OGG_LIBS="-L$ogg_prefix/lib"
+-  elif test "x$prefix" != "xNONE" ; then
++  elif test "x$prefix" != "xNONE" -a "x$prefix" != "x/usr"; then
+     OGG_LIBS="-L$prefix/lib"
+   fi
+@@ -34,7 +34,7 @@ AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--
+     OGG_CFLAGS=""
+   elif test "x$ogg_prefix" != "x" ; then
+     OGG_CFLAGS="-I$ogg_prefix/include"
+-  elif test "x$prefix" != "xNONE"; then
++  elif test "x$prefix" != "xNONE" -a "x$prefix" != "x/usr"; then
+     OGG_CFLAGS="-I$prefix/include"
+   fi
+@@ -62,7 +62,7 @@ dnl
+ #include <string.h>
+ #include <ogg/ogg.h>
+-int main ()
++int main (void)
+ {
+   system("touch conf.oggtest");
+   return 0;