copy license file
[framework/security/smack.git] / packaging / smack.spec
1 Name:       smack
2 Version:    1.0slp2+s12
3 Release:    1
4 Summary:    Package to interact with Smack
5 Group:      System/Kernel
6 License:    LGPLv2
7 URL:        https://github.com/organizations/smack-team/smack
8 Source0:    smack-%{version}.tar.gz
9 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10
11 BuildRequires: automake autoconf libtool
12
13 %description
14 Library allows applications to work with Smack
15
16 %package devel
17 Summary:    Developmnent headers and libs for libsmack
18 Group:      Development/Libraries
19 Requires:   %{name} = %{version}-%{release}
20
21 %description devel
22 Standard header files for use when developing Smack enabled applications
23
24 %package utils
25 Summary:    Selection of tools for developers working with Smack
26 Group:      System/Kernel
27 Requires:   %{name} = %{version}-%{release}
28
29 %description utils
30 Tools provided to load and unload rules from the kernel and query the policy
31
32 %prep
33 %setup -q
34 autoreconf --install --symlink
35
36 %build
37 %configure --with-systemdsystemunitdir=%{_libdir}/systemd/system
38 make %{?_smp_mflags}
39
40 %install
41 rm -rf %{buildroot}
42 make install DESTDIR=%{buildroot}
43 install -d %{buildroot}/smack
44 install -d %{buildroot}/etc
45 install -D -d %{buildroot}/opt/etc/smack/accesses.d
46 install -D -d %{buildroot}/opt/etc/smack/cipso.d
47 install -D -d %{buildroot}/etc/rc.d/rc3.d/
48 install -D -d %{buildroot}/etc/rc.d/rc4.d/
49 install -D init/smack.rc %{buildroot}/etc/init.d/smack-utils
50 #ln -sf /opt/etc/smack %{buildroot}/etc/
51 ln -sf /etc/init.d/smack-utils %{buildroot}/etc/rc.d/rc3.d/S01smack
52 ln -sf /etc/init.d/smack-utils %{buildroot}/etc/rc.d/rc4.d/S01smack
53 install -D -d %{buildroot}%{_libdir}/systemd/system/local-fs.target.wants
54 install -D -d %{buildroot}%{_libdir}/systemd/system/basic.target.wants
55 ln -sf ../%{name}.mount %{buildroot}%{_libdir}/systemd/system/local-fs.target.wants/
56 ln -sf ../%{name}.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants/
57 rm -rf %{buildroot}/%{_docdir}
58 mkdir -p %{buildroot}/usr/share/license
59 cp COPYING %{buildroot}/usr/share/license/%{name}
60 cp COPYING %{buildroot}/usr/share/license/smack-utils
61
62 %clean
63 rm -rf %{buildroot}
64
65 %post utils
66 if [ -d /etc/smack -a ! -L /etc/smack ]; then
67         cp -r /etc/smack /opt/etc/
68         rm -rf /etc/smack
69 fi
70 ln -sf /opt/etc/smack /etc/
71
72 %postun -p /sbin/ldconfig
73
74 %files
75 %defattr(644,root,root,755)
76 %{_libdir}/libsmack.so.*
77 /usr/share/license/%{name}
78
79 %files devel
80 %defattr(644,root,root,755)
81 %{_includedir}/*
82 %{_libdir}/libsmack.so
83 %{_libdir}/libsmack.la
84 %{_libdir}/pkgconfig/*
85 %{_mandir}/man3/*
86
87 %files utils
88 %defattr(644,root,root,755)
89 %attr(755,root,root) %{_bindir}/*
90 %attr(755,root,root) /etc/init.d/smack-utils
91 #/etc/smack
92 /etc/rc.d/*
93 %{_libdir}/systemd/system/%{name}.mount
94 %{_libdir}/systemd/system/local-fs.target.wants/%{name}.mount
95 %{_libdir}/systemd/system/%{name}.service
96 %{_libdir}/systemd/system/basic.target.wants/%{name}.service
97 /opt/etc/*
98 /smack/
99 %{_mandir}/man1/*
100 %{_mandir}/man8/*
101 /usr/share/license/smack-utils
102
103 %changelog
104 * Tue Aug 20 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s12
105 - fix directory installation problem
106 - fix %post bug
107 - fix smack denied issue on emulator
108 - Fix symlink creation on smack-utils install.
109 - libsmack: add support for new access mode for setting locks ("l")
110
111 * Wed Apr 24 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s11
112 - libsmack: check label length in smack_revoke_subject().
113 - Merge changes from upstream repository:
114   - libsmack: fallback to short labels.
115   - Declare smack_mnt as non-static in init.c.
116   - Removed dso.h.
117   - smack.service: provide [Install] section in systemd unit file.
118   - smack.mount: "WantedBy" is illegal in [Unit] context.
119   - Move cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c.
120   - Add support for smackfs directory: /sys/fs/smackfs/
121   - smackcipso can't set CIPSO correctly (fixes bug TDIS-3891)
122   - Run AM_PROG_AR to fix build with newer automake.
123   - disable services for new systemd versions
124
125 * Thu Feb 07 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s9
126 - Polish init script.
127 - execute init script between local-fs.target and basic.target.
128 - libsmack: fix access type parsing.
129 - libsmack: fix label removal.
130 - Don't fail when removing label from file, that doesn't have it.
131
132 * Wed Dec 10 2012 Jacek Migacz <j.migacz@samsung.com> - 1.0slp2+s8
133 - Add systemd support scripts.
134
135 * Mon Nov 26 2012 Kidong Kim <kd0228.kim@samsung.com> - 1.0slp2+s7
136 - fix initialization script order : S07 -> S01
137
138 * Mon Oct 29 2012 Tomasz Swierczek <t.swieczek@samsung.com> - 1.0slp2+s6
139 - No changes, re-release to proper OBS project on tizendev.
140
141 * Thu Oct 25 2012 Tomasz Swierczek <t.swieczek@samsung.com> - 1.0slp2+s6
142 - No changes, re-release to proper OBS project on tizendev.
143
144 * Mon Sep 17 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s6
145 - Modified typo access.d --> accesses.d
146 - packaging: fix location of symlinks to smack-utils init script.
147 - Merge with upstream.
148
149 * Thu Aug  1 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s5
150 - Rebuild, no source changes.
151
152 * Thu Jul 30 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s4
153 - Rebuild, no source changes.
154
155 * Thu Jul 19 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s3
156 - Rebuild, change versioning schema.
157
158 * Wed Jul 11 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0-slp2+s2
159 - Release with my source patches after review with the upstream maintainer.
160
161 * Wed May  9 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0-slp2+s1
162 - Initial spec file