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
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 ***
18 *** DEBIAN PACKAGES ***
24 2) From Debian/Ubuntu repository:
26 Get these files (e.g. apt-get source cntlm):
30 cntlm_0.XX.orig.tar.gz
34 $ dpkg-source -x cntlm_0.XX-Y.dsc
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 ***
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.
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:
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:
80 *** WINDOWS INSTALLER ***
82 Traditional compilation steps:
87 Prepare all binaries, manuals, config templates, Start Menu links and InnoSetup
88 project definition file:
92 Then run InnoSetup compiler to pack it all into an automatic installer EXE:
94 $ /your/path/to/ISCC.exe win/setup.iss
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:
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
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
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.
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,
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
157 David Kubicek <dave@awk.cz>