1 |
# $Id: smeserver-mock.spec,v 1.1 2018/03/11 04:57:18 jpp Exp $ |
# $Id: smeserver-mock.spec,v 1.9 2018/11/13 06:30:16 jpp Exp $ |
2 |
|
|
3 |
Summary: smeserver-mock tools for building RPMs |
Summary: smeserver-mock tools for building RPMs |
4 |
%define name smeserver-mock |
%define name smeserver-mock |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 1.0 |
%define version 1.0 |
7 |
%define release 1 |
%define release 8 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
11 |
Group: Networking/Daemons |
Group: Networking/Daemons |
12 |
Source: %{name}-%{version}.tgz |
Source: %{name}-%{version}.tgz |
13 |
|
Patch0: smeserver-mock-1.0-updates_values.patch |
14 |
|
Patch1: smeserver-mock-1.0-sme10599-spamassassin.patch |
15 |
|
Patch2: smeserver-mock-1.0-sme10600-video.patch |
16 |
|
Patch3: smeserver-mock-1.0-ocaml.patch |
17 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
18 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
19 |
Requires: e-smith-devtools |
Requires: e-smith-devtools |
20 |
Requires: mock |
Requires: mock |
|
Requires: python-ctypes |
|
21 |
Requires: glances |
Requires: glances |
22 |
Requires: make rpm-build rpm-sign wget |
Requires: make rpm-build rpm-sign wget |
23 |
Requires: cmake automake libtool |
Requires: cmake automake libtool |
24 |
Buildrequires: e-smith-devtools |
Buildrequires: e-smith-devtools |
25 |
# needed for scl |
# needed for scl |
26 |
Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
27 |
|
Requires: python27-build |
28 |
AutoReqProv: no |
AutoReqProv: no |
29 |
|
|
30 |
%changelog |
%changelog |
31 |
|
* Mon Sep 30 2019 Michel Begue <mab974@gmail.com> 1.0-8.sme |
32 |
|
- added include pkg ocaml, camlp5 [SME: 10809] |
33 |
|
|
34 |
|
* Tue Nov 13 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-7.sme |
35 |
|
- fix non needed Requires python-ctypes [SME: 10647] |
36 |
|
|
37 |
|
* Wed Jun 20 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-6.sme |
38 |
|
- added include pkg for video tools [SME: 1600] |
39 |
|
- applied patch for previous bug fix [SME: 10599] |
40 |
|
|
41 |
|
* Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme |
42 |
|
- update dependencies to build spamassassin [SME: 10599] |
43 |
|
|
44 |
|
* Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-4.sme |
45 |
|
- update include package values according to buildsys |
46 |
|
|
47 |
|
* Sat Mar 17 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-3.sme |
48 |
|
- set %config on mock config files |
49 |
|
- a rpmsave of the previous version will be created if modified. |
50 |
|
- fix typo in filename |
51 |
|
|
52 |
|
* Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme |
53 |
|
- update of site-default.cfg via post script [SME: 10537] |
54 |
|
- removed e-smith-devtools of requirements |
55 |
|
- added Requires python27-build |
56 |
|
|
57 |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
58 |
- Initial release with SME iServer mock config files [SME: 10537] |
- Initial release with SME iServer mock config files [SME: 10537] |
59 |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
65 |
|
|
66 |
%prep |
%prep |
67 |
%setup |
%setup |
68 |
|
%patch0 -p1 |
69 |
|
%patch1 -p1 |
70 |
|
%patch2 -p1 |
71 |
|
%patch3 -p1 |
72 |
|
|
73 |
%build |
%build |
74 |
|
|
92 |
%pre |
%pre |
93 |
%preun |
%preun |
94 |
%post |
%post |
95 |
|
|
96 |
|
# updates sme site defaults |
97 |
|
main=/etc/mock/site-defaults.cfg |
98 |
|
tmp=/tmp/site-defaults.cfg |
99 |
|
gen=/etc/mock/sme-site-defaults.cfg |
100 |
|
|
101 |
|
# position of the tags |
102 |
|
BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
103 |
|
END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
104 |
|
#if tag is absent set first to 0 |
105 |
|
if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi |
106 |
|
if [[ "$END_GEN" -eq "" ]]; then |
107 |
|
# if second tag is absent just concatenate |
108 |
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen >$tmp; |
109 |
|
|
110 |
|
else |
111 |
|
# if both tags are present replace content |
112 |
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp; |
113 |
|
|
114 |
|
fi |
115 |
|
# mv tmp file to main file |
116 |
|
mv $tmp $main |
117 |
|
|
118 |
|
|
119 |
%postun |
%postun |
120 |
|
|
121 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
122 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
123 |
/etc/mock/* %attr(0755,root,mock) |
/etc/mock/* %config %attr(0755,root,mock) |