Support This Project

Generic Linux build instructions

Distribution specific instructions

This page provides a generic overview of building wzdftpd on the Linux platform.

For distribution specific instructions, please choose your distribution from the list below:

Build system

Introduction

wzdftpd uses CMake, which is a cross-platform replacement of the GNU build system that many users are familiar with. CMake generates traditional build scripts and project files for use on Linux, other POSIX systems and Windows platforms. This makes it easier to maintain wzdftpd across multiple platforms at once (especially on Windows).

Requirements

  1. CMake
  2. Standard GNU build environment, including (but not limited to):
    1. GNU Make
    2. GCC
    3. GNU libc

Source code

wzdftpd

You will need to acquire a copy of the wzdftpd source code. You can pick which version of the source code you wish to compile, but it is suggested that you use the most recent version possible. Once you have obtained the source code, unpack it to a blank directory.

Additional library headers

On your system, you will need to also have library headers installed for all wzdftpd features you decide to enable (OpenSSL, Perl, MySQL, etc). These library headers should match the version of the libraries you're using on the system where you'll be using wzdftpd.

Build configuration

You will need to configure some compile-time options for wzdftpd, such as which features you wish to compile into your version of wzdftpd. A make script has been setup to act as an abstraction around the CMake command line and this is the preferred method for starting the CMake build process, as you don't need to learn about any CMake command line specifics.

In the directory where you have unpacked the source code, perform the following file copy:

cp Makefile.options.defaults Makefile.options.local

Open Makefile.options.local in a text editor and edit the file to your requirements. Make sure you read the comments within Makefile.options.local carefully, as they will guide you through the process of setting up the compile time options for wzdftpd.

If you wish to install wzdftpd directly after the compile process without using a distribution-specific package manager (this is NOT recommended), you will need to set PREFIX to an appropriate value. See the Installation section below for further information.

Compiling

After you've configured the build configuration file, you should be ready to compile wzdftpd. Double check that for each feature you've enabled, you have the required library header files on your system (they're required for compiling). If you're missing any library headers, the compile will fail with an error informing you that some headers could not be located on your system.

You need to change into the directory where you have unpacked the source code to. Ensure that the build subdirectory does not exist, as this is a sign that you're trying to overwrite an older build you made of wzdftpd. If you do have a build subdirectory, you should clean it up (delete it) with the following command:

make clean

You are now ready to compile wzdftpd with the following command:

make

As wzdftpd is compiling, you should see the progress as a percentage value. If all goes well, the compile process will complete successfully (check that the progress reaches 100% and that no critical errors show up after the make command has finished executing).

Packaging

It is possible (although not described here in any detail at the moment) to package your build together into a format that is suitable for distribution.

If you want to create a Debian package, use the following command from the directory where you unpacked the source code:

make package

If you want to create a generic release tarball, use this command instead:

make release

Generated packages will be placed within the tmp subdirectory.

Installing

Directly installing wzdftpd using CMake is currently NOT recommended for the following reasons:

  1. You are bypassing the use of a package manager that can keep track of what files are installed (making removal or upgrading of wzdftpd much cleaner and easier in the future).
  2. The default choice of installation paths is not guaranteed to be correct on all systems, and will need distribution-specific overrides in most cases.

If you still want to proceed with a direct installation, you need to have defined PREFIX earlier in Makefile.options.local. All wzdftpd files and folders will be installed under this prefix path. For example, if you have PREFIX = /usr/local, configuration files will be installed to /usr/local/etc/wzdftpd and not the expected location of /etc/wzdftpd.

You are advised to set PREFIX to a temporary directory such as /tmp/wzdftpd-install from where you can manually copy files to their correct locations on your system. This is especially true for more advanced builds and systems, such as on systems that mix both 32bit and 64bit libraries and applications.