-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsplice-testing-tools.spec
119 lines (95 loc) · 3.32 KB
/
splice-testing-tools.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Name: splice-testing-tools
Version: 0.3
Release: 1%{?dist}
Summary: Splice Testing library
Group: Development/Tools
License: GPLv3+
URL: https://github.com/RedHatQE/splice-testing-tools
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
Requires: python-nose PyYAML python-selenium-wrapper splice-testing-pageobjects
%description
%{summary}
%package -n spacewalk-report-mock
Summary: Spacewalk-report mocking tool
Group: Development/Tools
%description -n spacewalk-report-mock
%{summary}
%if 0%{?with_selenium:1}
%package -n selenium-splice-server
Summary: selenium and Xvfb services
Group: Development/Tools
Requires: xorg-x11-server-Xvfb java
%description -n selenium-splice-server
The Xvfb and selenium services to use when testing splice
%endif
%prep
%setup -q
%build
%install
%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT
%{__mkdir_p} $RPM_BUILD_ROOT%{_sharedstatedir}/spacewalk-report-mock
%if 0%{?with_selenium:1}
%{__mkdir_p} $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
%{__mkdir_p} $RPM_BUILD_ROOT%{_javadir}/%{name}
cp selenium/selenium-server-standalone-2.31.0.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/selenium-server.jar
%else
rm -f $RPM_BUILD_ROOT%{_unitdir}/selenium-*.service $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/selenium-splice.conf
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post -n spacewalk-report-mock
%{_bindir}/spacewalk-report-set test1
%if 0%{?with_selenium:1}
%post -n selenium-splice-server
%if 0%{?fedora} >= 15
/bin/systemctl daemon-reload &> /dev/null ||:
%endif
%preun -n selenium-splice-server
%if 0%{?fedora} >= 15
/bin/systemctl --no-reload disable selenium-splice.service
/bin/systemctl stop selenium-splice.service
%endif
%postun -n selenium-splice-server
%if 0%{?fedora} >= 15
/bin/systemctl daemon-reload &> /dev/null
if [ "$1" -ge "1" ] ; then
/bin/systemctl try-restart selenium-splice.service &> /dev/null
fi
%endif
%endif
%files
%defattr(-,root,root,-)
%doc LICENSE README.md
%attr(0755, root, root) %{_bindir}/*.py
%config(noreplace) %attr(0644, root, root) %{_sysconfdir}/splice-testing.yaml
%{python_sitelib}/*.egg-info
%{python_sitelib}/splicetestlib/*.py*
%attr(0644, root, root) %{_datadir}/%name/splice-tests/*.py
%exclude %{_datadir}/%name/splice-tests/*.py?
%files -n spacewalk-report-mock
%attr(0755, root, root) %{_bindir}/spacewalk-report
%attr(0755, root, root) %{_bindir}/spacewalk-report-set
%{_datadir}/%name/spacewalk-report-mock
%exclude %{_datadir}/%name/spacewalk-report-mock/*.py?
%exclude %{_datadir}/%name/spacewalk-report-mock/*/*.py?
%{_sharedstatedir}/spacewalk-report-mock
%if 0%{?with_selenium:1}
%files -n selenium-splice-server
%if 0%{?fedora} >= 15
%config(noreplace) %attr(0640, root, root) %{_unitdir}/selenium-splice-xvfb.service
%config(noreplace) %attr(0640, root, root) %{_unitdir}/selenium-splice.service
%config(noreplace) %attr(0640, root, root) %{_sysconfdir}/sysconfig/selenium-splice.conf
%endif
%attr(0644, root, root) %{_javadir}/%{name}/selenium-server.jar
%endif
%changelog
* Thu Sep 19 2013 Vitaly Kuznetsov <[email protected]> 0.3-1
- new version
* Thu Jun 13 2013 Vitaly Kuznetsov <[email protected]> 0.2-1
- make selenium build optional ([email protected])
* Wed Jun 12 2013 Milan Kovacik <[email protected]> 0.1-2
- add selenium-related sub-package
* Wed Jun 05 2013 Vitaly Kuznetsov <[email protected]> 0.1-1
- new package built with tito