pass-hal: tm2: Create spec file for RPM package
authorWook Song <wook16.song@samsung.com>
Wed, 8 Feb 2017 05:45:41 +0000 (14:45 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 9 Feb 2017 09:55:21 +0000 (18:55 +0900)
This patch creates files required to build the RPM package. Although it
is possible to build the package, only one empty RPM file would be
created since source files are not implemented yet.

Change-Id: I5d573623669d2284d8b285af67faa54cc0fe6cef
Signed-off-by: Wook Song <wook16.song@samsung.com>
CMakeLists.txt [new file with mode: 0644]
packaging/pass-hal-tm2.manifest [new file with mode: 0644]
packaging/pass-hal-tm2.spec [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..78f784c
--- /dev/null
@@ -0,0 +1,16 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(pass-hal-tm2 C)
+
+SET(CMAKE_VERBOSE_MAKEFILE ON)
+
+SET(PKG_MODULES
+       dlog)
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
+
+FOREACH(flag ${pkgs_CFLAGS})
+         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(DEST_DIR ${LIB_INSTALL_DIR}/pass)
diff --git a/packaging/pass-hal-tm2.manifest b/packaging/pass-hal-tm2.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/packaging/pass-hal-tm2.spec b/packaging/pass-hal-tm2.spec
new file mode 100644 (file)
index 0000000..68f4213
--- /dev/null
@@ -0,0 +1,36 @@
+%define version 0.0.1
+%define release 1
+
+Name:       pass-hal-tm2
+Summary:    PASS hal for TM2
+Version:    %{version}
+Release:    %{release}
+Group:      System/Hardware Adaptation
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+Source1:    %{name}.manifest
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:         pkgconfig(pass-hal-devel)
+
+%description
+PASS hal for TM2
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DHAL_VERSION=%{version}.%{release}
+
+make %{?jobs:-j%jobs}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest