Add Tizen packaging spec file
authorPatrick McCarty <patrick.mccarty@linux.intel.com>
Mon, 7 Jan 2013 19:48:58 +0000 (11:48 -0800)
committerJarkko Sakkinen <jsakkine@jsakkine-mobl1>
Tue, 10 Dec 2013 12:00:30 +0000 (14:00 +0200)
Change-Id: I1fdb5032aa10ac51e84d1a427b6a28a9c94a5eb8

packaging/smack.spec [new file with mode: 0644]

diff --git a/packaging/smack.spec b/packaging/smack.spec
new file mode 100644 (file)
index 0000000..3b9a534
--- /dev/null
@@ -0,0 +1,81 @@
+Name:       smack
+Version:    1.0
+Release:    1
+Summary:    Package to interact with Smack
+Group:      System/Kernel
+License:    LGPL-2.1
+URL:        https://github.com/smack-team/smack
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: automake
+BuildRequires: autoconf
+BuildRequires: libtool
+
+%description
+Library allows applications to work with Smack
+
+%package devel
+Summary:    Development headers and libs for libsmack
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Standard header files for use when developing Smack enabled applications
+
+%package utils
+Summary:    Selection of tools for developers working with Smack
+Group:      System/Kernel
+Requires:   %{name} = %{version}-%{release}
+
+%description utils
+Tools provided to load and unload rules from the kernel and query the policy
+
+%prep
+%setup -q
+
+%build
+autoreconf --install --symlink
+%configure --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system
+
+make %{?_smp_mflags}
+
+%install
+%make_install
+
+install -d %{buildroot}/etc/smack/accesses.d
+install -d %{buildroot}/etc/smack/cipso.d
+install -d %{buildroot}/smack
+
+install -d %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
+install -d %{buildroot}%{_prefix}/lib/systemd/system/local-fs.target.wants
+ln -s ../smack.service %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants/smack.service
+ln -s ../smack.mount %{buildroot}%{_prefix}/lib/systemd/system/local-fs.target.wants/smack.mount
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%docs_package
+
+%files
+%defattr(644,root,root,755)
+%{_libdir}/libsmack.so.*
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/sys/smack.h
+%{_libdir}/libsmack.so
+%{_libdir}/pkgconfig/libsmack.pc
+
+%files utils
+%defattr(644,root,root,755)
+%{_sysconfdir}/smack
+%{_sysconfdir}/smack/accesses.d
+%{_sysconfdir}/smack/cipso.d
+/smack
+%attr(755,root,root) %{_bindir}/*
+%{_prefix}/lib/systemd/system/smack.mount
+%{_prefix}/lib/systemd/system/local-fs.target.wants/smack.mount
+%{_prefix}/lib/systemd/system/smack.service
+%{_prefix}/lib/systemd/system/basic.target.wants/smack.service