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

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

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

Revision 1.1 by jpp, Sun Mar 11 04:57:18 2018 UTC Revision 1.8 by jpp, Thu Jun 21 03:25:27 2018 UTC
# Line 1  Line 1 
1  # $Id: smeserver-devtools.spec,v 1.7 2017/05/25 15:48:49 unnilennium Exp $  # $Id: smeserver-mock.spec,v 1.7 2018/06/21 03:21:19 jpp Exp $
2    
3  Summary: smeserver-mock tools for building RPMs  Summary: smeserver-mock tools for building RPMs
4  %define name e-smith-devtools  %define name smeserver-mock
5  Name: %{name}  Name: %{name}
6  %define version 1.0  %define version 1.0
7  %define release 1  %define release 6
8  Version: %{version}  Version: %{version}
9  Release: %{release}%{?dist}  Release: %{release}%{?dist}
10  License: GPL  License: GPL
11  Group: Networking/Daemons  Group: Networking/Daemons
12  Source: %{name}-%{version}.tgz  Source: %{name}-%{version}.tgz
13    Patch0: smeserver-mock-1.0-updates_values.patch
14    Patch1: smeserver-mock-1.0-sme10599-spamassassin.patch
15    Patch2: smeserver-mock-1.0-sme10600-video.patch
16  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
17  BuildArchitectures: noarch  BuildArchitectures: noarch
18  Requires: e-smith-devtools  Requires: e-smith-devtools
# Line 21  Requires: cmake automake libtool Line 24  Requires: cmake automake libtool
24  Buildrequires: e-smith-devtools  Buildrequires: e-smith-devtools
25  # needed for scl  # needed for scl
26  Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh  Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh
27    Requires: python27-build
28  AutoReqProv: no  AutoReqProv: no
29    
30  %changelog  %changelog
31    * Wed Jun 20 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-6.sme
32    - added include pkg for video tools [SME: 1600]
33    - applied patch for previous bug fix [SME: 10599]
34    
35    * Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme
36    - update dependencies to build spamassassin [SME: 10599]
37    
38    * Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-4.sme
39    - update include package values according to buildsys
40    
41    * Sat Mar 17 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-3.sme
42    - set %config on mock config files
43    - a rpmsave of the previous version will be created if modified.
44    - fix typo in filename
45    
46    * Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme
47    - update of site-default.cfg  via post script [SME: 10537]
48    - removed e-smith-devtools of requirements
49    - added Requires python27-build
50    
51  * Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme  * Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme
52  - Initial release with SME Server mock config files  - Initial release with SME iServer mock config files [SME: 10537]
53  - tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild  - tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild
54    
   
   
55  %description  %description
56  Tools for use in building RPMs for the Koozali SME server and gateway.  Tools for use in building RPMs for the Koozali SME server and gateway.
57    
# Line 38  Few tools are also provided to help you Line 59  Few tools are also provided to help you
59    
60  %prep  %prep
61  %setup  %setup
62    %patch0 -p1
63    %patch1 -p1
64    %patch2 -p1
65    
66  %build  %build
67    
# Line 52  rm -rf $RPM_BUILD_ROOT Line 76  rm -rf $RPM_BUILD_ROOT
76          --file /usr/bin/createBuildDir '%attr(0755,root,root)' \          --file /usr/bin/createBuildDir '%attr(0755,root,root)' \
77          --file /usr/bin/prepa '%attr(0755,root,root)' \          --file /usr/bin/prepa '%attr(0755,root,root)' \
78          --file /usr/bin/tagbuild '%attr(0755,root,root)' \          --file /usr/bin/tagbuild '%attr(0755,root,root)' \
79          --file /etc/mock/* '%attr(0754,root,mock)' \        | grep -v /etc/mock/  \
80          > %{name}-%{version}-filelist          > %{name}-%{version}-filelist
81    
82  %clean  %clean
# Line 61  rm -rf $RPM_BUILD_ROOT Line 85  rm -rf $RPM_BUILD_ROOT
85  %pre  %pre
86  %preun  %preun
87  %post  %post
88    
89    # updates sme site defaults
90    main=/etc/mock/site-defaults.cfg
91    tmp=/tmp/site-defaults.cfg
92    gen=/etc/mock/sme-site-defaults.cfg
93    
94    # position of the tags
95    BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' )
96    END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g'  )
97    #if tag is absent set first to 0
98    if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi
99    if [[ "$END_GEN" -eq "" ]]; then
100            # if second tag is absent just concatenate
101            cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen  >$tmp;
102    
103    else
104            # if both tags are present replace content
105            cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp;
106    
107    fi
108    # mv tmp file to main file
109    mv $tmp $main
110    
111    
112  %postun  %postun
113    
114  %files-f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist
115  %defattr(-,root,root,-)  %defattr(-,root,root,-)
116    /etc/mock/* %config %attr(0755,root,mock)  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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