| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| %if ! %{defined _fillupdir} |
| %define _fillupdir /var/adm/fillup-templates |
| %endif |
| |
| Name: cntlm |
| Version: 0.92.3 |
| Release: 0 |
| Summary: Fast NTLM authentication proxy with tunneling |
| License: GPL-2.0-or-later |
| Group: Productivity/Networking/Web/Proxy |
| URL: http://cntlm.sourceforge.net/ |
| Source0: http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%%20%{version}/%{name}-%{version}.tar.bz2 |
| Source1: %{name}.init |
| Source2: %{name}.sysconfig |
| Source3: %{name}.service |
| Source4: %{name}.tmpfiles |
| |
| Patch0: cntlm-override-CFLAGS-CXXFLAGS-makefile.patch |
| |
| |
| Patch1: cntlm-0.92.3-HTTP-1.1-persistent-connections-with-HTTP-1.0-clients.patch |
| Requires(pre): grep |
| Requires(pre): pwdutils |
| Requires(pre): group(nogroup) |
| Provides: user(%{name}) |
| BuildRoot: %{_tmppath}/%{name}-%{version}-build |
| %if 0%{?suse_version} < 1230 |
| Requires(pre): %fillup_prereq |
| Requires(pre): %insserv_prereq |
| %else |
| BuildRequires: pkgconfig(libsystemd) |
| Requires(pre): %fillup_prereq |
| %{?systemd_requires} |
| %endif |
| |
| %description |
| Cntlm is a fast and efficient NTLM proxy, with support for TCP/IP tunneling, |
| authenticated connection caching, ACLs, proper daemon logging and behaviour |
| and much more. It has up to ten times faster responses than similar NTLM |
| proxies, while using by orders or magnitude less RAM and CPU. Manual page |
| contains detailed information. |
| |
| %prep |
| %setup -q |
| %patch -P 0 -p1 |
| %patch -P 1 |
| |
| %build |
| %configure |
| make %{?_smp_mflags} |
| |
| %install |
| make DESTDIR=%{buildroot} install %{?_smp_mflags} |
| |
| %if 0%{?suse_version} < 1230 |
| install -D -m 755 %{SOURCE1} %{buildroot}/%{_initddir}/%{name} |
| ln -s -f ../..%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} |
| %else |
| install -d %{buildroot}%{_localstatedir}/run/%{name} |
| install -D -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service |
| install -D -m 644 %{SOURCE4} %{buildroot}/%{_tmpfilesdir}/%{name}.conf |
| ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} |
| %endif |
| install -D -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name} |
| |
| %pre |
| |
| |
| |
| if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then |
| %{_sbindir}/useradd -c "CNTLM Proxy Auth" -d %{_localstatedir}/run/%{name} -g nogroup \ |
| -r -s /bin/false %{name}; |
| fi |
| %if 0%{?suse_version} >= 1230 |
| %service_add_pre %{name}.service |
| %endif |
| |
| %preun |
| |
| %if 0%{?suse_version} < 1230 |
| %stop_on_removal cntlm |
| %else |
| %service_del_preun %{name}.service |
| %endif |
| |
| |
| |
| |
| %post |
| |
| |
| %if 0%{?suse_version} < 1230 |
| %{fillup_and_insserv cntlm} |
| %else |
| %fillup_only |
| %service_add_post %{name}.service |
| %if 0%{?suse_version} <= 1320 |
| systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf || : |
| %else |
| %tmpfiles_create %{_tmpfilesdir}/%{name}.conf |
| %endif |
| %endif |
| |
| %postun |
| |
| %if 0%{?suse_version} < 1230 |
| %restart_on_update cntlm |
| %insserv_cleanup |
| %else |
| %service_del_postun %{name}.service |
| %endif |
| |
| %files |
| %defattr(-,root,root,-) |
| %license COPYRIGHT LICENSE |
| %doc README VERSION |
| %config(noreplace) %{_sysconfdir}/%{name}.conf |
| %if 0%{?suse_version} < 1230 |
| %config(noreplace) %{_initddir}/%{name} |
| %else |
| %{_unitdir}/%{name}.service |
| %{_tmpfilesdir}/%{name}.conf |
| %ghost %dir %attr(755,%{name},root) /run/%{name} |
| %endif |
| %{_sbindir}/* |
| %{_mandir}/man1/%{name}.1* |
| %{_fillupdir}/sysconfig.%{name} |
| |
| %changelog |