--- /dev/null
+Stanislav Vorobiov <s.vorobiov@samsung.com>
--- /dev/null
+Copyright (C) 2000 - 2012 Samsung Electronics co., Ltd. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--- /dev/null
+SUBDIRS = src
--- /dev/null
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
--- /dev/null
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+AC_PREREQ(2.60)
+AC_INIT(libtbm-emulator, 1.0.0)
+AC_USE_SYSTEM_EXTENSIONS
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_INIT_AUTOMAKE([dist-bzip2])
+
+AM_CONFIG_HEADER([config.h])
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_PROG_CC
+
+AC_HEADER_STDC
+AC_SYS_LARGEFILE
+AC_FUNC_ALLOCA
+
+# Enable quiet compiles on automake 1.11.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+PKG_CHECK_MODULES(LIBDRM, libdrm)
+PKG_CHECK_MODULES(LIBTBM, libtbm)
+
+LIBTBM_EMULATOR_CFLAGS="$LIBDRM_CFLAGS $LIBTBM_CFLAGS "
+LIBTBM_EMULATOR_LIBS="$LIBDRM_LIBS $LIBTBM_LIBS "
+AC_SUBST(LIBTBM_EMULATOR_CFLAGS)
+AC_SUBST(LIBTBM_EMULATOR_LIBS)
+
+bufmgr_dir=${libdir#*/}
+AC_SUBST(bufmgr_dir)
+
+AC_OUTPUT([
+ Makefile
+ src/Makefile])
+
+echo ""
+echo "CFLAGS : $CFLAGS"
+echo "LDFLAGS : $LDFLAGS"
+echo "LIBTBM_EMULATOR_CFLAGS : $LIBTBM_EMULATOR_CFLAGS"
+echo "LIBTBM_EMULATOR_LIBS : $LIBTBM_EMULATOR_LIBS"
+echo "bufmgr_dir : $bufmgr_dir"
+echo ""
--- /dev/null
+Name: libtbm-emulator
+Version: 0.1.0
+Release: 1
+License: MIT
+Summary: Tizen Buffer Manager - emulator backend
+Group: System/Libraries
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig(pthread-stubs)
+BuildRequires: pkgconfig(libdrm)
+BuildRequires: pkgconfig(libtbm)
+
+Requires: libtbm
+Requires: libdrm2
+
+%description
+description: ${summary}
+
+%prep
+%setup -q
+
+%build
+autoreconf -vfi
+./configure --prefix=%{_prefix} --libdir=%{_libdir}/bufmgr \
+ CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+
+%make_install
+
+%post
+if [ -f %{_libdir}/bufmgr/libtbm_default.so ]; then
+ rm -rf %{_libdir}/bufmgr/libtbm_default.so
+fi
+ln -s libtbm_emulator.so %{_libdir}/bufmgr/libtbm_default.so
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/bufmgr/libtbm_*.so*
--- /dev/null
+AM_CFLAGS = \
+ @LIBTBM_EMULATOR_CFLAGS@ \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+libtbm_emulator_la_LTLIBRARIES = libtbm_emulator.la
+libtbm_emulator_ladir = /${bufmgr_dir}
+libtbm_emulator_la_LIBADD = @LIBTBM_EMULATOR_LIBS@
+
+libtbm_emulator_la_SOURCES = \
+ tbm_bufmgr_emulator.c