Add packaging for Tizen 3.0 47/43747/1
authorAleksander Zdyb <a.zdyb@samsung.com>
Tue, 30 Jun 2015 05:56:03 +0000 (07:56 +0200)
committerAleksander Zdyb <a.zdyb@samsung.com>
Fri, 10 Jul 2015 12:50:28 +0000 (14:50 +0200)
Change-Id: I67050c6dbd8cc993924f24efdfcf0094828c50d4

packaging/nice-lad-tests.manifest [new file with mode: 0644]
packaging/nice-lad.manifest [new file with mode: 0644]
packaging/nice-lad.spec [new file with mode: 0644]

diff --git a/packaging/nice-lad-tests.manifest b/packaging/nice-lad-tests.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/nice-lad.manifest b/packaging/nice-lad.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
diff --git a/packaging/nice-lad.spec b/packaging/nice-lad.spec
new file mode 100644 (file)
index 0000000..473911c
--- /dev/null
@@ -0,0 +1,78 @@
+Name:       nice-lad
+Summary:    Narcissistic, Incredible, Completely Exceptional Logger of Access Denials
+Version:    0.1.0
+Release:    1
+Group:      Security/Access Control
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+Source1002:    nice-lad-tests.manifest
+BuildRequires: boost-devel
+BuildRequires: cmake
+BuildRequires: pkgconfig(audit)
+BuildRequires: pkgconfig(libsystemd-journal)
+BuildRequires: pkgconfig(security-manager)
+
+%{?systemd_requires}
+
+%if !%{defined build_type}
+%define build_type RELEASE
+%endif
+
+%description
+Narcissistic, Incredible, Completely Exceptional Logger of Access Denials.
+The tool collects logs of access denials on platform (syscalls, Smack, Cynara
+and Nether). It also reasonably populates audit's filters, so there is
+no unneeded impact on performance. The tool works as a plugin for audit and is
+only spawned on demand. nice-lad could be helpful for developers trying
+to debug their applications.
+
+%package tests
+Summary:    Unit tests for nice-lad
+BuildRequires: pkgconfig(gmock)
+
+%description tests
+Unit tests for nice-lad. A standalone application checking correctness
+of nice-lad's components.
+
+%prep
+%setup -q
+cp -a %{SOURCE1001} .
+cp -a %{SOURCE1002} .
+
+%build
+%if 0%{?sec_build_binary_debug_enable}
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
+
+%if %{?build_type} == "DEBUG"
+export CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
+%endif
+
+export LDFLAGS+="-Wl,--rpath=%{_libdir}"
+
+%cmake . \
+        -DCMAKE_BUILD_TYPE=%{?build_type} \
+        -DBIN_DIR:PATH=%{_bindir} \
+        -DSBIN_DIR:PATH=%{_sbindir} \
+        -DSYS_CONFIG_DIR:PATH=%{_sysconfdir} \
+        -DCMAKE_VERBOSE_MAKEFILE=ON \
+        -DWITH_SECURITY_MANAGER=ON \
+        -DWITH_JOURNALD=ON
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%attr(755,root,root) %{_sbindir}/%{name}
+%config %{_sysconfdir}/audisp/plugins.d/nice_lad.conf
+
+%files -n nice-lad-tests
+%manifest nice-lad-tests.manifest
+%license LICENSE
+%attr(755,root,root) %{_bindir}/nice-lad-tests
+