Beginning mport Maintaining

Before you begin

You should have a basic understanding of how to install mports, use packages and a basic idea of how the software works that you want to work with. Each port has different knowledge requirements. Some are shell scripts, some are C/C++ programs, others are perl or java. It is important that you have a basic understanding of the technologies used to create the software. You don't have to be a programmer, but it helps quite a bit.

You will need to learn about patch and diff as well as cvs.

Prepare your environment

Add MPORT_MAINTAINER_MODE=yes to /etc/make.conf

MPORT_MAINTAINER_MODE enables additional checks during the process described below. It will inform you of errors not normally shown.

Adding New mports

Initial Steps

First, check to see if the software is already in the MidnightBSD mports collection. A quick way to do this is by browsing the MidnightBSD web CVS mports collection. If it does exist, skip to the updating existing mports section. Similarly, you should now check to see if FreeBSD already has the software in their collection. Again, a quick way to check is using the FreeBSD Port Search page. If FreeBSD has already ported the software, this will make your job much easier. You can use the make search key="" from /usr/mports to do searches.

Updating Existing mports

Updating an existing mport should be a bit easier than adding a new one.

  1. cd to /usr/mports/category/projectname

  2. Update Makefile to new version
  3. make clean
  4. make makesum
  5. make fake

Upon a successful make fake, you should see "Fake succeeded" along with other output. It is important to realize that files can be added or deleted between versions of software. In mports, a file called pkg-plist is often found in the directory with the port. It contains a list of all the files that will be installed as well as special commands that must be executed during install or uninstall. If you get an error during fake, this is most likely out of date.

Adding new mport

Updating Existing mports from FreeBSD