/[smecontribs]/rpms/denyhosts/contribs10/denyhosts.spec
ViewVC logotype

Diff of /rpms/denyhosts/contribs10/denyhosts.spec

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

Revision 1.1 by jpp, Sun Mar 14 22:32:32 2021 UTC Revision 1.2 by jpp, Mon Mar 15 03:36:18 2021 UTC
# Line 14  Line 14 
14    
15  # Please submit bugfixes or comments via http://bugs.opensuse.org/  # Please submit bugfixes or comments via http://bugs.opensuse.org/
16  #  #
17    %define release 11
18    %define _unitdir /usr/lib/systemd/system/
19  %if 0%{?suse_version} < 1120  %global with_systemd     1
 %define python_sitelib  %{py_sitedir}  
 %endif  
   
 %if 0%{?suse_version} >= 1210  
 %bcond_without systemd  
 %else  
 %bcond_with systemd  
 %endif  
   
20    
21  Name:           denyhosts  Name:           denyhosts
22  Version:        3.1  Version:        3.1
23  Release:        lp152.1.1  Release:        %{release}%{?dist}
24  Summary:        Utility to help system administrators thwart brute-force ssh hackers  Summary:        Utility to help system administrators thwart brute-force ssh hackers
25  License:        GPL-2.0-only  License:        GPL-2.0-only
26  Group:          Productivity/Networking/Security  Group:          Productivity/Networking/Security
# Line 46  Requires:      python-ipaddr Line 37  Requires:      python-ipaddr
37  Requires:       logrotate  Requires:       logrotate
38  Requires:       python  Requires:       python
39  Requires:       rsyslog  Requires:       rsyslog
40  %if %{with systemd}  BuildRequires:   python-rpm-macros
41  BuildRequires:  systemd-rpm-macros  #BuildRequires:  systemd-rpm-macros
42    BuildRequires:  systemd
43  %{?systemd_requires}  %{?systemd_requires}
 %else  
 PreReq:         %insserv_prereq  
 %endif  
 %py_requires  
 %if 0%{?suse_version} > 1110  
44  BuildArch:      noarch  BuildArch:      noarch
 %endif  
45  BuildRoot:      %{_tmppath}/%{name}-%{version}-build  BuildRoot:      %{_tmppath}/%{name}-%{version}-build
46    
47    
# Line 98  sed -i "s|^#SECURE_LOG = /var/log/messag Line 84  sed -i "s|^#SECURE_LOG = /var/log/messag
84  sed -i "s|/usr/bin/env python|%{_bindir}/python|g" %{buildroot}%{_sbindir}/daemon-control-dist  sed -i "s|/usr/bin/env python|%{_bindir}/python|g" %{buildroot}%{_sbindir}/daemon-control-dist
85    
86  # init script / systemd service  # init script / systemd service
87  %if %{with systemd}  %if %{with_systemd}
88  install -D -m644 denyhosts.service %{buildroot}%{_unitdir}/denyhosts.service  install -D -m644 denyhosts.service %{buildroot}%{_unitdir}/denyhosts.service
89  ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcdenyhosts  ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcdenyhosts
90  %else  %else
# Line 133  install -m0644 *.txt  %{buildroot}%{_def Line 119  install -m0644 *.txt  %{buildroot}%{_def
119  install -m0644 *.md   %{buildroot}%{_defaultdocdir}/%{name}/  install -m0644 *.md   %{buildroot}%{_defaultdocdir}/%{name}/
120  install -m0644 *.conf %{buildroot}%{_defaultdocdir}/%{name}/  install -m0644 *.conf %{buildroot}%{_defaultdocdir}/%{name}/
121    
122  %if %{with systemd}  %if %{with_systemd}
123  %pre  %pre
124  %service_add_pre %{name}.service  %service_add_pre %{name}.service
125  %endif  %endif
126    
127  %post  %post
128  %if %{with systemd}  %if %{with_systemd}
129  %service_add_post %{name}.service  %service_add_post %{name}.service
130  %else  %else
131  %{fillup_and_insserv -f denyhosts}  %{fillup_and_insserv -f denyhosts}
132  %endif  %endif
133    
134  %preun  %preun
135  %if %{with systemd}  %if %{with_systemd}
136  %service_del_preun %{name}.service  %service_del_preun %{name}.service
137  %else  %else
138  %stop_on_removal denyhosts  %stop_on_removal denyhosts
139  %endif  %endif
140    
141  %postun  %postun
142  %if %{with systemd}  %if %{with_systemd}
143  %service_del_postun %{name}.service  %service_del_postun %{name}.service
144  %else  %else
145  %insserv_cleanup  %insserv_cleanup
# Line 177  install -m0644 *.conf %{buildroot}%{_def Line 163  install -m0644 *.conf %{buildroot}%{_def
163  %ghost %config(noreplace) %{_sysconfdir}/blacklist  %ghost %config(noreplace) %{_sysconfdir}/blacklist
164  %config(noreplace) %{_sysconfdir}/logrotate.d/denyhosts  %config(noreplace) %{_sysconfdir}/logrotate.d/denyhosts
165  %config(noreplace) %{_sysconfdir}/denyhosts.conf  %config(noreplace) %{_sysconfdir}/denyhosts.conf
166  %if %{with systemd}  %if %{with_systemd}
167  %{_unitdir}/denyhosts.service  %{_unitdir}/denyhosts.service
168  %else  %else
169  %attr(755,root,root) %{_sysconfdir}/init.d/denyhosts  %attr(755,root,root) %{_sysconfdir}/init.d/denyhosts
170  %endif  %endif
171    
172  %changelog  %changelog
173    * Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 3.1-11.sme
174    - First release for SME10 [SME: 11459]
175      imported from opensuse, reworked spec file to build it on CentOS 7 / SME 10
176    
177  * Sat Aug 11 2018 javier@opensuse.org  * Sat Aug 11 2018 javier@opensuse.org
178  - Update to 3.1  - Update to 3.1
179    + Fixes a bug when moving between Python 2 and Python 3    + Fixes a bug when moving between Python 2 and Python 3


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