--- /dev/null
+SUBDIRS = testcase
+
--- /dev/null
+#! /bin/sh
+
+libtoolize --copy --force
+aclocal -I m4
+autoheader
+autoconf
+automake -a -c
--- /dev/null
+AC_PREREQ(2.52)
+
+AC_INIT([mm-hal-testcase], [0.8.0])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_CONFIG_HEADERS([config.h:config.hin])
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_CC_C_O
+AC_C_CONST
+AC_HEADER_STDBOOL
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_PROG_GCC_TRADITIONAL
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+PKG_CHECK_MODULES(GLIB, glib-2.0)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(DLOG, dlog)
+AC_SUBST(DLOG_CFLAGS)
+AC_SUBST(DLOG_LIBS)
+
+# Checks for library functions.
+AC_CONFIG_FILES([
+Makefile
+testcase/Makefile
+testcase/camera/Makefile
+])
+AC_OUTPUT
+
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
Name: mm-hal-interface
Summary: Multimedia HAL Interface
-Version: 0.0.4
+Version: 0.0.5
Release: 0
Group: Multimedia/Development
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-BuildArch: noarch
%description
Multimedia framework hardware abstraction layer interface package.
+
+%package -n camera-hal-gtests
+Summary: gtest for camera HAL APIs
+Group: Development/Tools
+Version: %{version}
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: gtest-devel
+
+%description -n camera-hal-gtests
+gtest for camera HAL APIs.
+
+
%prep
%setup -q
%build
-
+export CFLAGS+=" -D_LARGEFILE64_SOURCE"
+./autogen.sh
+%configure --disable-static
+make %{?jobs:-j%jobs}
%install
install -d -m 755 %{buildroot}%{_includedir}
install -m 644 include/audio/*.h %{buildroot}%{_includedir}
install -m 644 include/camera/*.h %{buildroot}%{_includedir}
install -m 644 include/radio/*.h %{buildroot}%{_includedir}
+%make_install
+
+%post -n camera-hal-gtests -p /sbin/ldconfig
+%postun -n camera-hal-gtests -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_includedir}/*.h
%license LICENSE.APLv2
+
+%files -n camera-hal-gtests
+%manifest mm-hal-gtests.manifest
+%license LICENSE.APLv2
+%defattr(-,root,root,-)
+%{_bindir}/camera_*
+++ /dev/null
-#! /bin/sh
-
-# variable
-tc_build_dir=testcase/build
-tc_build_files="Makefile.am autogen.sh configure.ac mm-hal-testcase.manifest"
-spec_path_interface=packaging/mm-hal-interface.spec
-spec_path_testcase=packaging/mm-hal-testcase.spec
-
-# usage
-print_usage()
-{
- echo "[usage] : $0 [y|n]"
- echo " - y : set up environment to build testcase"
- echo " - n : remove environment to build testcase"
- exit 0
-}
-
-# check argument
-if [ $# != 1 ]
-then
-
- print_usage
-
-fi
-
-if [ $1 = "y" ]
-then
- # set up TC build environment
- for file in $tc_build_files
- do
- mv $tc_build_dir/$file .
- done
-
- mv $spec_path_interface $spec_path_interface.bak
- mv $spec_path_testcase.bak $spec_path_testcase
-
-elif [ $1 = "n" ]
-then
- # reset TC build environment
- for file in $tc_build_files
- do
- mv $file $tc_build_dir
- done
-
- mv $spec_path_interface.bak $spec_path_interface
- mv $spec_path_testcase $spec_path_testcase.bak
-
-else
-
- echo "Unknown argument : $1"
- print_usage
-
-fi
-
-exit 0
-
-if TC_CAMERA
SUBDIRS = camera
-endif
+++ /dev/null
-SUBDIRS = testcase
-
+++ /dev/null
-#! /bin/sh
-
-libtoolize --copy --force
-aclocal -I m4
-autoheader
-autoconf
-automake -a -c
+++ /dev/null
-AC_PREREQ(2.52)
-
-AC_INIT([mm-hal-testcase], [0.8.0])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-AC_CONFIG_HEADERS([config.h:config.hin])
-AC_CONFIG_MACRO_DIR([m4])
-
-# Checks for programs.
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-AC_PROG_CC
-AC_PROG_CXX
-AM_PROG_CC_C_O
-AC_C_CONST
-AC_HEADER_STDBOOL
-AC_HEADER_STDC
-AC_HEADER_TIME
-AC_PROG_GCC_TRADITIONAL
-AC_PROG_LIBTOOL
-
-# Checks for libraries.
-AC_ARG_ENABLE(tc-camera, AC_HELP_STRING([--enable-tc-camera], [enable tc-camera]),
-[
- case "${enableval}" in
- yes) TC_CAMERA=yes ;;
- no) TC_CAMERA=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-tc-camera) ;;
- esac
-],[TC_CAMERA=no])
-AM_CONDITIONAL([TC_CAMERA], [test "x$TC_CAMERA" = "xyes"])
-
-PKG_CHECK_MODULES(GLIB, glib-2.0)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(DLOG, dlog)
-AC_SUBST(DLOG_CFLAGS)
-AC_SUBST(DLOG_LIBS)
-
-# Checks for library functions.
-AC_CONFIG_FILES([
-Makefile
-testcase/Makefile
-testcase/camera/Makefile
-])
-AC_OUTPUT
-
+++ /dev/null
-<manifest>
- <request>
- <domain name="_" />
- </request>
-</manifest>
# with gtest
-bin_PROGRAMS = camera_hal_tc
+bin_PROGRAMS = camera_hal_gtests
-camera_hal_tc_SOURCES = camera_hal_tc.cpp camera_hal_interface.c
+camera_hal_gtests_SOURCES = camera_hal_tc.cpp camera_hal_interface.c
-camera_hal_tc_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS)
-camera_hal_tc_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS)
+camera_hal_gtests_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS)
+camera_hal_gtests_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera
-camera_hal_tc_LDADD = \
+camera_hal_gtests_LDADD = \
-ldl \
-lgtest \
$(GLIB_LIBS) \