pass-hal-tm1: Create spec file for RPM package 81/114781/1
authorWook Song <wook16.song@samsung.com>
Thu, 9 Feb 2017 05:59:47 +0000 (14:59 +0900)
committerWook Song <wook16.song@samsung.com>
Wed, 15 Feb 2017 05:25:54 +0000 (14:25 +0900)
This patch creates files required to build the RPM package. After
applying this patch, you can build an empty RPM package named
pass-hal-tm1.

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0e3aec9
--- /dev/null
@@ -0,0 +1,16 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(pass-hal-tm1 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-tm1.manifest b/packaging/pass-hal-tm1.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-tm1.spec b/packaging/pass-hal-tm1.spec
new file mode 100644 (file)
index 0000000..d2389f2
--- /dev/null
@@ -0,0 +1,37 @@
+%define version 0.0.1
+%define release 1
+%define debug_package  %{nil}
+
+Name:       pass-hal-tm1
+Summary:    PASS hal for TM1
+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 TM1
+
+%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