version 1.32, 2001/04/02 20:44:58 |
version 1.33, 2001/07/05 18:52:09 |
|
|
<h2><font color="#e00000">OpenBSD Porting Checklist</font></h2> |
<h2><font color="#e00000">OpenBSD Porting Checklist</font></h2> |
|
|
This document describes how to make or upgrade a port. It is a useful |
This document describes how to make or upgrade a port. It is a useful |
reminder of things to do. This is not totally accurate nor perfect. |
reminder of things to do. This is neither totally accurate nor perfect. |
Direct comments and questions to <a href="mailto:ports@openbsd.org"> |
Direct comments and questions to <a href="mailto:ports@openbsd.org"> |
ports@openbsd.org </a>. |
ports@openbsd.org </a>. |
|
|
|
|
<li> |
<li> |
Reading this list is important since many announcements go over this list. |
Reading this list is important since many announcements go over this list. |
<li> |
<li> |
You will find a lot of porting-savvy people here. They can often give you |
You will find a lot of porting-savvy people there. They can often give you |
good advice or test ports for you. |
good advice or test ports for you. |
</ul> |
</ul> |
|
|
|
|
|
|
<br><li> |
<br><li> |
Check out a copy of the ports tree from cvs. |
Check out a copy of the ports tree from cvs. |
You can find instructions to do this at |
You can find instructions on how to do this at |
<a href="http://www.openbsd.org/anoncvs.html"> |
<a href="http://www.openbsd.org/anoncvs.html"> |
http://www.openbsd.org/anoncvs.html</a>. |
http://www.openbsd.org/anoncvs.html</a>. |
|
|
|
|
${MASTER_SITES}${DISTNAME}${EXTRACT_SUFX}. All three are used. Don't |
${MASTER_SITES}${DISTNAME}${EXTRACT_SUFX}. All three are used. Don't |
set DISTNAME to point to the file directly. |
set DISTNAME to point to the file directly. |
<li> |
<li> |
You can check to see if you have filled this values in correctly by typing |
You can check to see if you have filled these values in correctly by typing |
<b>make fetch-all</b> |
<b>make fetch-all</b> |
</ul> |
</ul> |
<p> |
<p> |
|
|
|
|
<br><li> |
<br><li> |
Extract the port with <b>make extract</b>. Pay attention to where the base |
Extract the port with <b>make extract</b>. Pay attention to where the base |
of the sources are. Usually, its <i>work/DISTNAME</i> You may need to modify |
of the sources are. Usually, it's <i>work/DISTNAME</i>. You may need to modify |
the Makefile's WRKDIST variable if it is different. |
the Makefile's WRKDIST variable if it is different. |
|
|
<br><br><li> |
<br><br><li> |
|
|
|
|
<br><br><li> |
<br><br><li> |
Now is also a good time to figure out what kind of licensing restrictions |
Now is also a good time to figure out what kind of licensing restrictions |
apply to your port. Many are freely redistribution but then again, quite |
apply to your port. Many are freely redistributable but then again, quite |
a few are not. We need four questions answered to distribute ports |
a few are not. We need four questions answered to distribute ports |
properly. These are the PERMIT_* values in the Makefile. |
properly. These are the PERMIT_* values in the Makefile. |
<ul><li> |
<ul><li> |
|
|
If you're lucky, the port will go all the way through without errors. |
If you're lucky, the port will go all the way through without errors. |
<li> |
<li> |
If it exits with an error, you will need to generate patches for your port. |
If it exits with an error, you will need to generate patches for your port. |
Figure out what needs to be changed and make patch for it. |
Figure out what needs to be changed and make a patch for it. |
<li> |
<li> |
Patches must be relative to ${WRKDIST}. |
Patches must be relative to ${WRKDIST}. |
<li> The easiest way to reset the port and test your patches is |
<li> The easiest way to reset the port and test your patches is |
|
|
|
|
<li> |
<li> |
Create pkg/PLIST. After the install is complete use the developer's command, |
Create pkg/PLIST. After the install is complete use the developer's command, |
<b>make plist</b> which makes the file PLIST-auto in the <i>pkg</i> directory. |
<b>make plist</b> which makes the file PLIST in the <i>pkg</i> directory. |
This file is a candidate packing list. |
This file is a candidate packing list. |
<p> |
<p> |
Beware! The files are found by timestamp. This means it does NOT: |
Beware! The files are found by timestamp. This means it does NOT: |
|
|
anything in the packing list. But still... |
anything in the packing list. But still... |
</ul> |
</ul> |
<p> |
<p> |
Peruse `PLIST-auto' and verify that everything was installed and |
Peruse `PLIST' and verify that everything was installed and |
that it was installed in the proper locations. Anything not installed |
that it was installed in the proper locations. Anything not installed |
can be added to a port Makefile `post-install' rule. |
can be added to a port Makefile `post-install' rule. |
<p> |
|
Move `PLIST-auto' to `PLIST' |
|
|
|
<p> |
<p> |
Ports that install shared libraries will need two versions of the PLIST file. |
Ports that install shared libraries will have another file called PFRAG.shared. |
<ul> |
<ul> |
<li> |
<li> |
PLIST describes the files installed on those architectures that support |
PLIST describes the files being independent of whether the architecture supports shared libraries or not. |
shared libraries. |
|
<li> |
<li> |
PLIST.noshared describes the files installed on architectures that do not |
PFRAG.shared describes only the files being additionally installed on those architectures that support |
support shared libs. |
|
<li> |
|
Typically, PLIST.noshared is a copy of PLIST less references to any |
|
shared libraries. |
shared libraries. |
|
<li> |
|
PFRAG.noshared describes only the files being additionally installed on architectures that do not |
|
support shared libraries. |
</ul> |
</ul> |
|
|
<br><li> |
<br><li> |
|
|
used to uninstall. `sudo make reinstall' is used to reinstall. See the |
used to uninstall. `sudo make reinstall' is used to reinstall. See the |
`pkg_create' man page for other commands that may be added |
`pkg_create' man page for other commands that may be added |
to PLIST to ensure all is cleaned up. After an uninstall the command |
to PLIST to ensure all is cleaned up. After an uninstall the command |
<p><code>find /usr/local -newer work/.install_started -print</code> |
<p><code>find /usr/local -newer work/fake-${MACHINE_ARCH}[-${FLAVOR}]/.install_started -print</code> |
<p>should only list standard directory names. |
<p>should only list standard directory names. |
|
|
<br><br><li> |
<br><br><li> |