2009-08-29 01:03:33 +02:00
|
|
|
#
|
2011-08-17 19:16:33 +02:00
|
|
|
# spec file for package cntlm
|
2009-08-29 01:03:33 +02:00
|
|
|
#
|
2016-03-02 13:11:47 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-08-04 17:09:49 +02:00
|
|
|
# Copyright (c) 2007 Scorpio IT, Deidesheim, Germany
|
2009-08-29 01:03:33 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2015-04-25 15:29:39 +02:00
|
|
|
|
2009-08-29 01:03:33 +02:00
|
|
|
Name: cntlm
|
2013-11-11 15:01:48 +01:00
|
|
|
Version: 0.92.3
|
2015-04-25 15:29:39 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Fast NTLM authentication proxy with tunneling
|
2013-11-11 15:01:48 +01:00
|
|
|
License: GPL-2.0+
|
2009-08-29 01:03:33 +02:00
|
|
|
Group: Productivity/Networking/Web/Proxy
|
|
|
|
Url: http://cntlm.sourceforge.net/
|
2015-04-26 13:22:41 +02:00
|
|
|
Source0: http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%%20%{version}/%{name}-%{version}.tar.bz2
|
2009-08-29 01:03:33 +02:00
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: %{name}.sysconfig
|
2013-11-11 15:01:48 +01:00
|
|
|
Source3: %{name}.service
|
|
|
|
Source4: %{name}.tmpfiles
|
|
|
|
# PATCH-FIX-UPSTREAM cntlm-override-CFLAGS-CXXFLAGS-makefile.patch --fix empty debuginfo package
|
2015-04-25 15:29:39 +02:00
|
|
|
Patch0: cntlm-override-CFLAGS-CXXFLAGS-makefile.patch
|
2013-11-11 15:01:48 +01:00
|
|
|
# PATCH-FIX-UPSTREAM cntlm-0.92.3-HTTP-1.1-persistent-connections-with-HTTP-1.0-clients.patch --cntlm doesn't handle correctly
|
|
|
|
# between HTTP-1.0 and HTTP-1.1
|
2015-04-25 15:29:39 +02:00
|
|
|
Patch1: cntlm-0.92.3-HTTP-1.1-persistent-connections-with-HTTP-1.0-clients.patch
|
|
|
|
Requires(pre): grep
|
|
|
|
Requires(pre): pwdutils
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} < 1230
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
2016-03-02 13:48:06 +01:00
|
|
|
BuildRequires: systemd-devel
|
2015-04-25 15:29:39 +02:00
|
|
|
Requires(pre): %fillup_prereq
|
2013-11-11 15:01:48 +01:00
|
|
|
%{?systemd_requires}
|
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%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
|
2015-04-25 15:29:39 +02:00
|
|
|
proxies, while using by orders or magnitude less RAM and CPU. Manual page
|
2009-08-29 01:03:33 +02:00
|
|
|
contains detailed information.
|
|
|
|
|
|
|
|
%prep
|
2015-04-25 15:29:39 +02:00
|
|
|
%setup -q
|
2013-11-11 15:01:48 +01:00
|
|
|
%patch0 -p1
|
2015-04-25 15:29:39 +02:00
|
|
|
%patch1
|
2009-08-29 01:03:33 +02:00
|
|
|
|
2011-09-18 20:39:23 +02:00
|
|
|
%build
|
2013-11-11 15:01:48 +01:00
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags}
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%install
|
2015-04-25 15:29:39 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
2013-11-11 15:01:48 +01:00
|
|
|
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} < 1230
|
|
|
|
install -D -m 755 %{SOURCE1} %{buildroot}/%{_initddir}/%{name}
|
|
|
|
ln -s -f ../..%{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
2016-03-02 13:11:47 +01:00
|
|
|
install -d %{buildroot}%{_localstatedir}/run/%{name}
|
2015-04-25 15:29:39 +02:00
|
|
|
install -D -m 644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
|
2016-03-02 13:11:47 +01:00
|
|
|
install -D -m 644 %{SOURCE4} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
2015-04-25 15:29:39 +02:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
2013-11-11 15:01:48 +01:00
|
|
|
%endif
|
2015-04-25 15:29:39 +02:00
|
|
|
install -D -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
# on `rpm -ivh` PARAM is 1
|
|
|
|
# on `rpm -Uvh` PARAM is 2
|
2011-08-17 19:16:33 +02:00
|
|
|
# user cntlm
|
|
|
|
if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then
|
2015-04-25 15:29:39 +02:00
|
|
|
%{_sbindir}/useradd -c "CNTLM Proxy Auth" -d %{_localstatedir}/run/%{name} -g nogroup \
|
2009-08-29 01:03:33 +02:00
|
|
|
-r -s /bin/false %{name} 2>/dev/null;
|
2011-08-17 19:16:33 +02:00
|
|
|
fi
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
# on `rpm -e` PARAM is 0
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} < 1230
|
2009-08-29 01:03:33 +02:00
|
|
|
%stop_on_removal cntlm
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
#if [ "$1" -eq 0 ]; then
|
|
|
|
# %{_sbindir}/userdel %{name} 2>/dev/null
|
|
|
|
#fi
|
|
|
|
|
|
|
|
%post
|
|
|
|
# on `rpm -ivh` PARAM is 1
|
|
|
|
# on `rpm -Uvh` PARAM is 2
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} < 1230
|
2009-08-29 01:03:33 +02:00
|
|
|
%{fillup_and_insserv cntlm}
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
2015-04-25 15:29:39 +02:00
|
|
|
%fillup_only
|
2013-11-11 15:01:48 +01:00
|
|
|
%service_add_post %{name}.service
|
2016-03-02 13:11:47 +01:00
|
|
|
%if 0%{?suse_version} <= 1320
|
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
|
|
|
|
%else
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
|
|
|
%endif
|
2013-11-11 15:01:48 +01:00
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
# on `rpm -e` PARAM is 0
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} < 1230
|
2009-08-29 01:03:33 +02:00
|
|
|
%restart_on_update cntlm
|
2015-04-25 15:29:39 +02:00
|
|
|
%insserv_cleanup
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYRIGHT LICENSE README VERSION
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
2015-04-25 15:29:39 +02:00
|
|
|
%if 0%{?suse_version} < 1230
|
|
|
|
%config(noreplace) %{_initddir}/%{name}
|
2013-11-11 15:01:48 +01:00
|
|
|
%else
|
2015-04-25 15:29:39 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2016-03-02 13:11:47 +01:00
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
2013-11-11 15:01:48 +01:00
|
|
|
%ghost %dir %attr(755,%{name},root) /run/%{name}
|
|
|
|
%endif
|
2009-08-29 01:03:33 +02:00
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man1/%{name}.1*
|
2015-04-25 15:29:39 +02:00
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
2009-08-29 01:03:33 +02:00
|
|
|
|
|
|
|
%changelog
|