/[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.2 by jpp, Sun Mar 11 05:08:17 2018 UTC Revision 1.3 by jpp, Mon Mar 12 02:05:04 2018 UTC
# Line 1  Line 1 
1  # $Id: smeserver-mock.spec,v 1.1 2018/03/11 04:57:18 jpp Exp $  # $Id: smeserver-mock.spec,v 1.2 2018/03/11 05:08:17 jpp Exp $
2    
3  Summary: smeserver-mock tools for building RPMs  Summary: smeserver-mock tools for building RPMs
4  %define name smeserver-mock  %define name smeserver-mock
5  Name: %{name}  Name: %{name}
6  %define version 1.0  %define version 1.0
7  %define release 1  %define release 2
8  Version: %{version}  Version: %{version}
9  Release: %{release}%{?dist}  Release: %{release}%{?dist}
10  License: GPL  License: GPL
# Line 21  Requires: cmake automake libtool Line 21  Requires: cmake automake libtool
21  Buildrequires: e-smith-devtools  Buildrequires: e-smith-devtools
22  # needed for scl  # needed for scl
23  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
24    Requires: python27-build
25  AutoReqProv: no  AutoReqProv: no
26    
27  %changelog  %changelog
28    * Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme
29    - update of site-default.cfg  via post script [SME: 10537]
30    - removed e-smith-devtools of requirements
31    - added Requires python27-build
32    
33  * 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
34  - Initial release with SME iServer mock config files [SME: 10537]  - Initial release with SME iServer mock config files [SME: 10537]
35  - tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild  - tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild
# Line 59  rm -rf $RPM_BUILD_ROOT Line 64  rm -rf $RPM_BUILD_ROOT
64  %pre  %pre
65  %preun  %preun
66  %post  %post
67    
68    # updates sme site defaults
69    main=/etc/mock/site-defaults.cfg
70    tmp=/tmp/site-defaults.cfg
71    gen=/etc/mock/sme-site-defaults.cfg
72    
73    # position of the tags
74    BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' )
75    END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g'  )
76    #if tag is absent set first to 0
77    if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi
78    if [[ "$END_GEN" -eq "" ]]; then
79            # if second tag is absent just concatenate
80            cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen  >$tmp;
81    
82    else
83            # if both tags are present replace content
84            cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp;
85    
86    fi
87    # mv tmp file to main file
88    mv $tmp $main
89    
90    
91  %postun  %postun
92    
93  %files -f %{name}-%{version}-filelist  %files -f %{name}-%{version}-filelist


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