/[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.9 - (hide annotations) (download)
Tue Nov 13 06:30:16 2018 UTC (5 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-mock-1_0-7_el7_sme
Changes since 1.8: +5 -3 lines
* Tue Nov 13 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-7.sme
- fix non needed Requires python-ctypes [SME: 10647]

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