]>
Commit | Line | Data |
---|---|---|
4cc12bee PZ |
1 | %define subver .3 |
2 | Summary: Fedora Unified Network Controller | |
3 | Name: func | |
4 | Version: 0.13 | |
5 | Release: 1 | |
6 | License: GPLv2+ | |
7 | Group: Applications/System | |
8 | Source0: https://hosted.fedoraproject.org/projects/func/attachment/wiki/FuncReleases/%{name}-%{version}.tar%{subver}.gz?format=raw | |
9 | # Source0-md5: adf06e92209e2576bd44fa64641b8733 | |
10 | Source1: %{name}-funcd.init | |
11 | Source2: %{name}-certmaster.init | |
4a1252d5 | 12 | Patch0: %{name}-setup.patch |
4cc12bee PZ |
13 | URL: https://hosted.fedoraproject.org/projects/func/ |
14 | BuildRequires: python >= 1:2.5 | |
15 | BuildRequires: rpmbuild(macros) >= 1.219 | |
16 | Requires: python-pyOpenSSL | |
17 | %pyrequires_eq python-libs | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
0638269b ER |
22 | func is a remote api for mangement, configation, and monitoring of |
23 | systems. | |
4cc12bee PZ |
24 | |
25 | %prep | |
26 | %setup -q | |
4a1252d5 | 27 | %patch0 -p1 |
4cc12bee PZ |
28 | |
29 | %build | |
30 | python setup.py build | |
31 | ||
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
b248ed43 | 34 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
4cc12bee PZ |
35 | |
36 | python setup.py install \ | |
37 | --root=$RPM_BUILD_ROOT \ | |
38 | --optimize=2 | |
39 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/funcd | |
40 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/certmaster | |
41 | ||
42 | %py_postclean | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %post | |
48 | /sbin/chkconfig --add certmaster | |
49 | /sbin/chkconfig --add funcd | |
50 | ||
51 | %preun | |
52 | if [ "$1" = "0" ]; then | |
53 | %service certmaster stop | |
54 | %service funcd stop | |
55 | /sbin/chkconfig --del certmaster | |
56 | /sbin/chkconfig --del funcd | |
57 | fi | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
61 | %doc AUTHORS README | |
62 | %attr(755,root,root) %{_bindir}/funcd | |
63 | %attr(755,root,root) %{_bindir}/func | |
64 | %attr(755,root,root) %{_bindir}/certmaster | |
65 | %attr(755,root,root) %{_bindir}/certmaster-ca | |
66 | %attr(755,root,root) %{_bindir}/func-inventory | |
67 | %dir %{_sysconfdir}/%{name} | |
68 | %dir %{_sysconfdir}/%{name}/minion-acl.d/ | |
0638269b | 69 | # TODO: move %{_sysconfdir}/pki into FHS? It's used for key storage |
4cc12bee PZ |
70 | %dir %{_sysconfdir}/pki |
71 | %dir %{_sysconfdir}/pki/%{name} | |
72 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/func/minion.conf | |
73 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/func/certmaster.conf | |
0638269b ER |
74 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/func_rotate |
75 | %attr(754,root,root) /etc/rc.d/init.d/certmaster | |
76 | %attr(754,root,root) /etc/rc.d/init.d/funcd | |
4cc12bee PZ |
77 | %{py_sitescriptdir}/func-%{version}-py*.egg-info |
78 | %{py_sitescriptdir}/func | |
79 | %{_mandir}/man1/*.1* |