Update package structure 24/177224/2 accepted/tizen/unified/20180427.131014 submit/tizen/20180427.022926
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 26 Apr 2018 07:52:52 +0000 (16:52 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 26 Apr 2018 09:09:24 +0000 (18:09 +0900)
- Add devel package for header files and camera-hal-interface pc file
- Move header files to new devel package
- Add libcamera_hal_interface to mm-hal-interface package

[Version] 0.0.7
[Profile] Common
[Issue Type] Update
[Dependency module] pulseaudio-modules-tizen, gst-plugins-tizen

Change-Id: I19bfa1bc8d553677e8c79b7589ddc8fc33167d46
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Makefile.am
camera-hal-interface.pc.in [new file with mode: 0644]
configure.ac
include/camera/camera_hal_interface.h [moved from testcase/camera/camera_hal_interface.h with 98% similarity]
mm-hal-interface.manifest [new file with mode: 0644]
packaging/mm-hal-interface.spec
src/Makefile.am [new file with mode: 0644]
src/camera/Makefile.am [new file with mode: 0644]
src/camera/camera_hal_interface.c [moved from testcase/camera/camera_hal_interface.c with 99% similarity]
testcase/camera/Makefile.am
testcase/camera/camera_hal_tc.cpp

index efb1910..f149a4d 100644 (file)
@@ -1,2 +1,7 @@
-SUBDIRS = testcase
+SUBDIRS = src testcase
+
+pcfiles = camera-hal-interface.pc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = $(pcfiles)
+EXTRA_DIST = $(pcfiles)
 
diff --git a/camera-hal-interface.pc.in b/camera-hal-interface.pc.in
new file mode 100644 (file)
index 0000000..62243c6
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: camera-hal-interface
+Description: Multimedia Framework Camera HAL Interface library
+Requires: glib-2.0 dlog
+Version: $VERSION
+Libs: -L${libdir} -lcamera_hal_interface
+Cflags: -I${includedir}/
index 3898f00..711a40f 100644 (file)
@@ -29,8 +29,11 @@ AC_SUBST(DLOG_LIBS)
 # Checks for library functions.
 AC_CONFIG_FILES([
 Makefile
+src/Makefile
+src/camera/Makefile
 testcase/Makefile
 testcase/camera/Makefile
+camera-hal-interface.pc
 ])
 AC_OUTPUT
 
similarity index 98%
rename from testcase/camera/camera_hal_interface.h
rename to include/camera/camera_hal_interface.h
index bf0e880..6ee6c61 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * camera_hal_interface.h
+ *
  * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: Jeongmo Yang <jm80.yang@samsung.com>
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
  */
 
+
 #include <tizen-camera.h>
 
 
diff --git a/mm-hal-interface.manifest b/mm-hal-interface.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
index 3037c4b..f6482f3 100644 (file)
@@ -1,24 +1,34 @@
 Name:       mm-hal-interface
 Summary:    Multimedia HAL Interface
-Version:    0.0.6
+Version:    0.0.7
 Release:    0
 Group:      Multimedia/Development
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  gtest-devel
 
 %description
 Multimedia framework hardware abstraction layer interface package.
 
 
+%package devel
+Summary:    Multimedia framework hardware abstraction layer interface development package
+Group:      libdevel
+Version:    %{version}
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Multimedia framework hardware abstraction layer interface development 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.
@@ -40,13 +50,23 @@ install -m 644 include/camera/*.h %{buildroot}%{_includedir}
 install -m 644 include/radio/*.h %{buildroot}%{_includedir}
 %make_install
 
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
 %post -n camera-hal-gtests -p /sbin/ldconfig
 %postun -n camera-hal-gtests -p /sbin/ldconfig
 
 %files
+%manifest mm-hal-interface.manifest
+%license LICENSE.APLv2
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+
+%files devel
 %defattr(-,root,root,-)
 %{_includedir}/*.h
-%license LICENSE.APLv2
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
 
 %files -n camera-hal-gtests
 %manifest mm-hal-gtests.manifest
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..ac1b359
--- /dev/null
@@ -0,0 +1,2 @@
+SUBDIRS = camera
+
diff --git a/src/camera/Makefile.am b/src/camera/Makefile.am
new file mode 100644 (file)
index 0000000..4545434
--- /dev/null
@@ -0,0 +1,6 @@
+lib_LTLIBRARIES = libcamera_hal_interface.la
+
+libcamera_hal_interface_la_SOURCES = camera_hal_interface.c
+libcamera_hal_interface_la_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera
+libcamera_hal_interface_la_LIBADD = $(GLIB_LIBS) $(DLOG_LIBS) -ldl
+
similarity index 99%
rename from testcase/camera/camera_hal_interface.c
rename to src/camera/camera_hal_interface.c
index cc2f4d7..4b484eb 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * camera_hal_interface.c
+ *
  * Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: Jeongmo Yang <jm80.yang@samsung.com>
@@ -14,6 +16,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -84,7 +87,7 @@ int camera_hal_interface_init(camera_hal_interface **h)
                tmp_h->intf.set_batch_command = dlsym(tmp_h->dl_handle, "camera_set_batch_command");
 
                if (tmp_h->intf.init == NULL || tmp_h->intf.deinit == NULL) {
-                       LOGE("could not get mandatory funtion. %p %1p", tmp_h->intf.init, tmp_h->intf.deinit);
+                       LOGE("could not get mandatory function. %p %p", tmp_h->intf.init, tmp_h->intf.deinit);
                        ret = CAMERA_ERROR_INTERNAL;
                        goto _CAMERA_HAL_INTERFACE_GET_FAILED;
                }
@@ -588,4 +591,3 @@ int camera_hal_interface_set_batch_command(camera_hal_interface *h, camera_batch
 
        return ret;
 }
-
index 13e0782..67def42 100644 (file)
@@ -1,14 +1,18 @@
 # with gtest
 bin_PROGRAMS = camera_hal_gtests
 
-camera_hal_gtests_SOURCES = camera_hal_tc.cpp camera_hal_interface.c
+camera_hal_gtests_SOURCES = \
+       camera_hal_tc.cpp
 
-camera_hal_gtests_CFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS)
-camera_hal_gtests_CPPFLAGS = $(GLIB_CFLAGS) $(DLOG_CFLAGS) -I$(srcdir)/../../include/camera
+camera_hal_gtests_CPPFLAGS = \
+       $(GLIB_CFLAGS)\
+       $(DLOG_CFLAGS)\
+       -I$(srcdir)/../../include/camera
 
 camera_hal_gtests_LDADD = \
-       -ldl \
-       -lgtest \
-       $(GLIB_LIBS) \
+       -ldl\
+       -lgtest\
+       $(top_builddir)/src/camera/libcamera_hal_interface.la\
+       $(GLIB_LIBS)\
        $(DLOG_LIBS)
 
index 15fe032..3d3c149 100644 (file)
@@ -21,7 +21,7 @@
 #include <gtest/gtest.h>
 #include <unistd.h>
 #include <iostream>
-#include "camera_hal_interface.h"
+#include <camera_hal_interface.h>
 
 using namespace std;