/[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.6 - (hide annotations) (download)
Wed Jun 20 03:46:35 2018 UTC (6 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-mock-1_0-5_el7_sme
Changes since 1.5: +5 -2 lines
* Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme
- update dependencies to build spamassassin [SME: 10599]

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