Creation of the zlib source for illumos This source was derived from the Oracle userland version of zlib. Their userland distribution is documented at: https://java.net/projects/solaris-userland Use this command to obtain it: $ hg clone https://hg.java.net/hg/solaris-userland~gate userland-gate It includes adaptations for all opensource software that's included with Oracle Solaris, along with download procedures and build procedures. It will download and build zlib-1.2.8.tar.gz in the components/zlib directory. Begin by building the userland version of zlib. I had to modify some of the userland files to accomodate the older versions of python, perl, and ld on illumos distributions. The different location of the compilers also had to be accomodated. For the userland build on SPARC, I also had to omit Oracle's T4 capability enhancements because they used compiler options that were not available on illumos distributions, specifically these: -xarch=sparc4 -xtarget=T4 -xchip=T4 Once the userland build is complete, record the compiler options so they can be transferred to the illumos build. The location for illumos is usr/src/lib/zlib . Makefiles follow the model described in usr/src/lib/README.Makefiles . At the top level of the new subdirectory, both Makefile and Makefile.com are required. In the ISA-dependant locations (amd64 i386 sparc sparcv9), only Makefile is required. All of the zlib source goes in the `common' directory. Most of the files from the zlib userland directory are copied to the new location. `capabilities' is copied, but used only for reference. `llib-lz' becomes a symlink target. `Makefile' is renamed and used only for reference. `mapfile' is also a symlink target. `patches' is copied, but `parfait.patch' is moved to the new `unused-patches' directory. `zlib-1.2.8' is moved to `common'. This source has already been patched by the userland build. `zlib.3.sunman' is used only for reference. `zlib.license' becomes a symlink target. `zlib.p5m', the manifest, is renamed and used for reference. The `build' directory and the file `zlib-1.2.8.tar.gz' are not used and don't need to be copied. None of the Oracle or zlib Makefiles are used, except for reference. The following files, symlinks, or directories are newly created in the new illumos location: unused-patches THIRDPARTYLICENSE THIRDPARTYLICENSE.descrip amd64 common i386 sparc sparcv9 common/llib-lz common/mapfile-vers The new Makefiles list all the object files, suppress the header check, add the necessary compile options, and create usr symlinks in the prototype area. The zlib man pages are installed by an addition to the Makefile in usr/src/man/man3 . Rather than copy the man page source to this location, a symlink pointing to common/zlib.3 is created here. A new manifest, library-zlib.mf, is created in usr/src/pkg/manifests to build the IPS package from files in the prototype area.