/[smecontribs]/rpms/smeserver-geoip/contribs10/smeserver-geoip.spec
ViewVC logotype

Diff of /rpms/smeserver-geoip/contribs10/smeserver-geoip.spec

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

Revision 1.2 by brianr, Tue Oct 6 14:08:35 2020 UTC Revision 1.3 by jpp, Sun Mar 14 04:33:33 2021 UTC
# Line 1  Line 1 
1  %define name smeserver-geoip  %define name smeserver-geoip
2  %define version 1.2  %define version 1.2
3  %define release 15  %define release 16
4    
5  Summary: SME Server geoip plugin  Summary: SME Server geoip plugin
6  Name: %{name}  Name: %{name}
# Line 12  Source: %{name}-%{version}.tar.gz Line 12  Source: %{name}-%{version}.tar.gz
12  Packager: Doug Kruhm <dakruhm@daknetworks.net>  Packager: Doug Kruhm <dakruhm@daknetworks.net>
13  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
14  BuildArchitectures: noarch  BuildArchitectures: noarch
15  Requires: GeoIP >= 1.6.5  Requires: perl-GeoIP2
16    Requires: libmaxminddb >= 1.1.1
17    Requires: libmaxminddb-devel >= 1.1.1
18    Requires: geolite2-country
19    Requires: geolite2-city
20    Provides: smeserver-geoip2 >= 1.2-16
21  BuildRequires: e-smith-devtools >= 1.13.1-03  BuildRequires: e-smith-devtools >= 1.13.1-03
22  Patch0: smeserver-geoip-conf-typo.patch  Patch0: smeserver-geoip-conf-typo.patch
23  Patch1: smeserver-geoip-fix-city-createlinks.patch  Patch1: smeserver-geoip-fix-city-createlinks.patch
# Line 31  SIGNAL EVENT: signal-event email-update Line 36  SIGNAL EVENT: signal-event email-update
36    
37  #----------------------------------------------------  #----------------------------------------------------
38    
39  %package        -n smeserver-geoip1  %package        -n smeserver-geoip-legacy
40  Summary:        SME Server geoip plugin v1  Summary:        SME Server geoip plugin v1
41  Group:          Email  Group:          Email
42  Requires:       perl-Geo-IP  Requires:       perl-Geo-IP
43  Requires:       GeoIP >= 1.6.5  Requires:       GeoIP >= 1.6.5
44    Requires:       GeoIP-GeoLite-data
45    Requires:       GeoIP-GeoLite-data-extra
46    Requires:       smeserver-geoip >= 1.2-16
47  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
48    
49  %description    -n smeserver-geoip1  %description    -n smeserver-geoip-legacy
50  The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers.  Package to use the legacy plugin. DB are not updated since 2018
   
 CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR)  
 SIGNAL EVENT: signal-event email-update  
 #----------------------------------------------------  
   
 %package        -n smeserver-geoip2  
 Summary:        SME Server geoip plugin v2  
 Group:          Email  
 Requires:       smeserver-geoip  
 Requires:       perl-GeoIP2  
 Requires:       GeoIP >= 1.6.5  
 Requires: libmaxminddb >= 1.1.1  
 Requires: libmaxminddb-devel >= 1.1.1  
 Requires: geolite2-country  
 Requires: geolite2-city  
 BuildRequires:  e-smith-devtools >= 1.13.1-03  
   
   
 %description    -n smeserver-geoip2  
51  The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers.  The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers.
   
 CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR)  
 SIGNAL EVENT: signal-event email-update  
52  #----------------------------------------------------  #----------------------------------------------------
53    
54  %changelog  %changelog
55    * Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme
56    - rebuild for SME10 [SME: 11023]
57      make geoip2 default
58      create geoip-legacy package with old geoip1 stuffs
59    
60  * Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme  * Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme
61  - Import to SME10 tree [SME: 11023]  - Import to SME10 tree [SME: 11023]
# Line 163  SIGNAL EVENT: signal-event email-update Line 153  SIGNAL EVENT: signal-event email-update
153  %patch5 -p1  %patch5 -p1
154  %patch6 -p1  %patch6 -p1
155  %patch7 -p1  %patch7 -p1
156    rm -rf root/var/
157    
158  %build  %build
 %{__mkdir_p} root/var/lib/GeoIP  
159  perl createlinks  perl createlinks
160    
161  %install  %install
# Line 175  rm -f %{name}-%{version}-filelist Line 165  rm -f %{name}-%{version}-filelist
165  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
166    
167  cat %{name}-%{version}-filelist \  cat %{name}-%{version}-filelist \
168  |grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \  > %{name}-%{version}-filelist
169  |grep -v 'usr/bin/geocity.pl' \  #|grep -v 'etc/e-smith/templates/etc/GeoIP.conf' \
170  |grep -v 'usr/bin/geocountry.pl'\  #|grep -v 'usr/bin/geocity.pl' \
171  |grep -v 'smeserver-geopip-download-action' \  #|grep -v 'usr/bin/geocountry.pl'\
172  |grep -v 'templates2expand/etc/GeoIP.conf' \  #|grep -v 'smeserver-geopip-download-action' \
173  |grep -v '/etc/crontab/91_Update_Geoip_db' \  #|grep -v 'templates2expand/etc/GeoIP.conf' \
174  |grep -v '/usr/bin/geoiplook' \  #|grep -v '/etc/crontab/91_Update_Geoip_db' \
175  |grep -v '/etc/e-smith/db/configuration/defaults/geoip' \  #|grep -v '/usr/bin/geoiplook' \
176   > %{name}-%{version}-filelist-v1  #|grep -v '/etc/e-smith/db/configuration/defaults/geoip' \
177  diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2  # > %{name}-%{version}-filelist-v1
178    #diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2
179    touch %{name}-%{version}-filelist-legacy
180    
181  %clean  %clean
182  rm -rf $RPM_BUILD_ROOT  rm -rf $RPM_BUILD_ROOT
# Line 198  rm -rf $RPM_BUILD_ROOT Line 190  rm -rf $RPM_BUILD_ROOT
190    
191    
192    
193  %files -n smeserver-geoip2 -f %{name}-%{version}-filelist-v2  %files -n smeserver-geoip2 -f %{name}-%{version}-filelist
194  %defattr(-,root,root,-)  %defattr(-,root,root,-)
195    
196  %files -n smeserver-geoip1 -f %{name}-%{version}-filelist-v1  %files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy
197  %defattr(-,root,root,-)  %defattr(-,root,root,-)
198    
199    


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