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