Differential D29450 Diff 86869 documentation/content/en/books/porters-handbook/quick-porting/_index.adoc
Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/porters-handbook/quick-porting/_index.adoc
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
[[porting-makefile]] | [[porting-makefile]] | ||||
== Writing the Makefile | == Writing the Makefile | ||||
The minimal [.filename]#Makefile# would look something like this: | The minimal [.filename]#Makefile# would look something like this: | ||||
[.programlisting] | [.programlisting] | ||||
.... | .... | ||||
# $FreeBSD$ | |||||
PORTNAME= oneko | PORTNAME= oneko | ||||
DISTVERSION= 1.1b | DISTVERSION= 1.1b | ||||
CATEGORIES= games | CATEGORIES= games | ||||
MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/ | MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/ | ||||
MAINTAINER= youremail@example.com | MAINTAINER= youremail@example.com | ||||
COMMENT= Cat chasing a mouse all over the screen | COMMENT= Cat chasing a mouse all over the screen | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> | ||||
.... | .... | ||||
Try to figure it out. Do not worry about the contents of the `$FreeBSD$` line, it will be filled in automatically by Subversion when the port is imported to our main ports tree. A more detailed example is shown in the crossref:porting-samplem[porting-samplem,sample Makefile] section. | Try to figure it out. A more detailed example is shown in the crossref:porting-samplem[porting-samplem,sample Makefile] section. | ||||
[[porting-desc]] | [[porting-desc]] | ||||
== Writing the Description Files | == Writing the Description Files | ||||
There are two description files that are required for any port, whether they actually package or not. They are [.filename]#pkg-descr# and [.filename]#pkg-plist#. Their [.filename]#pkg-# prefix distinguishes them from other files. | There are two description files that are required for any port, whether they actually package or not. They are [.filename]#pkg-descr# and [.filename]#pkg-plist#. Their [.filename]#pkg-# prefix distinguishes them from other files. | ||||
[[porting-pkg-descr]] | [[porting-pkg-descr]] | ||||
=== [.filename]#pkg-descr# | === [.filename]#pkg-descr# | ||||
▲ Show 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | |||||
==== | ==== | ||||
Next, create a man:patch[1], file. Assuming the port is called `oneko` and is in the `games` category. | Next, create a man:patch[1], file. Assuming the port is called `oneko` and is in the `games` category. | ||||
[[porting-submitting-diff]] | [[porting-submitting-diff]] | ||||
.Creating a [.filename]#.diff# for a New Port | .Creating a [.filename]#.diff# for a New Port | ||||
[example] | [example] | ||||
==== | ==== | ||||
Add all the files with `svn add`. `cd` to the base of the ports tree so full paths to the changed files are included in the diff, then generate the diff with `svn diff`. For example: | Add all the files with `git add .`, then generate the diff with `git diff`. For example: | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
% svn add . | % git add . | ||||
% cd ../.. | % git diff --staged > oneko.diff | ||||
% svn diff games/oneko > oneko.diff | |||||
.... | .... | ||||
[IMPORTANT] | [IMPORTANT] | ||||
**** | **** | ||||
To make it easier for committers to apply the patch on their working copy of the ports tree, please generate the [.filename]#.diff# from the base of your ports tree. | To make it easier for committers to apply the patch on their working copy of the ports tree, please generate the [.filename]#.diff# from the base of your ports tree. | ||||
**** | **** | ||||
==== | ==== | ||||
Show All 30 Lines |