Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GENPLIST(1)		    General Commands Manual		   GENPLIST(1)

NAME
       GENPLIST	- Generate a static plist

SYNOPSIS
       make depends
       genplist	create <prefix>
       genplist	diff
       genplist	commit
       genplist	test
       genplist	clean

DESCRIPTION
       The  genplist  command  generates a packing list	and a man page listing
       for the port in the current directory, roughly following	the plist gen-
       eration	process	 outlined in the FreeBSD Porters' Handbook.  The files
       are saved to "pkg-plist.new" and	 "man-plist.new",  respectively.   The
       file "man-list.new" is intended for inclusion in	the port Makefile as a
       list of filenames assigned to one or more of the	MAN(N) variables.  The
       file  "pkg-plist.new"  can simply be renamed to "pkg-plist" once	it has
       been verified (and edited if necessary).

       When using genplist, the	port will be built and installed with  a  non-
       standard	prefix.	 Hence,	before using genplist, all dependencies	should
       be installed using pkg_add(1) or	make depends, so that they  don't  in-
       herit the prefix	from genplist.

       For the "create"	subcommand, the	user must specify an installation pre-
       fix:

	   genplist create <prefix>

       The port	will be	installed  into	 <prefix>/$PORTNAME.   This  directory
       must  not  exist	at the time genplist is	invoked.  If the directory ex-
       ists, genplist will abort with an error message,	rather than  overwrite
       it.   A	typical	prefix is /tmp,	but note that /tmp may not have	enough
       space for large ports.

       If the installation prefix does not exist, genplist will	create an  in-
       stallation  tree	 under	this  directory	 using mtree, install the port
       there, and generate "pkg-plist.new" and "man-plist.new"	based  on  its
       contents.

       The  installation  prefix  is automatically saved for use by subsequent
       genplist	subcommands such as "test" and "clean".

       IMPORTANT:

       Prerequisite ports should generally be installed	separately  first,  so
       that  they are installed	under the default PREFIX (usually /usr/local),
       rather than inheriting the prefix given to genplist.

       The general procedure can be outlined as	follows:

       1. Generate a new plist:

	   genplist create /home/bacon/Test_ports

       2. Visually inspect the differences between the old and new plists:

	   genplist diff

       3. Examine the files "pkg-plist.new" and	"man-plist.new"	and  make  any
       necessary  changes.   No	 changes  should  be necessary for most	simple
       ports.  For a complex port, genplist should be regarded only as an  aid
       to  generating  the  final plist.  Generating an	exact packing list for
       complex ports requires a	certain	degree of intelligence,	so  the	 90/10
       rule is invoked here in the interest of keeping this tool simple.

       4. Commit the new plist.	( Renames pkg-plist.new	to pkg-plist. )

	   genplist commit

       5. Insert the contents of man-plist.new into your port Makefile,	if ap-
       propriate.

	   MAN1=     (insert man-plist.new here)

       6. Test the new plist, to make sure the port deinstalls cleanly.	  This
       process	will  perform  an  install and deinstall using the same	prefix
       specified in the	"create" step, and then	check for  leftover  files  in
       the install tree.

	   genplist test

       7. Clean	up

	   genplist clean

EXAMPLE
       cd Newports/science/afni
       genplist	create /home/bacon/Test_ports
       genplist	diff
       vi pkg-plist.new	(make any necessary manual changes)
       genplist	commit
       vi Makefile (insert man-plist, and edit)
       genplist	test
       genplist	clean

PLUG-INS
       The genplist script can be extended for a particular port by creating a
       script or program named	$HOME/.genplist/portname.   If	present,  such
       scripts	are  called  by	 genplist  immediately	after  generating pkg-
       plist.new, with pkg-plist as the	sole command-line argument.  For exam-
       ple, if there is	a script named

	   ~/.genplist/ape

       then genplist will execute the command

	   ~/.genplist/ape pkg-plist.new

       after  generating  pkg-plist.new.   This	 allows	the port maintainer to
       perform additional automated edits that	are  specific  to  each	 port.
       This  feature  facilitates completely automated plist generation, while
       keeping the base	genplist script	reasonably simple.

SEE ALSO
       ports(7), port(1), portlint(1)

AUTHOR
       Jason W.	Bacon
       Acadix Consulting, LLC

CONTRIBUTORS
       Greg Larkin
       SourceHosting.net

       Olli Hauer
       FreeBSD.org

								   GENPLIST(1)

NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | PLUG-INS | SEE ALSO | AUTHOR | CONTRIBUTORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=genplist&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help