1 |
# $Id: smeserver-mock.spec,v 1.22 2023/04/13 03:38:38 jpp Exp $ |
2 |
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') |
3 |
Summary: smeserver-mock tools for building RPMs |
4 |
%define name smeserver-mock |
5 |
Name: %{name} |
6 |
%define version 1.0 |
7 |
%define release 18 |
8 |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
10 |
License: GPL |
11 |
Group: Networking/Daemons |
12 |
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 |
Patch4: smeserver-mock-1.0-sme10946-mock.patch |
18 |
Patch5: smeserver-mock-1.0-sme10924-bins.patch |
19 |
Patch6: smeserver-mock-1.0-sme10993-kmodtool.patch |
20 |
Patch7: smeserver-mock-1.0-sme11005-mojo-jwt.patch |
21 |
Patch8: smeserver-mock-1.0-sme11203-spamassassin.patch |
22 |
Patch9: smeserver-mock-1.0-sme11005-mojo-jwt-2.patch |
23 |
Patch10: smeserver-mock-1.0-20220630.patch |
24 |
Patch11: smeserver-mock-1.0-change-log.patch |
25 |
Patch12: smeserver-mock-1.0-20230412.patch |
26 |
|
27 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
28 |
BuildArchitectures: noarch |
29 |
Requires: e-smith-devtools |
30 |
Requires: mock |
31 |
Requires: glances |
32 |
Requires: make rpm-build rpm-sign wget |
33 |
Requires: cmake automake libtool |
34 |
Buildrequires: e-smith-devtools |
35 |
# needed for scl |
36 |
#Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
37 |
#Requires: python27-build |
38 |
AutoReqProv: no |
39 |
|
40 |
%changelog |
41 |
* Thu Apr 13 2023 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-18.sme |
42 |
- fixpost scriptled not working [SME: 12349] |
43 |
- add smeos and smeupdates in mock file |
44 |
|
45 |
* Wed Apr 12 2023 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-17.sme |
46 |
- fix change-log [SME: 12340] |
47 |
- update smeserver 10 base mockfile |
48 |
- perl.prov workaround in mock file |
49 |
|
50 |
* Fri Nov 18 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-16.sme |
51 |
- fix change-log not handling tab for version or release |
52 |
|
53 |
* Thu Jun 30 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-15.sme |
54 |
- update sme10 mock files [SME: 12089] |
55 |
- remove python scl dependencies blocks a lot from using the rpm |
56 |
almost never needed [SME: 12090] |
57 |
- cleaning remove sme8 and sme9 mock files |
58 |
- added workaround to perl.prov not working [SME: 11958] |
59 |
added mock plugin copy.py and an updated perl.prov |
60 |
- update embded bins |
61 |
|
62 |
* Mon Dec 27 2021 Michel Begue <mab974@misouk.com> 1.0-13.sme |
63 |
- fix build deps for Mojo::JWT [SME: 11005] |
64 |
|
65 |
* Thu Nov 26 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-12.sme |
66 |
- fix build deps for spamassassin [SME: 11203] |
67 |
|
68 |
* Fri Sep 04 2020 Michel Begue <mab974@gmail.com> 1.0-11.sme |
69 |
- update dependencies to build Mojo::JWT package [SME: 11005] |
70 |
|
71 |
* Tue Aug 18 2020 Michel Begue <mab974@gmail.com> 1.0-10.sme |
72 |
- update dependencies to build kmod packages [SME: 10993] |
73 |
|
74 |
* Thu May 14 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-9.sme |
75 |
- fix nspawn and package_manager set to yum [SME: 10946] |
76 |
- updating list of included packages for SME10 and SME9 repo |
77 |
- updating the attached bins to help building [SME: 10924] |
78 |
|
79 |
* Mon Sep 30 2019 Michel Begue <mab974@gmail.com> 1.0-8.sme |
80 |
- added include pkg ocaml, camlp5 [SME: 10809] |
81 |
|
82 |
* Tue Nov 13 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-7.sme |
83 |
- fix non needed Requires python-ctypes [SME: 10647] |
84 |
|
85 |
* Wed Jun 20 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-6.sme |
86 |
- added include pkg for video tools [SME: 1600] |
87 |
- applied patch for previous bug fix [SME: 10599] |
88 |
|
89 |
* Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme |
90 |
- update dependencies to build spamassassin [SME: 10599] |
91 |
|
92 |
* Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-4.sme |
93 |
- update include package values according to buildsys |
94 |
|
95 |
* Sat Mar 17 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-3.sme |
96 |
- set %config on mock config files |
97 |
- a rpmsave of the previous version will be created if modified. |
98 |
- fix typo in filename |
99 |
|
100 |
* Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme |
101 |
- update of site-default.cfg via post script [SME: 10537] |
102 |
- removed e-smith-devtools of requirements |
103 |
- added Requires python27-build |
104 |
|
105 |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
106 |
- Initial release with SME iServer mock config files [SME: 10537] |
107 |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
108 |
|
109 |
%description |
110 |
Tools for use in building RPMs for the Koozali SME server and gateway. |
111 |
|
112 |
Few tools are also provided to help you with package building. |
113 |
|
114 |
%prep |
115 |
%setup |
116 |
%patch0 -p1 |
117 |
%patch1 -p1 |
118 |
%patch2 -p1 |
119 |
%patch3 -p1 |
120 |
%patch4 -p1 |
121 |
%patch5 -p1 |
122 |
%patch6 -p1 |
123 |
%patch7 -p1 |
124 |
%patch8 -p1 |
125 |
%patch9 -p1 |
126 |
%patch10 -p1 |
127 |
%patch11 -p1 |
128 |
%patch12 -p1 |
129 |
|
130 |
%build |
131 |
|
132 |
%install |
133 |
rm -rf $RPM_BUILD_ROOT |
134 |
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
135 |
/bin/rm -f %{name}-%{version}-filelist |
136 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
137 |
--file /usr/bin/BogusDateBot.sh '%attr(0755,root,root)' \ |
138 |
--file /usr/bin/change-log '%attr(0755,root,root)' \ |
139 |
--file /usr/bin/clog '%attr(0755,root,root)' \ |
140 |
--file /usr/bin/createBuildDir '%attr(0755,root,root)' \ |
141 |
--file /usr/bin/prepa '%attr(0755,root,root)' \ |
142 |
--file /usr/bin/tagbuild '%attr(0755,root,root)' \ |
143 |
--file /etc/mock/perl.prov '%attr(0755,root,root)' \ |
144 |
--ignoredir /usr/lib/python3.6/site-packages/mockbuild/plugins \ |
145 |
--ignoredir /usr/lib/python3.6/site-packages/mockbuild \ |
146 |
--ignoredir /usr/lib/python3.6/site-packages \ |
147 |
--ignoredir /usr/lib/python3.6 \ |
148 |
--ignoredir /etc/mock \ |
149 |
| grep -v copy.pyc \ |
150 |
| grep -v copy.pyo \ |
151 |
> %{name}-%{version}-filelist |
152 |
|
153 |
%clean |
154 |
rm -rf $RPM_BUILD_ROOT |
155 |
|
156 |
%pre |
157 |
%preun |
158 |
%post -p /bin/bash |
159 |
|
160 |
# updates sme site defaults |
161 |
main=/etc/mock/site-defaults.cfg |
162 |
tmp=/tmp/site-defaults.cfg |
163 |
gen=/etc/mock/sme-site-defaults.cfg |
164 |
|
165 |
# position of the tags |
166 |
BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
167 |
END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
168 |
#if tag is absent set first to 0 |
169 |
if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi |
170 |
if [[ "$END_GEN" -eq "" ]]; then |
171 |
# if second tag is absent just concatenate |
172 |
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen >$tmp; |
173 |
|
174 |
else |
175 |
# if both tags are present replace content |
176 |
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp; |
177 |
|
178 |
fi |
179 |
# mv tmp file to main file |
180 |
mv $tmp $main |
181 |
|
182 |
|
183 |
%postun |
184 |
|
185 |
%files -f %{name}-%{version}-filelist |
186 |
%defattr(-,root,root,-) |
187 |
/etc/mock/* %config %attr(0755,root,mock) |