68444e9f1e4899bd6745e8ab04905d61c786920f
[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
59 %clean
60 rm -rf %{buildroot}
61
62 %post utils
63 if [ -d /etc/smack -a ! -L /etc/smack ]; then
64         cp -r /etc/smack /opt/etc/
65         rm -rf /etc/smack
66 fi
67 ln -sf /opt/etc/smack /etc/
68
69 %postun -p /sbin/ldconfig
70
71 %files
72 %defattr(644,root,root,755)
73 %{_libdir}/libsmack.so.*
74
75 %files devel
76 %defattr(644,root,root,755)
77 %{_includedir}/*
78 %{_libdir}/libsmack.so
79 %{_libdir}/libsmack.la
80 %{_libdir}/pkgconfig/*
81 %{_mandir}/man3/*
82
83 %files utils
84 %defattr(644,root,root,755)
85 %attr(755,root,root) %{_bindir}/*
86 %attr(755,root,root) /etc/init.d/smack-utils
87 #/etc/smack
88 /etc/rc.d/*
89 %{_libdir}/systemd/system/%{name}.mount
90 %{_libdir}/systemd/system/local-fs.target.wants/%{name}.mount
91 %{_libdir}/systemd/system/%{name}.service
92 %{_libdir}/systemd/system/basic.target.wants/%{name}.service
93 /opt/etc/*
94 /smack/
95 %{_mandir}/man1/*
96 %{_mandir}/man8/*
97
98 %changelog
99 * Tue Aug 20 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s12
100 - fix directory installation problem
101 - fix %post bug
102 - fix smack denied issue on emulator
103 - Fix symlink creation on smack-utils install.
104 - libsmack: add support for new access mode for setting locks ("l")
105
106 * Wed Apr 24 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s11
107 - libsmack: check label length in smack_revoke_subject().
108 - Merge changes from upstream repository:
109   - libsmack: fallback to short labels.
110   - Declare smack_mnt as non-static in init.c.
111   - Removed dso.h.
112   - smack.service: provide [Install] section in systemd unit file.
113   - smack.mount: "WantedBy" is illegal in [Unit] context.
114   - Move cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c.
115   - Add support for smackfs directory: /sys/fs/smackfs/
116   - smackcipso can't set CIPSO correctly (fixes bug TDIS-3891)
117   - Run AM_PROG_AR to fix build with newer automake.
118   - disable services for new systemd versions
119
120 * Thu Feb 07 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s9
121 - Polish init script.
122 - execute init script between local-fs.target and basic.target.
123 - libsmack: fix access type parsing.
124 - libsmack: fix label removal.
125 - Don't fail when removing label from file, that doesn't have it.
126
127 * Wed Dec 10 2012 Jacek Migacz <j.migacz@samsung.com> - 1.0slp2+s8
128 - Add systemd support scripts.
129
130 * Mon Nov 26 2012 Kidong Kim <kd0228.kim@samsung.com> - 1.0slp2+s7
131 - fix initialization script order : S07 -> S01
132
133 * Mon Oct 29 2012 Tomasz Swierczek <t.swieczek@samsung.com> - 1.0slp2+s6
134 - No changes, re-release to proper OBS project on tizendev.
135
136 * Thu Oct 25 2012 Tomasz Swierczek <t.swieczek@samsung.com> - 1.0slp2+s6
137 - No changes, re-release to proper OBS project on tizendev.
138
139 * Mon Sep 17 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s6
140 - Modified typo access.d --> accesses.d
141 - packaging: fix location of symlinks to smack-utils init script.
142 - Merge with upstream.
143
144 * Thu Aug  1 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s5
145 - Rebuild, no source changes.
146
147 * Thu Jul 30 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s4
148 - Rebuild, no source changes.
149
150 * Thu Jul 19 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0slp2+s3
151 - Rebuild, change versioning schema.
152
153 * Wed Jul 11 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0-slp2+s2
154 - Release with my source patches after review with the upstream maintainer.
155
156 * Wed May  9 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0-slp2+s1
157 - Initial spec file