/[smeserver]/rpms/smeserver-mock/sme10/smeserver-mock.spec
ViewVC logotype

Annotation of /rpms/smeserver-mock/sme10/smeserver-mock.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.11 - (hide annotations) (download)
Tue May 19 04:06:24 2020 UTC (4 years, 6 months ago) by jpp
Branch: MAIN
Changes since 1.10: +10 -2 lines
* Thu May 14 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-9.sme
- fix nspawn and package_manager set to yum [SME: 10946]
- updating list of included packages for SME10 and SME9 repo
- updating the attached bins to help building [SME: ]

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed