@@ -341,7 +341,8 @@ BuildArch: noarch
341341This package provides HTML documentation for the OpenWSMAN Ruby
342342bindings.
343343
344- %endif # not rhel7
344+ # - endif not rhel7
345+ %endif
345346
346347%package perl
347348%if 0%{?fedora}
@@ -447,31 +448,39 @@ rm -f %{buildroot}/%{_libdir}/%{name}/plugins/*.la
447448rm -f %{buildroot}/%{_libdir}/%{name}/authenticators/*.la
448449[ -d %{buildroot}/%{ruby_sitelib} ] && rm -f %{buildroot}/%{ruby_sitelib}/openwsmanplugin.rb
449450[ -d %{buildroot}/%{ruby_vendorlib} ] && rm -f %{buildroot}/%{ruby_vendorlib}/openwsmanplugin.rb
451+
450452%if 0%{?has_systemd}
451453install -D -m 644 %{S:4} %{buildroot}/%{_unitdir}/%{name}.service
454+ %if 0%{?suse_version} < 1600
452455# rcopenwsman
453456ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
457+ %endif
454458%else
459+ # no systemd, assume sysv style init
455460mkdir -p %{buildroot}/%{_sysconfdir}/init.d
456461install -m 755 build/etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/init.d/openwsmand
457462ln -sf %{_sysconfdir}/init.d/openwsmand %{buildroot}/%{_sbindir}/rcopenwsmand
458463%endif
464+
459465%if 0%{?has_firewalld}
460466mkdir -p %{buildroot}/%{_prefix}/lib/firewalld/services
461467install -D -m 644 %{S:5} %{buildroot}/%{_prefix}/lib/firewalld/services/%{name}.xml
462468%else
463469install -D -m 644 %{S:3} %{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
464470%endif
471+
465472#install -m 644 etc/%{name}.conf %{buildroot}/%{_sysconfdir}/%{name}
466473#install -m 644 etc/openwsman_client.conf %{buildroot}/%{_sysconfdir}/%{name}
467474#install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/%{name}
468475#install -m 644 %{pamfile} %{buildroot}/%{_sysconfdir}/pam.d/%{name}
476+
469477%if 0%{?suse_version} > 1500
470478mkdir -p %{buildroot}%{_pam_vendordir}
471479mv %{buildroot}/%{_sysconfdir}/pam.d/%{name} %{buildroot}/%{_pam_vendordir}
472480# for reproducible build:
473481strip-nondeterminism %{buildroot}/%{_javadir}/*jar
474482%endif
483+
475484%if 0%{?rhel_version} == 700
476485rm -f %{buildroot}/%{_bindir}/winrs
477486%endif
499508for i in pam.d/%{name} ; do
500509 test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
501510done
511+ echo Server certificates length must be 2048 bits or more. Check and recreate certificates if needed.
502512%endif
503513
504514%post server
@@ -601,7 +611,8 @@ rm -f /var/log/wsmand.log
601611%defattr(-,root,root)
602612%dir %{_docdir}/%{name}-ruby-docs
603613%{_docdir}/%{name}-ruby-docs
604- %endif # not rhel-7
614+ # - endif not rhel-7
615+ %endif
605616
606617%files perl
607618%defattr(-,root,root)
@@ -635,7 +646,9 @@ rm -f /var/log/wsmand.log
635646%endif
636647%if 0%{?has_systemd}
637648%{_unitdir}/%{name}.service
649+ %if 0%{?suse_version} < 1600
638650%{_sbindir}/rc%{name}
651+ %endif
639652%else
640653%attr(0755,root,root) %{_sysconfdir}/init.d/openwsmand
641654%{_sbindir}/rc%{name}d
0 commit comments