1 |
michel |
1.13 |
# $Id: smeserver-mock.spec,v 1.12 2020/05/19 04:13:16 jpp Exp $ |
2 |
jpp |
1.1 |
|
3 |
|
|
Summary: smeserver-mock tools for building RPMs |
4 |
jpp |
1.2 |
%define name smeserver-mock |
5 |
jpp |
1.1 |
Name: %{name} |
6 |
|
|
%define version 1.0 |
7 |
michel |
1.13 |
%define release 10 |
8 |
jpp |
1.1 |
Version: %{version} |
9 |
|
|
Release: %{release}%{?dist} |
10 |
|
|
License: GPL |
11 |
|
|
Group: Networking/Daemons |
12 |
|
|
Source: %{name}-%{version}.tgz |
13 |
jpp |
1.5 |
Patch0: smeserver-mock-1.0-updates_values.patch |
14 |
jpp |
1.7 |
Patch1: smeserver-mock-1.0-sme10599-spamassassin.patch |
15 |
jpp |
1.8 |
Patch2: smeserver-mock-1.0-sme10600-video.patch |
16 |
michel |
1.10 |
Patch3: smeserver-mock-1.0-ocaml.patch |
17 |
jpp |
1.11 |
Patch4: smeserver-mock-1.0-sme10946-mock.patch |
18 |
jpp |
1.12 |
Patch5: smeserver-mock-1.0-sme10924-bins.patch |
19 |
michel |
1.13 |
Patch6: smeserver-mock-1.0-sme10993-kmodtool.patch |
20 |
jpp |
1.12 |
|
21 |
jpp |
1.1 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
22 |
|
|
BuildArchitectures: noarch |
23 |
|
|
Requires: e-smith-devtools |
24 |
|
|
Requires: mock |
25 |
|
|
Requires: glances |
26 |
|
|
Requires: make rpm-build rpm-sign wget |
27 |
|
|
Requires: cmake automake libtool |
28 |
|
|
Buildrequires: e-smith-devtools |
29 |
|
|
# needed for scl |
30 |
|
|
Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
31 |
jpp |
1.3 |
Requires: python27-build |
32 |
jpp |
1.1 |
AutoReqProv: no |
33 |
|
|
|
34 |
|
|
%changelog |
35 |
michel |
1.13 |
* Tue Aug 18 2020 Michel Begue <mab974@gmail.com> 1.0-10.sme |
36 |
|
|
- update dependencies to build kmod packages [SME: 10993] |
37 |
|
|
|
38 |
jpp |
1.11 |
* Thu May 14 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-9.sme |
39 |
|
|
- fix nspawn and package_manager set to yum [SME: 10946] |
40 |
|
|
- updating list of included packages for SME10 and SME9 repo |
41 |
jpp |
1.12 |
- updating the attached bins to help building [SME: 10924] |
42 |
jpp |
1.11 |
|
43 |
michel |
1.10 |
* Mon Sep 30 2019 Michel Begue <mab974@gmail.com> 1.0-8.sme |
44 |
|
|
- added include pkg ocaml, camlp5 [SME: 10809] |
45 |
|
|
|
46 |
jpp |
1.9 |
* Tue Nov 13 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-7.sme |
47 |
|
|
- fix non needed Requires python-ctypes [SME: 10647] |
48 |
|
|
|
49 |
jpp |
1.8 |
* Wed Jun 20 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-6.sme |
50 |
|
|
- added include pkg for video tools [SME: 1600] |
51 |
|
|
- applied patch for previous bug fix [SME: 10599] |
52 |
|
|
|
53 |
jpp |
1.6 |
* Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme |
54 |
|
|
- update dependencies to build spamassassin [SME: 10599] |
55 |
|
|
|
56 |
jpp |
1.5 |
* Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-4.sme |
57 |
|
|
- update include package values according to buildsys |
58 |
|
|
|
59 |
jpp |
1.4 |
* Sat Mar 17 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-3.sme |
60 |
|
|
- set %config on mock config files |
61 |
|
|
- a rpmsave of the previous version will be created if modified. |
62 |
|
|
- fix typo in filename |
63 |
|
|
|
64 |
jpp |
1.3 |
* Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme |
65 |
|
|
- update of site-default.cfg via post script [SME: 10537] |
66 |
|
|
- removed e-smith-devtools of requirements |
67 |
|
|
- added Requires python27-build |
68 |
|
|
|
69 |
jpp |
1.1 |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
70 |
jpp |
1.2 |
- Initial release with SME iServer mock config files [SME: 10537] |
71 |
jpp |
1.1 |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
72 |
|
|
|
73 |
|
|
%description |
74 |
|
|
Tools for use in building RPMs for the Koozali SME server and gateway. |
75 |
|
|
|
76 |
|
|
Few tools are also provided to help you with package building. |
77 |
|
|
|
78 |
|
|
%prep |
79 |
|
|
%setup |
80 |
jpp |
1.5 |
%patch0 -p1 |
81 |
jpp |
1.7 |
%patch1 -p1 |
82 |
jpp |
1.8 |
%patch2 -p1 |
83 |
michel |
1.10 |
%patch3 -p1 |
84 |
jpp |
1.11 |
%patch4 -p1 |
85 |
jpp |
1.12 |
%patch5 -p1 |
86 |
michel |
1.13 |
%patch6 -p1 |
87 |
jpp |
1.1 |
|
88 |
|
|
%build |
89 |
|
|
|
90 |
|
|
%install |
91 |
|
|
rm -rf $RPM_BUILD_ROOT |
92 |
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
93 |
|
|
/bin/rm -f %{name}-%{version}-filelist |
94 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
95 |
|
|
--file /usr/bin/BogusDateBot.sh '%attr(0755,root,root)' \ |
96 |
|
|
--file /usr/bin/change-log '%attr(0755,root,root)' \ |
97 |
|
|
--file /usr/bin/clog '%attr(0755,root,root)' \ |
98 |
|
|
--file /usr/bin/createBuildDir '%attr(0755,root,root)' \ |
99 |
|
|
--file /usr/bin/prepa '%attr(0755,root,root)' \ |
100 |
|
|
--file /usr/bin/tagbuild '%attr(0755,root,root)' \ |
101 |
jpp |
1.2 |
| grep -v /etc/mock/ \ |
102 |
jpp |
1.1 |
> %{name}-%{version}-filelist |
103 |
|
|
|
104 |
|
|
%clean |
105 |
|
|
rm -rf $RPM_BUILD_ROOT |
106 |
|
|
|
107 |
|
|
%pre |
108 |
|
|
%preun |
109 |
|
|
%post |
110 |
jpp |
1.3 |
|
111 |
|
|
# updates sme site defaults |
112 |
|
|
main=/etc/mock/site-defaults.cfg |
113 |
|
|
tmp=/tmp/site-defaults.cfg |
114 |
|
|
gen=/etc/mock/sme-site-defaults.cfg |
115 |
|
|
|
116 |
|
|
# position of the tags |
117 |
|
|
BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
118 |
|
|
END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
119 |
|
|
#if tag is absent set first to 0 |
120 |
|
|
if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi |
121 |
|
|
if [[ "$END_GEN" -eq "" ]]; then |
122 |
|
|
# if second tag is absent just concatenate |
123 |
|
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen >$tmp; |
124 |
|
|
|
125 |
|
|
else |
126 |
|
|
# if both tags are present replace content |
127 |
|
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp; |
128 |
|
|
|
129 |
|
|
fi |
130 |
|
|
# mv tmp file to main file |
131 |
|
|
mv $tmp $main |
132 |
|
|
|
133 |
|
|
|
134 |
jpp |
1.1 |
%postun |
135 |
|
|
|
136 |
jpp |
1.2 |
%files -f %{name}-%{version}-filelist |
137 |
jpp |
1.1 |
%defattr(-,root,root,-) |
138 |
jpp |
1.4 |
/etc/mock/* %config %attr(0755,root,mock) |