release 0.92.3
[cntlm.git] / README
blobc09be232f7d1a3e81a620b548d3f95410cbe576a
1 Installation using packages
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 Most of the popular distros contain cntlm packages.n their repositories.
5 You can use the procedures described below to prepare a package of current cntlm
6 version if desired.
8 NOTE: generating packages traditionally requires root privileges (to be able to set
9 proper ownership and permissions on package members). You can overcome that using
10 fakeroot. However, to install your packages you have to be root.
12 *** SOURCE TARBALL ***
14         $ make tgz
15         or
16         $ make tbz2
18 *** DEBIAN PACKAGES ***
20 1) Quick way:
22         $ make deb
24 2) From Debian/Ubuntu repository:
26         Get these files (e.g. apt-get source cntlm):
28         cntlm_0.XX-X.diff.gz
29         cntlm_0.XX-X.dsc
30         cntlm_0.XX.orig.tar.gz
32         Compile:
34         $ dpkg-source -x cntlm_0.XX-Y.dsc
35         $ cd cntlm-0.XX/
36         $ dpkg-buildpackage -b -rfakeroot
38         Upon installation, the package takes care of creating a dedicated user for
39         cntlm, init script integration, manages eventual configuration file updates
40         with new upstream versions, things like restart of the daemon after future
41         updates, etc. You can later revert all these changes with one command, should
42         you decide to remove cntlm from your system.
45 *** RPM FROM SCRATCH ***
47 1) Quick way:
49         $ make rpm                      # you'll need root privs. or fakeroot utility
51 2) Detailed howto (or if make rpm doesn't work for you)
53         To build an RPM package from scratch, as root change to
54         /usr/src/[redhat|rpm|whatever]/SOURCES
56         Copy there all files from cntlm's rpm/ directory plus appropriate version of
57         the source tar.bz2 (see SOURCE TARBALL section above) and type:
59         $ rpmbuild -ba cntlm.spec
61         Shortly after, you'll have source and binary RPMs ready in your ../SRPMS, resp.
62         ../RPMS directories.
64         If your build cannot find the default config file in /etc, you probably have
65         broken RPM build environment. You should add this to your ~/.rpmmacros:
66         %_sysconfdir    /etc
68 *** RPM FROM *.src.rpm ***
70         If you just want to create a binary package from src.rpm, as root type:
72         $ rpmbuild --rebuild pkgname.src.rpm
74         Resulting binary RPM will be at /usr/src/..../RPMS
76         If your build cannot find the default config file in /etc, you probably have
77         broken RPM build environment. You should add this to your ~/.rpmmacros:
78         %_sysconfdir    /etc
80 *** WINDOWS INSTALLER ***
82         Traditional compilation steps:
84         $ ./configure
85         $ make
87         Prepare all binaries, manuals, config templates, Start Menu links and InnoSetup
88         project definition file:
90         $ make win
92         Then run InnoSetup compiler to pack it all into an automatic installer EXE:
94         $ /your/path/to/ISCC.exe win/setup.iss
95         or
96         Open folder "win" in explorer, right click "setup.iss" and select "Compile".
98         Both with generate an installer in the "win" folder.
100 Traditional installation
101 ~~~~~~~~~~~~~~~~~~~~~~~~
102 First, you have to compile cntlm. Using the Makefile, this should be very easy:
104 $ ./configure
105 $ make
106 $ make install
108 Cntlm does not require any dynamic libraries and there are no dependencies you
109 have to satisfy before compilation, except for libpthreads. This library is
110 required for all threaded applications and is very likely to be part of your
111 system already, because it comes with libc. Next, install cntlm onto your
112 system like so:
114 Default installation directories are /usr/sbin, /usr/share/man and /etc. Should
115 you want to install cntlm into a different location, change the DESTDIR
116 installation prefix (from "/") to add a different installation prefix (e.g.
117 /usr/local).  To change individual directories, use BINDIR, MANDIR and
118 SYSCONFDIR:
120 $ make SYSCONFDIR=/etc BINDIR=/usr/bin MANDIR=/usr/share/man
121 $ make install SYSCONFDIR=/etc BINDIR=/usr/bin MANDIR=/usr/share/man
123 Cntlm is compiled with system-wide configuration file by default. That means
124 whenever you run cntlm, it looks into a hardcoded path (SYSCONFDIR) and tries
125 to load cntml.conf. You cannot make it not to do so, unless you use -c with an
126 alternative file or /dev/null. This is standard behaviour and probably what you
127 want. On the other hand, some of you might not want to use cntlm as a daemon
128 started by init scripts and you would prefer setting up everything on the
129 command line. This is possible, just comment out SYSCONFDIR variable definition
130 in the Makefile before you compile cntlm and it will remove this feature.
132 Installation includes the main binary, the man page (see "man cntlm") and if
133 the default config feature was not removed, it also installs a configuration
134 template. Please note that unlike bin and man targets, existing configuration
135 is never overwritten during installation. In the doc/ directory you can find
136 among other things a file called "cntlmd". It can be used as an init.d script.
139 Architectures
140 ~~~~~~~~~~~~~
141 The build system now has an autodetection of the build arch endianness. Every
142 common CPU and OS out there is supported, including Windows, MacOS X, Linux,
143 *BSD, AIX.
146 Compilers
147 ~~~~~~~~~
148 Cntlm is tested against GCC and IBM XL C/C++, other C compilers will work
149 for you too. There are no compiler specific directives and options AFAIK.
150 compilers might work for you (then again, they might not). Specific
151 Makefiles for different compilers are supported by the ./configure script
152 (e.g. Makefile.xlc)
155 Contact
156 ~~~~~~~
157 David Kubicek <dave@awk.cz>