summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/hal-api-nfc-devel.manifest6
-rw-r--r--packaging/hal-api-nfc.manifest6
-rw-r--r--packaging/hal-api-nfc.spec73
3 files changed, 85 insertions, 0 deletions
diff --git a/packaging/hal-api-nfc-devel.manifest b/packaging/hal-api-nfc-devel.manifest
new file mode 100644
index 0000000..81ace0c
--- /dev/null
+++ b/packaging/hal-api-nfc-devel.manifest
@@ -0,0 +1,6 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
+
diff --git a/packaging/hal-api-nfc.manifest b/packaging/hal-api-nfc.manifest
new file mode 100644
index 0000000..81ace0c
--- /dev/null
+++ b/packaging/hal-api-nfc.manifest
@@ -0,0 +1,6 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
+
diff --git a/packaging/hal-api-nfc.spec b/packaging/hal-api-nfc.spec
new file mode 100644
index 0000000..ccec6d7
--- /dev/null
+++ b/packaging/hal-api-nfc.spec
@@ -0,0 +1,73 @@
+%define module_name nfc
+%define name hal-api-nfc
+%define devel_name hal-api-nfc-devel
+
+### main package #########
+Name: %{name}
+Summary: %{name} interface
+Version: 0.0.1
+Release: 1
+Group: Development/Libraries
+License: Apache-2.0
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+Source2: %{devel_name}.manifest
+
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: cmake
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(gio-2.0)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(gmock)
+BuildRequires: pkgconfig(hal-api-common)
+
+%description
+%{name} interface
+
+### devel package #########
+%package -n %{devel_name}
+Summary: %{name} interface
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description -n %{devel_name}
+%{name} Interface for product vendor developer
+
+### build and install #########
+%prep
+%setup -q
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_LIBDIR_PREFIX=%{_libdir}/
+
+%build
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%clean
+rm -rf %{buildroot}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+### contain files to package #########
+%files -n %{name}
+%manifest %{name}.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{_libdir}/hal/*.so*
+
+%files -n %{devel_name}
+%defattr(-,root,root,-)
+%manifest %{devel_name}.manifest
+%license LICENSE
+%{_includedir}/hal/*.h
+%{_libdir}/pkgconfig/%{name}.pc