·Q¥²²{¦b¦U¦ì¤@©w¹ï°µ¤@Ó¦Û¤vªº port ©M¤É¯Å²{¦³ªº port ¦³¿³½ì§a¡H¤Ó´Î¤F¡I
±µ¤U¨Óªº¬O¦p¦ó°µ¤@Ó FreeBSD ªº port ªº«ü¤Þ¡C ¦pªGn¤É¯Å²{¦³ªº port ´NÀ³¸Ó¬Ý§¹³oÓ¦A¬Ý Section 4.4.15¡C
ı±o³o¥÷¤å¥ó¤£°÷¸Ô²Ó®É¡A¥i¥H°Ñ¦Ò©Ò¦³ port ªº Makefile ³£¦³¥]§tªº /usr/ports/Mk/bsd.port.mk¡C§Y¨Ï¨S¦³¨C¤Ñ³£¦b hack Makefile¡A¤´µM«Øij³o¼Ë°µ¡A¦Ó¥B¥i¥H±q¸Ì±±o¨ì«Ü¦hª¾ÃÑ¡C ¦¹¥~¤]¥i¥H§â¯S§Oªº°ÝÃD°e¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org>¡C
Note: ¥u¦³¤Ö¼Æ¥i¥H§ó°ÊªºÅÜ¼Æ (VAR) ¤~·|¦b³o¥÷¤å¥ó¤¤´£¨ì¡C¤j³¡¥÷(¦pªG¤£¬O¥þ³¡)³£¦b bsd.port.mk ªº¶}©l¦³µù¸Ñ¡C ³oÓÀɮץΪº¬O¤£¼Ð·Çªº tab ³]©w¡CEmacs ©M Vim ¦b¸ü¤JÀÉ®×®ÉÀ³¸Ó³£¯àÅG»{¥X¨Ó¡C ¤@¥¹Àɮ׸ü¤J®É¡Avi ©M ex ³£¯àÂÇ¥ÑÁä¤J :set tabstop=4 ±o¨ì¥¿½Tªº³]©wÈ¡C
³o¤@³¹»¡©ú¤F¦p¦ó§Ö³t¦a²¾´Ó(port)¡C ¤£¹L§ÚÌ·|¬Ý¨ì¦b«Ü¦h¦a¤è³o¼Ë¬O¤£°÷ªº¡C
º¥ý®³¨ìì©lªº tarball ¨Ã§â¥¦©ñ¶i DISTDIR¡A ¹w³]¬O /usr/ports/distfiles¡C
Note: The following assumes that the software compiled out-of-the-box, ´N¬O»¡³oÓ port §¹¥þ¤£»Ýnקï´N¥i¥H¦b FreeBSD ¤W°õ¦æ¡C °²¦pn§ïÅܬYÓ¦a¤è¡A¨º¤]¥²¶·°Ñ¦Ò¤U¤@¸`¡C
³Ì¤pªº Makefile ¬Ý°_¨Ó·|¬O³o°Æ¼w©Ê¡G
# New ports collection makefile for: oneko # Version required: 1.1b # Date created: 5 December 1994 # Whom: asami # # $FreeBSD$ # DISTNAME= oneko-1.1b CATEGORIES= games MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/ MAINTAINER= asami@FreeBSD.org MAN1= oneko.1 MANCOMPRESSED= yes USE_IMAKE= yes .include <bsd.port.mk>
¬Ý¯à¤£¯à¤F¸Ñ§a¡C¤£¥Î¾á¤ß¦³ $FreeBSD$ ¨º¦æ¡A·í port ¶i¤J¥Dnªº port tree ®É·|¥Ñ CVS ¦Û°Ê¶ñ¤W¡C ¥i¥H¦b Makefile ªº¼Ë¥»¨º³¹¸Ì¦³§ó¸Ô²Óªº¨Ò¤l¡C
¦³¤TÓ±ÔzÀɬO¨CÓ port ³£n¦³ªº¡A¤£ºÞ¥¦Ì¹ê»Ú¤W¬O¤£¬O package¡C ³o¤TÓÀɬO COMMENT¡ADESCR ©M PLIST¡A¨Ã©ñ¦b pkg ³oÓ¤l¥Ø¿ý¸Ì¡C
³oÓÀɶȥΤ@¦æ¨Ó´yz port¡C«ô¦«¤£n§â package ªº¦WºÙ¤]¼g¶i¥h(©Î¬O³nÅ骺ª©¥»)¡C ³o¥÷µù¸ÑÀ³¸Ó¥H¤j¼g¦r¥À¶}ÀY¡A¦Óµ²§À¤£¯à¦³^¤åªº¥yÂI¡C ³o¸Ì¦³¤@Ó½d¨Ò¡G
A cat chasing a mouse all over the screen
³o¬O¤@Ó¸ûªøªº±Ôz¡C ¥Î¤@¨ì´X¬qªº±Ôz²¼ä§ãnªº»¡©ú port ªº¨Æ¬O¨¬°÷ªº¡C
Note: ³o¨Ã¤£¬O¤@¥÷Ãö©ó¦p¦ó¨Ï¥Î©Î½sĶ port ªº«ü«n©Î²`¤Jªº´yz¡I¦pªGª½±µ±q README ©Î manpage §Û¹L¨Óªº¸Ü½Ð·V«¡F¦]¬°¤Ó¦h®É«á¥¦Ì¨Ã¤£¬OÓ§ãnªº»¡©ú¡A ©ÎªÌ¥¦Ìªº®æ¦¡«ÜÃøÀ³¥I(¦p manpage ¦³½Õ¾ã¹Lªº spacing)¡C ¦pªG³Q²¾´Óªº³nÅ馳¥¿¦¡ªº WWW º¶¡A¨º¤]À³¸Ó¦C¦b³oÓÀɮ׸̡C ¦b¤@Óºô¯¸ªº¦rº¥[¤W WWW: ³o¼Ë¦Û°Ê¤Æªº¤u¨ã¤~¯à¥¿½T¦a°õ¦æ¡C
«Øij¦bÀɮתº³Ì«á¼g¤W¦Û¤vªº¦W¦r¡A¦p¤U¡G
This is a port of oneko, in which a cat chases a poor mouse all over the screen. : (etc.) WWW: http://www.oneko.org/ - Satoshi asami@cs.berkeley.edu
³oÓÀɮצC¥X¤F©Ò¦³ port ¦w¸ËªºÀɮסC¦]¬° package ´N¬OÂǥѧâ©Ò¦C¥XªºÀÉ®×¥]¸Ë°_¨Ó²£¥Íªº¡A©Ò¥H³oÓÀɤS¥s°µ ``packing list''¡C¨ä¸ô®|«h¬O¬Û¹ï©ó¦w¸Ëªº«e¸m¥Ø¿ý(³q±`¬O /usr/local ©Î /usr/X11R6)¡C¦pªG¦³¥Î MANn ³oÓÅܼÆ(¥»¨Ó´N¸Ó³o»ò°µ)¡A¨º¤d¸U¤£n¦b³o¸Ì¦C¥X¥ô¦ó manpage¡C
³o¸Ì¦³Ó¤p¨Ò¤l¡G
bin/oneko lib/X11/app-defaults/Oneko lib/X11/oneko/cat1.xpm lib/X11/oneko/cat2.xpm lib/X11/oneko/mouse.xpm @dirrm lib/X11/oneko
¸Ô²Ó¸ê®Æ°Ñ¦Ò pkg_create(1) man page ¸Ìªº¥]¸Ë¦Cªí(packing list)¡C
Note: ¦Cªí¸ÌÀ³¸Ó¦C¥X©Ò¦³ªºÀɮסA¦Ó¤£¬O the name directories¡C ¦pªG port ¦b¦w¸Ë¹Lµ{¦Û¤v·s¼W¤F¥Ø¿ý¡A½T©wn¦³¥[¤W @dirrm ³o´X¦æ¡A¦]¬°n²¾°£ port ®É¤£¥i©Î¯Ê¡C
«Øij§âÀɮצWºÙ·Ó¦r¥À¶¶§Ç±Æ¦C¡C³o¼Ë¦b¤É¯Å port ®É¥i¥H§ó®e©ö¬Ý¥Xþ¸Ì§ïÅܤF¡C
¦Û¤v¤â°Ê°µ¤@Ó¥]¸Ë¦Cªí¬O«Ü¤¾ªø¥F¨ýªº¡C¦pªG port n¸Ë«Ü¦hÀɮסA¨º¦Û°Ê²£¥Í¥]¸Ë¦Cªí ¥i¯à·|¸û¬Ù®É¡C
¥unÁä¤J make makesum¡CPort ½sĶªº³W«h·|¦Û°Ê²£¥Í files/md5 ³oÓÀÉ¡C
¥ý½T©w port ªº³W«h³£¿í§g¦®·N¡A¥]¬A¥]¸Ë port¡C ³o¨Ç³£¬O±o¥ý½T»{ªºnÂI¡C
PLIST ¨S¦³¥]§t¥ô¦ó port ¨S¸ËªºªF¦è
PLIST ¥]§t port ¦w¸Ëªº©Ò¦³ªF¦è
Port ¥i¥H¥Î reinstall ªº¼Ðªº«ÂЦw¸Ë
Port ¦b¸Ñ°£¦w¸Ë«á¥i¥H²M²z°®²b
«Øijªº´ú¸Õ¶¶§Ç
make install
make package
make deinstall
pkg_add package-name
make deinstall
make reinstall
make package
½T©w port ¦b package ©M deinstall ªº¶¥¬q¨S¦³¥ô¦óĵ§i°T®§¡A ¦b¨BÆJ¤T«áÀˬd¬O§_©Ò¦³·sªº¥Ø¿ý³£³Q¥¿½Tªº§R°£¡CÁÙ¦³¡A ¸ÕµÛ¦b¨BÆJ¥|«á¨Ï¥Î³oÓ³nÅé¥H½T©w·í¥Î package ¦w¸Ë«á¥i¥H¥¿½Tªº°õ¦æ¡C
½Ð¥Î portlint ¨Ó¬Ý¬Ý port ¦³¨S¦³²Å¦X§Ú̪º«ü¥Ü¡Cportlint ³oÓµ{¦¡¤]¬O ports collection ªº¤@³¡¥÷¡C¯S§O¬O·í·Q¥Î¨ÓÀˬd Makefile ªø±o¥¿¤£¥¿½T©M package ªº©R¦W¬O§_«ê·í®É¡C
º¥ýn½T©w¤w¸g¬Ý¹L°µ»P¤£°µªº³¹¸`¡C
²{¦b§A¤@©w¹ï¦Û¤vªº port ·P¨ì¿³¾Ä§a¡A ¦A¨Ó°ß¤@n°µªº´N¬O§â¥¦©ñ¨ì¥Dnªº FreeBSD ports tree ¸Ì¥h¡A Åý¨ä¥L¤H¤]¦P¼Ë·P¨ì°ª¿³¡C§Ṳ́£»Ýn work ³oӥؿý©Î¬O pkgname.tgz ªº package¡A ©Ò¥H¬å¤F¥¦§a¡C¦A¨Ó¡A¥un§â°õ¦æ shar `find port_dir` ²£¥Íªº°T®§¤]¥]¬A¶i¨Ó¡A¥Î send-pr(1) ¥H bug ³ø§iªº§Î¦¡±H¥X(°Ñ¦Ò bug ³ø§i©M¤@¯ë»¡©ú¥H±o¨ì§ó¦h¦³Ãö send-pr(1) ªº¸ê°T)¡C ¦pªG port ¨SÀ£ÁY«e¤j©ó 20KB¡A ¨º´Nn¦b§â¥¦¥]¬A¨ì bug ³ø§i«e¥ýÀ£¦¨ tar ªºÀɮקΦ¡¨Ã¥B°õ¦æ uuencode(1)(§Y¨Ï bug ³ø§i¤ñ 20KB ¤p¤]¬O¥i¥H§â¥¦À£°_¨Ó¦A uuencoded¡A¤£¹L¨Ã¤£¹ªÀy)¡Cn½T©w§â bug ³ø§i¤ÀÃþ¬° ports ¦Ó¥Bµ¥¯Å¬° change-request¡C (¤d¸U¤£n¼Ð°O¬°¾÷±K³ø§i¡I)
¦A»¡¤@¦¸¡A¤£n¥]¬Aì©lÀÉ¡A¥Ø¿ý work¡A©M¥Î make package °µ¥X¨Óªº package¡C
Note: ¥H«e«Øij»¡§â·s port ¤W¶Ç¨ì ftp ¯¸ (ftp.FreeBSD.org)¡C ¤£¹L¦]¬° incoming/ ³oӥؿýªºÅª¨úÅv³QÃö±¼¡A©Ò¥H³oÓ¤èªk¤w¸g¤£ºÞ¥Î¤F¡C ³o¬O¦]¬°¦³¤Ó¦hªº«Dªk³nÅé¥X²{¦b¸Ì±ªºÃö«Y¡C
§ÚÌ·|À˵ø³oÓ port ¨Ã§â¥¦©ñ¶i ports tree¡AY¥²nªº¸Ü·|§â¥¦ÂkÁÙ¡C §Aªº¦W¦r¤]·|¥X²{¦b FreeBSD ¨Ï¥ÎªÌ¤â¥U``ÃB¥~ªº FreeBSD °^ÄmªÌ''ªº¦Cªí©M¨ä¥¦Àɮ׸̡C«Ó§a¡H¡I:-)
¦n§a¡C³o¨S¦³¨º»ò²³æ¡A¦Ó¥B³oÓ port »Ýn¤@¨Çקï¤~¯à¤u§@¡C ¦b³o³¹¸Ì§Ú̥αN port ªº½d¨Ò¤@¨B¨Bªº¸ÑÄÀ¦p¦óק復¤~¯à¥Î¡C
º¥ý¡A³o¬O·í¦b port ªº¥Ø¿ý¤UÁä¤J make «áªºµ²ªGªº¶¶§Ç¡A¦Ó¥B§A¥i¥H§â bsd.port.mk ¶}¦b¥t¤@Óµøµ¡¡A©M³o¥÷¤å¥ó°t¦XµÛ¬Ý¡A³o¼Ë¤ñ¸û¦nÀ´¡C
¤£¥Î¾á¤ß¬Ý¤£À´ bsd.port.mk ¦b°µ¤°»ò¡A ¤]¨S«Ü¦h¤HÀ´ ...:->
fetch ³oӼЪº¥¿¦b°õ¦æ¡C fetch ³oӼЪºt³d½T©w tarball ¦³¦b DISTDIR ¸Ì¡C¦pªG fetch ¦b DISTDIR §ä¤£¨ì¥¦nªºÀɮסA¥¦·|¥h Makefile ¸Ì©w¸qªº MASTER_SITES ¸Ìªº URL §ä¡A ¥¿¦p¦P§ÚÌ¥Dnªº ftp ¯¸ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ ¸Ì©ñµÛ»{¥iªºÀÉ®×°µ¬°³Æ¥÷¡C°²¦p©Ò½Ð¨Dªº¯¸¥i¥H¦bºô¸ô¤Wª½±µ¦s¨ú¡A ¥¦·|¸ÕµÛ¥Î FETCH ¥h§ì«ü¦Wªºµo¦æª©¥»¡C ¦pªG¦¨¥\´N·|§âÀɮצs¦b DISTDIR ¥H«KÄ~Äò¶i¦æ©M¦A§Q¥Î¡C
extract ³oӼЪº¥¿¦b°õ¦æ¡C ¥¦·|§ä©ñ¦b DISTDIR ¸Ìªºµo¦æª©¥»ªºÀÉ®× (¤@¯ë¬O gzip ªº tarball) ¨Ã§â¥¦¸Ñ¨ì WRKDIR ©Ò¼gªº¼È®É¥Ø¿ý¤U(¹w³]¬O work)¡C
patch ³oӼЪº¥¿¦b°õ¦æ¡Cº¥ý¡A ¬I¦æ¥ô¦ó©w¸q¦b PATCHFILES ¸Ìªº patch¡C ¦A¨Ó¡A·Ó¦r¥À¶¶§Ç¬I¦æ¥ô¦ó¦b PATCHDIR (¹w³]¬O¤l¥Ø¿ý patches)¡C
configure ³oӼЪº¥¿¦b°õ¦æ¡C ¥¦¥i¥H±q«Ü¦h¤£¤@¼Ëªº¨Æ¸Ì¬D¥ô¦ó¤@Ó¨Ó°µ¡C
¦pªG¦s¦b scripts/configure¡A ´N°õ¦æ¥¦¡C
¦pªG³]©w¤F HAS_CONFIGURE ©Î GNU_CONFIGURE¡A ´N°õ¦æ WRKSRC/configure¡C
¦pªG³]©w¤F USE_IMAKE¡A °õ¦æ XMKMF(¹w³]È¡G xmkmf -a)¡C
build ¥¿¦b°õ¦æ¡C ³oÓt³d©¹¤U©µ¦ù¶i¨ì port ¨p¤Hªº¤u§@¥Ø¿ý (WRKSRC)¨Ã¶}©l½sĶ¡C ¦pªG³]©w¤F USE_GMAKE¡A ´N·|¨Ï¥Î GNU make¡A §_«h´N·|¥Î¨t²Îªº make¡C
¤W±³o¨Ç¬O¹w³]ªº°Ê§@¡C¤]¥i¥H©w¸qÃB¥~ªº¼Ðªº pre-something ©Î post-something¡A ©Î¬O§â scripts ´«³o³o¨Ç¦W¦r©ñ¨ì¤l¥Ø¿ý scripts ¸Ì¡A³o¼Ë¥¦Ì´N·|¦b¹w³]ªº°Ê°µ§¹¦¨«e©Î§¹¦¨«á°õ¦æ¡C
¨Ò¦p¦³¤@Ó¥s°µ post-extractªº¼Ðªº©w¸q¦b Makefile ¸Ì¡A©M¤@Ó¥s°µ pre-build ªºÀɮשñ¦b¤l¥Ø¿ý scripts ¸Ì¡A¨º»ò post-extract ³oӼЪº·|¦b³W©wªº¸Ñ¶} (extraction)°Ê§@§¹¦¨«á³Q©I¥s¡A¦Ó pre-build ³oÓ script ·|¦b¹w³]ªº½sĶ³W«h«e°õ¦æ¡C°²¦p°Ê§@°÷²³æªº¸Ü¡A «Øij¥Î Makefile ¸Ìªº¼Ðªº¡A ¦]¬°³o¼Ë§O¤H¤ñ¸û®e©öµo²{³oÓ port »Ýnþ¨Ç«D¹w³]ªº°Ê§@¡C
³o¨Ç¹w³]ªº°Ê§@¬O¥Ñ¦b bsd.port.mk ªº¼Ðªº do-something ¨Ó°õ¦æ¡C¨Ò¦p¡A¥Î¨Ó¸Ñ¶}¤@Ó port ªº«ü¥O¼g¦b do-extract ³oӼЪº¸Ì¡C ¦pªG¬Ý³oÓ¹w³]ªº¼Ðªº¤£°ª¿³ªº¸Ü¡A¥i¥H¦b Makefile ¸Ì«·s©w¸q do-something ¨Óק復¡C
Note: ``¥Dnªº''¼Ðªº(¦p extract¡Aconfigure µ¥µ¥)¥u¬O¥Î¨Ó½T©w¨ì³o¤§«eªº¶¥¬q¤w¸g§¹¦¨¡A¨Ã©I¥s¯u¥¿ªº¼Ðªº©Î script¡A ¦Ó¥B§Ų́èS¦³¥´ºâ§ïÅܳo¨Ç¼Ðªº¡C°²¦pnקï¸Ñ¶}³oӰʧ@¡A½Ðקï do-extract¡Aµ´¤£n¸I extract¡I
²{¦bÀ³¸Óª¾¹D·íÁä¤J make ·|µo¥Í¤°»ò¤F§a¡A Åý§ÚÌÄ~Äò¬Ý¬Ý³Ð³y¤@Ó§¹¬üªº port ©Ò«Øijªº¨BÆJ§a¡C
(³q±`)¨ú±oÀ£ÁY§Î¦¡ªºì©l½Xªº tarball (foo.tar.gz ©Î foo.tar.Z) ¨Ã§â¥¦½Æ»s¨ì DISTDIR¡C ¦³¿ìªkªº¸Ü´N³£¥Î¥D¬yªºµ{¦¡½X¡C
¦pªG§ä¤£¨ì³s½uª¬ªp¨}¦nªº ftp/http ºô¯¸¡A ©Î¬O¥u§ä±o¨ì®æ¦¡¤£¼Ð·Çªº¯¸¡A ¥i¥H§â¥¦½Æ»s¤@¥÷©ñ¦b¥i«H¥ôªº ftp ¯¸©Î¬O¦Û¤v±±¨îªº http ¦øªA¾¹ (¨Ò¦p¦Û¤vºô¶)¡C½T©w©Ò³]©wªº MASTER_SITES ¯à¤ÏÀ³¨ì©Ò¿ï¾Üªººô¯¸¡C
¦pªG§ä¤£¨ì¤è«K©Î¥i«H¿àªº¦a¤è©ñ distfile (¦pªG§A¬O FreeBSD committer¡A¥un©ñ¦b¦Û¤v¦b freefall ªº public_html/ ¥Ø¿ý¸Ì§Y¥i)¡A ³Ì«á¤â¬q´N¬O§ÚÌ·|§â¥¦``¦¬ÂÃ''¦b ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/LOCAL_PORTS/¡C ½Ð°Ñ¦Ò MASTER_SITE_LOCAL ©Ò¦bªº¦ì¸m¡C MASTER_SITE_LOCAL¡C¦pªG¤£½T©wn«ç»ò°µ¨ì¸Ü¡A ±H«Ê«H¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org> §a¡C
¦pªG port ªº distfile ¸g±`¨S²z¥Ñªº§ï¨Ó§ï¥hªº¸Ü¡A ¥i¥H¦Ò¼{§â distfile ©ñ¦b§Aªººô¶¤W¨Ã§â¦ì§}¦C¬°²Ä¤@Ó MASTER_SITES¡C³o¼Ë¥i¥HÁקKÅý¨Ï¥ÎªÌ±o¨ì ``checksum mismatch'' ªº¿ù»~°T®§¡A ¤]Åý§ÚÌ ftp ¯¸ªº maintainers »´ÃPÂI¡C¦pªG³oÓ port ¥u¦³¤@Ó¥Dnªº¯¸¡A«Øij§A¦¬Âä@¥÷³Æ¥÷¦b¦Û¤vªº¯¸¨Ã¦C¬°²Ä¤GÓ MASTER_SITES¡C
¦pªG³oÓ port »Ýn¤@¨ÇÃB¥~ªº `patches' ¥B¥i¥H¦bºô¸ô¤W¨ú±o¡A ¤]§â¥¦Ì§ì¤U¨Ó©ñ¨ì DISTDIR §a¡C §O¾á¤ß¥¦ªù¸ò¥Dnªºµ{¦¡½Xªº tarball ¨Ó·½¤£¦P¡A §Ú̦³¿ìªk³B²z(¬Ý¤U± PATCHFILES ªº´yz§a)¡C
§â tarball ¸Ñ¨ì¤@Ó¨p¤Hªº¥Ø¿ý¤U¦A°µ¥ô¦ó¥²nªº§ïÅÜ ¨Ï±o port ¥i¥H¦b current ª©¥»ªº FreeBSD ¥¿½Tªº½sĶ¡C ¥J²Ó¦a°lÂÜ©Ò¦³¹Lµ{¡A³o¼Ë¤~¯à²µu¦a§â¹Lµ{¦Û°Ê¤Æ¡C ·í port §¹¦¨®É¡A©Ò¦³ªF¦è¥]¬A¹ïÀɮתº§R°£¡B¼W¥[¡A ©Î¬Oקﳣn¯àÂǥѤ@Ӧ۰ʤƪº script ©Î¬O patch ÀɨӰõ¦æ¡C
¦pªG¸Ó port »Ýn¨Ï¥ÎªÌ°µ«nªº¤¬°Ê/©w»s¤~¯à½sĶ©Î¦w¸Ë¡A ¨º´N¸Ó¬Ý¬Ý Larry Wall's ªº¸g¨å§@¤§¤@ Configure scripts¡A ¥i¯àªº¸Ü¨Ã¦Û¤v°µ¨Ç¬Û¦üªº¨Æ¡C·s port ¦¬¶°ªº¥Øªº¦bÅý³Ì²×ªº¨Ï¥ÎªÌ ¥Î³Ì¤ÖªºªÅ¶¡ºÉ¥i¯à¦a°µ¨ì ``plug-and-play''¡C
Note: °£«D¦³©ú¥Õªº«Å§i¡A§_«h©Ò¦³³Ð³y©M°^Ämµ¹ FreeBSD ports ¦¬¶°ªº patch ÀÉ¡Bscripts©M¨ä¥¦ªºÀɮ׳£¨ü¨ì¼Ð·Ç BSD ª©Åv±ø¬ùªº«OÅ@¡C
¦b·Ç³Æ port ®É¡A¤w¸g³Q¼W¥[©Îק諸ÀÉ®×¥i¥H¥Î¤@Ó»¼°jªº diff ¾ã²z°_¨Ó¥H¬°¤F¤§«á¥Î¨Ó patch¡C©Òn´£¨Ñªº¨C¤@²Õ patch ³£À³¸Ó¦¬¶°¦¨¤@Ó¥s°µ patch-xx ªºÀɮסAxx ªí¥Ü©Òn´£¨Ñªº patch ªº¶¶§Ç -- ¥H¦r¥À¶¶§Ç¡A¦]¦¹ aa ±Æ²Ä¤@Ó¡A¦A¨Ó¬O ab µ¥µ¥¡C ³o¨ÇÀÉ®×À³¸Ó¦s©ñ¦b PATCHDIR ³o¼Ë¤~¯à³Q¦Û°Ê´£¨Ñ¡C©Ò¦³ªº patch À³¸Ó¬Û¹ï©ó WRKSRC (³q±`¬O§â tarball ¸Ñ¶}ªº¥Ø¿ý¡A½sĶ¤]¦b¨º¸Ì§¹¦¨)¡C nÅý×¥¿©M¤É¯Å®e©öªº¸Ü¡AÀ³¸ÓÁקKÅý¶W¹L¤@Ó patch ×¥¿¦P¤@ÓÀÉ®× (¨Ò¦p patch-aa ©M patch-ab ³£×¥¿ WRKSRC/foobar.c)¡C
§â¥ô¦óªþ¥[ªº customization ©R¥O¥]§t¨ì configure script ¸Ì¨Ã¦s¦b¤l¥Ø¿ý scripts ¸Ì¡C ¥¿¦p¦P«e±´£¹Lªº¡A¤]¥i¥HÂÇ¥Ñ Makefile ¸Ìªº¼Ðªº©M/©Î¥H pre-configure ©Î post-configure ©R¦Wªº script ¨Ó°µ¨ì³o¥ó¨Æ¡C
¦pªG port »Ýn¨Ï¥ÎªÌ¿é¤J¥H½sĶ¡Aconfiguration¡A©Î¦w¸Ë¡A¨º´N¦b Makefile ¸Ì³]©w IS_INTERACTIVE¡C ³o¼Ë·|¤¹³\³]©wÀô¹ÒÅÜ¼Æ BATCH ªº¨Ï¥ÎªÌ¦b``¹ý©]½sĶ''®É¸õ¹L³oÓ port (¦pªG¨Ï¥ÎªÌ³]¤FÅÜ¼Æ INTERACTIVE¡A ¨º´N¥u¦³»Ýn¤¬°Êªºµ{¦¡·|³Q½sĶ)¡C
¦P¼Ë¦a¡A°²¦p¦³¦X²zªº¹w³]µª®×¡A«h«Øij·íÅÜ¼Æ PACKAGE_BUILDING ³]©w®ÉÃö±¼¨ºÓ¤¬°Êªº script¡C ³o¼Ë«K¤¹³\§Ú̬°¥úºÐ©M ftp ½sĶ packages¡C
Configuring the Makefile ¬Û·í²³æ¡A ¦A¦¸«Øij§A¦b¶}©l«e¬Ý¬Ý²{¦³ªº¨Ò¤l¡C ¨Ï¥Î¤â¥U¸Ì¤]¦³¤@Ó Makefile ªº¼Ë«~¡A©Ò¥H¬Ý¬Ý¨Ã¸òÀHµÛ¼Ë«~¸ÌÅܼƩM³¹¸`ªº¶¶§Ç¡A Åý§Aªº port ¹ï§O¤H¨Ó»¡§ó¨ã¥iŪ©Ê¡C
²{¦b¡A¦b³]p·sªº Makefile ®É¨Ì§Ç¦Ò¼{¤U±ªº°ÝÃD§a¡G
¥¦¦³¥H¼Ð·Ç gzip ªº tarball §Î¦¡©ñ¦b DISTDIR ¶Ü¡H¦pªG¦³¡A¸õ¨ì¤U¤@¨B§a¡C¦pªG¨S¦³¡A À˵ø port µo¦æªºÀɮ׬OþºØ¬P²yªº®æ¦¡¨Ó¨M©wn¥Î EXTRACT_CMD¡A EXTRACT_BEFORE_ARGS¡A EXTRACT_AFTER_ARGS¡A EXTRACT_SUFX¡A©Î DISTFILES ¤¤ªº¥ô¤@ÅܼơC(·í tarball ³Q¼Ð·ÇªºÀ£ÁYµ{¦¡¦Ó¤£¬O gzip À£ÁY®É¡A ³Ì±`¨£ªº®æ¦¡¬O EXTRACT_SUFX=.tar.Z¡C)
¦b³ÌÁVªº±¡ªp¤U¡A¥i¥H²³æªº³Ð³y¤@Ó¦Û¤vªº do-extract ¼Ðªº¨Ó»\¹L¹w³]ªº¡A ÁöµM³o«Ü¤Ö¨£¡A¦ý¦pªG¥X²{´N¥u±o³o»ò°µ¤F¡C
§â DISTNAME ³]¬° port ªº¦WºÙ¡C ¹w³]ªº³W©w¬O§Æ±æµo¦æª©¥»ªºÀɮצCªí¥H DISTNAMEEXTRACT_SUFX ªº§Î¦¡©R¦W¡A¹ï¤@Ó¥¿±`ªº tarball ¦Ó¨¥¡A ¤@Ó¦W¬° DISTNAME=foozolix-1.0 ªº port¡A¨äÀɮצCªíÀ³¸Óªø±o¹³ foozolix-1.0.tar.gz¡C
¹w³]ªº³W«h¤]´Á±æ§â tarball(s) ¸Ñ¨ì¤l¥Ø¿ý work/DISTNAME ¤U¡A ¦p work/foozolix-1.0/¡C
·íµM³o¨Ç³£¥i¥H³Q±À½¡F¥¦¥u¬O¥Nªí¤F¤j³¡¥÷¬Ù®Éªº¦@¦P¹w³]È¡C ¹ï¤@Ó»Ýn¦hÓµo¦æª©¥»ªºÀɮתº port¡A¥un©ú½Tªº³]©w DISTFILES§Y¥i¡C¦pªG¥u¦³¤@¤p²Õ DISTFILES ¬O¹ê»Ú¥i¸Ñ¶}ªºÀɮסA ¨º´N§â¥¦Ì¼g¦b EXTRACT_ONLY¡A ³o¼Ë·ín¸Ñ¶}®É«K·|¨ú¥N DISTFILES ªº¦Cªí¡A ¦Ó¨ä¥¦ªºÀɮ׫h·|¯d¦b DISTDIR ¥H«á¦A¥Î¡C
¦pªG DISTNAME ¤£²Å¦X ¦nªº package ¦WºÙªº«ü«n¡A ¨º´N³]©w PKGNAME ³oÓÅܼƨӨúÓ¦n¦W¦r§a¡C nª¾¹D§ó¦h²Ó¸`´N¬Ý¤W±¨ºÓ«ü«n§a¡C
·í¤@Ó package °µ¦n®É¡A¥¦·|©ñ¦b /usr/ports/packages/All ¤U¨Ã³sµ²¨ì /usr/ports/packages ¤Uªº¤@өΦhÓ¤l¥Ø¿ý¡C³o¨Ç¤l¥Ø¿ýªº¦WºÙ¦bÅÜ¼Æ CATEGORIES ¸Ì¦³¸Ô²Ó»¡©ú¡C ³o¬O¥´ºâÅý¨Ï¥ÎªÌ¦b ftp ¯¸©Î¥úºÐ¤W¶O¤O´ç¹L¤@°ï package ¨Ó§äªF¦è®É®e©ö¤@ÂI¡C½Ð¬Ý¤@¤U²{¦³ªº¤ÀÃþ(category)¨Ã¿ï¤@ӳ̾A¦X§Aªº port ªº¡C
³o¤]¨M©w¤F port ·|³Q¦¬¤J¨ì port tree ªº¦ì¸m¡C ¦pªG¦b³oÅܼƸ̩ñ¶i¤F¤Ó¦hªº¤ÀÃþ¡A±N°²³] port ªºÀÉ®×·|³Q©ñ¦b²Ä¤@Ó¤ÀÃþªº¤l¥Ø¿ý¸Ì¡C¤ÀÃþ³oÓ³¹¸`¸Ì¦³§ó¦hÃö©ó¦p¦ó ¬D¿ï¥¿½Tªº¤ÀÃþªº°Q½×¡C
¦pªG port ¯uªº¤£ÄÝ©ó²{¦³ªº¥ô¦ó¤ÀÃþ¡A´N¦Û¤v³Ð³y¤@Ó§a¡C ¦b³o±¡ªp¤U½Ð±H«Ê«H¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org> ´£Ä³¤@Ó·sªº¤ÀÃþ¡C
Note: ÀˬdºØÃþ¦WºÙ®É¤£·|¦³¥ô¦ó¿ù»~¡C¦pªG¥´¿ùºØÃþ¦WºÙ¡Amake package ·|«Ü¼Ö·NÀ°§A¥Í¥X¤@Ó·s¥Ø¿ý¡A ©Ò¥Hn¤p¤ßÂI¡I
§â ftp/http-URL ¸Ì«ü¥X¨Ó·½ tarball ©Ò¦b¥Ø¿ýªº³¡¥÷°O¿ý¦b MASTER_SITES¸Ì¡C §O§Ñ¤F¸ò¦b«á±ªº±×½u (/)¡I
¦pªG¦b¨t²Î¸Ì§ä¤£¨ìµo¦æª©¥»ªºÀɮתº¸Ü¡Amake ³oÓ¥¨¶°«ü¥O¦b¥Î FETCH §ìÀɮɷ|¸ÕµÛ¥Î¨ì³o¥÷²M³æ¡C
«Øij¦b¦Cªí¸Ì©ñ¦h¤@ÂI¯¸¡A³Ì¦n¨Ó¦Û¦U¬w¡C ³o¼Ë·|ÁקK¤j½d³òªººô¸ô°ÝÃD¡A§Ú̬ƦÜpµe¼W¥[¥i¦Û°Ê¨M©w³Ìªñªº ¥D¯¸¨Ã±q¨º¸Ì§ì¨úªº¤ä´©¡I
¦pªG¨Ó·½ªº tarball ¬O¤U±´XÓ´¶¹MªºÀÉ®×®w¡G X-contrib¡AGNU¡APerl CPAN¡ATeX CTAN¡A©Î Linux Sunsite¡A ¥i¥H§Q¥Î MASTER_SITE_XCONTRIB¡A MASTER_SITE_GNU¡A MASTER_SITE_PERL_CPAN¡A MASTER_SITE_TEX_CTAN¡A©M MASTER_SITE_SUNSITE ¨Ó°µ°Ñ¦Ò¡C¥un§â MASTER_SITE_SUBDIR ³]¨ìÀÉ®×®w¸Ìªº¸ô®|¡C ³o¦³Ó¨Ò¤l¡G
MASTER_SITES= ${MASTER_SITE_XCONTRIB} MASTER_SITE_SUBDIR= applications
¨Ï¥ÎªÌ¤]¥i¦b /etc/make.conf ³]©wÅÜ¼Æ MASTER_SITE_* ¨Ó»\¹L§Ú̪º¿ï¾Ü¡A µM«á¥Î¥L̳ßÅwªº mirror ¯¸¨Ó¥N´À¡C
¦pªG§Aªº port »Ýn¤@¨ÇÃB¥~ªº patch¡A¦Ó¤S¥i¥H¥Ñ ftp ©Î http ¨ú±o¡A¨º´N§â PATCHFILES ³]¬°ÀɮצWºÙ¡A ¦Ó PATCH_SITES ¬°¥]§t¸ÓÀɮתº¥Ø¿ýªº URL (®æ¦¡¸ò MASTER_SITES ¤@¼Ë)¡C
°²¦p¦]¬° patch ¥]§t¤@¨ÇÃB¥~ªº¸ô®|¡A¨Ï±o patch ¨Ã¤£¬Û¹ï©óµ{¦¡½Xªº¾ðª¬µ²ºcªº³Ì¤W¼h(¦p WRKSRC)¡A ¨º´N¾A·í¦a³]©w PATCH_DIST_STRIP¡CÁ|Ó¨Ò¡A °²¦p patch ¸Ì©Ò¦³ªº¸ô®|«e±³£¦h¥[¤F foozolix-1.0/¡A¨º´N³]¦¨ PATCH_DIST_STRIP=-p1¡C
§O¾á¤ß patch ³QÀ£ÁY°_¨Ó¡A¦pªGÀɮצWºÙ¬O¥H .gz ©Î .Z µ²§À¡A ¨º¥¦Ì·|¦Û°Ê³Q¸ÑÀ£¡C
¦pªG patch ¬O¸ò¨ä¥¦ÀɮסA¦p¤å¥ó¡A¤@°_¥H gzip §Î¦¡ªº tarball µo¦æ¡A¨º´N¤£¯à¥Î PATCHFILES¡C ¦b³o±¡§Î¤U¡A´N§â patch tarball ªº¦WºÙ©M¦ì¸m¥[¶i DISTFILES ©M MASTER_SITES¡C µM«á¡A±q pre-patch ªº¼Ðªº´£¨Ñ patch¡A ¤£½×¬O±q¨ºÓ¼Ðªº°õ¦æ¡A©Î¬O§â path ½Æ»s¨ì¥Ø¿ý PATCHDIR ¸Ì¨ÃºÙ¤§¬° patch-xx¡C
Note: nª`·N tarball ¤w¸g¸òµÛ¥¿±`ªºµ{¦¡½X³Q¸Ñ¶}¤F¡A ©Ò¥H¦pªG¬O¥H gzip ©Î compress À£°_¨Óªº tarball ¤]¤£¥²n¦A¸Ñ¶}¡C ¦pªG§A§â¥¦¸Ñ¶}¤F¡A¯S§O¤p¤ß¤£n§â¤w¸g¦s¦b¥Ø¿ý¸ÌªºªF¦è§ï¼g±¼¡C ¦P¼Ë¤]§O§Ñ¤F¦b pre-clean ªº¼Ðªº¸Ì¥[Ó©R¥O¨Ó²¾°£½Æ»sªº patch¡C
¦b³o¯d¤U§Aªº¶l¥ó¦a§}§a¡C«ô¦« :-)
nª¾¹D¦³Ãö maintainer t³d¨Æ¶µ¸Ô²Óªº´yzªº¸Ü¡A °Ñ¦Ò MAINTAINER on Makefiles ªº³¹¸`¡C
«Ü¦h port ³£¨Ì¿à¨ä¥¦ªº port¡C¦³¤ÓÅܼƥi¥Î¨Ó½T©w©Ò¦³»Ýnªº ³¡¥÷³£¤w¸g¦b¨Ï¥ÎªÌªº¾÷¾¹¸Ì¤F¡C¦b¤@¯ë±¡§Î¤UÁÙ¦³¤@¨Ç¹w¥ý¤ä´©ªº dependency ÅܼơA¥[¤W¤F¦h¤@¨ÇªF¦è¨Ó±±¨î dependency ªºªí²{¡C
³oÓÅܼƸÔz¤F¸Ó port ©Ò¨Ì¿àªº¦@¨É¨ç¦¡¡C ¥¦¬OÓ¦h²Õ lib:dir[:target] ªº¦Cªí¡Alib ¬O¦@¨É¨ç¦¡ªº¦WºÙ¡A dir ¬O¸U¤@¨t²Î¸Ì¨S¦³®É¥i¥Î¨Ó§ä¨ì¥¦ªº¥Ø¿ý¡A¦Ó target ¬O¦b¨º¥Ø¿ý¤U©Ò©I¥sªº¼Ðªº¡C ¨Ò¦p
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg:install·|Àˬd¥Dª©¥»¬° 9 ªº¦@¨É¨ç¦¡ jpeg¡A¥B°²¦p§ä¤£¨ìªº¸Ü¡A «K·|©¹¤U¨ì ports tree ªº¤l¥Ø¿ý graphics/jpeg «Ø¥ß¨Ã¦w¸Ë¥¦¡C°²¦p target ©M DEPENDS_TARGET ¤@¼Ëªº¸Ü«h¥i¬Ù²¤(¹w³]¬O install)¡C
Note: lib ªº³¡¥÷¬O¤@Ónµ¹ ldconfig -r | grep -wF ªº°Ñ¼Æ¡C ¦b³oÓÅܼƸ̤£¥i¦³¥¿³Wªí¥Ü¦¡(regular expression)¡C
Denpendency ·|³QÀˬd¨â¦¸¡A¤@¦¸¬O¦b extract ªº¼Ðªº¸Ì¡A¤@¦¸¬O¦b install ªº¼Ðªº¡C ¦P¼Ë¦a¡Adependency ªº¦WºÙ¤]·|©ñ¨ì package ¸Ì³o¼Ë·í¨Ï¥ÎªÌ¨t²Î¸Ì¨S¦³®É pkg_add «K·|¦Û°Ê§â¥¦¸Ë¤W¡C
³oÓÅܼƸÔz¤F³oÓ port °õ¦æ®É©Ò¨Ì¿àªº¥i°õ¦æÀÉ©ÎÀɮסC ¥¦¬OÓ¦h²Õ path:dir[:target] ªº¦Cªí¡A path ¬O°õ¦æÀÉ©ÎÀɮתº¦WºÙ¡A dir ¬O¸U¤@¨t²Î¸Ì¨S¦³®É¥i¥Î¨Ó§ä¨ì¥¦ªº¥Ø¿ý¡A ¦Ó target ¬O¦b¸Ó¥Ø¿ý©Ò©I¥sªº¼Ðªº¡C ¦pªG path ¥Hµu±×½u¶}ÀY (/)¡A¨º¥¦·|³Q¬Ý°µ¤@ÓÀɮרåΠtest -e ³oÓ©R¥O¨Ó´ú¸Õ¨ä¬O§_¦s¦b¡F §_«h´N»{¬°¬O¥i°õ¦æÀɨåΠwhich -s ¨Ó¨M©wµ{¦¡¬O§_¦b¨Ï¥ÎªÌªº·j´M¸ô®|¸Ì¡C
¨Ò¦p¡A
RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \ wish8.0:${PORTSDIR}/x11-toolkits/tk80
·|Àˬd /usr/local/etc/innd ³oÓÀɮשΥؿý¬O§_¦s¦b¡A¦pªG§ä¤£¨ì´N·|¥h port tree ªº¤l¥Ø¿ý news/inn §â¥¦«Ø¥ß¨Ã¸Ë¦n¡C ¥¦¤]·|¬Ý¦b·j´M¸ô®|¸Ì¬O§_¦³Ó¥s wish8.0 ªº¥i°õ¦æÀÉ¡A¨S§ä¨ìªº¸Ü´N¨ì port tree ªº¤l¥Ø¿ý x11-toolkits/tk80 ¸Ì«Ø¥ß¨Ã¦w¸Ë¦n¡C
Note: ¦b³o¸Ì innd ¹ê»Ú¤W¬OÓ¥i°õ¦æÀÉ¡F ¦pªG¤@Ó¥i°õ¦æÀÉ©Ò¦b¥Ø¿ý¨Ã¤£¬O¤@¯ë¨Ï¥ÎªÌªº·j´M¸ô®|¡A ¨º´NÀ³¸Ó¥Î§¹¾ãªº¸ô®|ªí¥Ü¡C
Dependency ·|¦b install ªº¼Ðªº¸ÌÀˬd¡C¦P¼Ë¦a¡Adependency ªº¦WºÙ¤]n©ñ¨ì package ¸Ì¡A ³o¼Ë·í¨Ï¥ÎªÌªº¨t²Î¨S¦³®É pkg_add ³oÓ©R¥O«K·|¦Û°Ê¦w¸Ë¥¦¡C¦pªG target ªº³¡¥÷©M DEPENDS_TARGET ¬Û¦P«h¥i¬Ù²¤¡C
³oÓÅܼƸÔz¤F³oÓ port ½sĶ®É»Ýnªº°õ¦æÀÉ©ÎÀɮסC ´N¸ò RUN_DEPENDS ¤@¼Ë¡A¥¦¬O¥Ñ¦h²Õ path:dir[:target] ºc¦¨ªº¦Cªí¡C ¨Ò¦p
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip·|Àˬd¬O§_¦³Ó°õ¦æÀÉ unzip¡A ¨S¦³ªº¸Ü´N¨ì port tree ªº¤l¥Ø¿ý archivers/unzip ¤U«Ø¥ß¨Ã¸Ë¥¦¡C
Note: ¦b³o¸Ì``«Ø¥ß''«ü±o¬O±q¸ÑÀ£¨ì½sĶ¾ãÓ¹Lµ{¡C Dependency ·|¦b extract ªº¼Ðªº¸ÌÀˬd¡C °²¦p target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¥H¬Ù²¤¡C
³oÓÅܼƸÔz¦b¨ú±o¸Ó port ®É©Ò»Ýªº°õ¦æÀÉ©ÎÀɮסC ¸ò«e¨âÓ¤@¼Ë¡A¥¦¤]¬O¥Ñ¦h²Õ path:dir[:target] ²Õ¦¨ªº¦Cªí¡C ¨Ò¦p
FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2·|Àˬd ncftp2 ³oÓ°õ¦æÀÉ¡A¨S¦³ªº¸Ü´N¨ì port tree ¤Uªº¤l¥Ø¿ý net/ncftp2 «Ø¥ß¨Ã¦w¸Ë¥¦¡C
Dependency ·|¦b fetch ªº¼Ðªº¸ÌÀˬd¡C°²¦p target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¬Ù²¤¡C
¦pªG¦³Ó dependency ¤£ÄÝ©ó¤W±¥|ºØ¤§¤@¡A©Î¬O§Aªº port »Ýn¨ä¥¦ port ¸Ñ¶}ªºµ{¦¡½X¤~¯à¦w¸Ë¡A¨º´N¥Î³oÓÅܼƧa¡C ³o¬O¤@¥÷ dir[:target] ªº¦Cªí¡A ¤£¹³«e±¥|Ó¡A³o¸Ì¨S¤°»ò¦nÀˬdªº¡C ¦pªG target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¬Ù²¤¡C
¦pªG port »Ýn¦³¦w¸Ë X Window System ¤~¯à¦w¸Ë¡A ½Ð©w¸q USE_XLIB=yes(¥¦³Q¥]§t¦b USE_IMAKE¸Ì)¡C°²¦p port »Ýn GNU make ¥H¨ú¥N BSD make ¡A½Ð©w¸q USE_GMAKE=yes¡C°²¦p port »Ýn°õ¦æ¨ì GNU autoconf¡A½Ð©w¸q USE_AUTOCONF=yes¡C°²¦p port n¥Î³Ì·sªº qt toolkit¡A½Ð©w¸q USE_QT=yes¡C ¦pªG port »Ýn²Ä¤ª©ªº perl µ{¦¡»y¨¥¡A¨º´N¥Î USE_PERL5=yes¡C(³Ì«á¤@ӳ̫n¡A ¦]¬°¤@¨Çª©¥»ªº FreeBSD §â perl5 §Ë¬°¶§¬Kª©ªº¤@³¡¥÷¡A¦Ó¨ä¥¦ªº¨S¦³¡C)
¦b«e±´£¹L¡A·í»Ýn dependency ®É·|©I¥sªº¹w³]¼Ðªº¬O DEPENDS_TARGET¡C¹w³]ȬO install¡C³o¬OӨϥΪ̪ºÅܼơF¥¦±q¥¼¦b port ªº Makefile ¸Ì©w¸q¡C¦pªG port »Ýn¯S§Oªº¤èªk¨Ó³B¸Ì dependency¡A¥Î *_DEPENDS ¸Ì :target ªº³¡¥÷¦Ó¤£n«·s©w¸q DEPENDS_TARGET¡C
·íÁä¤J make clean«á¡A ¥¦ªº dependency ¤]·|³Q¦Û°Ê²M°£¡C¦pªG¤£·Q²M°£ªº¸Ü¡A ¥i¥H³]©wÀô¹ÒÅÜ¼Æ NOCLEANDEPENDS¡C
nµL±ø¥ó¦a¨Ì¿à¨ä¥¦ port¡A·ÓºD¨Ò¬O¥H¦r¦ê nonexistent ¬° BUILD_DEPENDS ©Î RUN_DEPENDS ªº²Ä¤@ÓÄæ¦ì¡C¥u¦³·í»Ýn¨ä¥¦ port ªºµ{¦¡½X®É¤~³o»ò°µ¡C¤]¥i¥H¸g±`¥Î³oӼЪº¨Ó¬Ù¤U½sĶªº®É¶¡¡C ¨Ò¦p
BUILD_DEPENDS= /nonexistent:${PORTSDIR}/graphics/jpeg:extract¨C¦¸³£·|¨ì JPEG ³oÓ port ¸Ì¨Ã¸Ñ¶}¥¦¡C
°£«D¨S¦³§Oªº¿ìªk¥i¥H§¹¦¨©Ò·Qnªí²{ªº¡A§_«h§O¥Î DEPENDS¡C¥¦·|¨Ï±o¨ä¥¦ port ¨C¦¸³£³Q½sĶ( ÁÙ¦³¦w¸Ë¡A·Ó¹w³]Ȫº¸Ü)¡A¦Ó¥B dependency ¤]·|¶i¨ì package ¸Ì¡C ¦pªG¯uªº»Ýn¡A«Øij§A¼g¦¨ BUILD_DEPENDS ©M RUN_DEPENDS ¥N´À -- ¦Ü¤Ö³o¼Ë¥Øªº¸û²M·¡¡C
¦pªG package n¥Î¨ì GNU make¡A³]©w USE_GMAKE=yes¡C¦pªG package n¥Î¨ì configure¡A³]©w HAS_CONFIGURE=yes¡C¦pªG package n¥Î¨ì GNU configure¡A³]©w GNU_CONFIGURE=yes (³o¥]§t HAS_CONFIGURE)¡C¦pªGn¹ï configure ¤U¤@¨ÇÃB¥~ªº°Ñ¼Æ(¹ï GNU configure ¹w³]°Ñ¼Æ¬° --prefix=${PREFIX}¡A«D GNU configure «hµL)¡A§â³o¨ÇÃB¥~ªº°Ñ¼Æ³]¦b CONFIGURE_ARGS ¸Ì¡C¦pªG package n¥Î¨ì GNU autoconf¡A³]©w USE_AUTOCONF=yes¡C³o¥]§t¤F GNU_CONFIGURE¡A¦Ó¥B·|¨Ï autoconf ¦b configure ¤§«e°õ¦æ¡C
¦pªG package ¬O¥Î imake ±q Imakefiles ²£¥Í Makefiles ªº X À³¥Îµ{¦¡¡A´N³]©w USE_IMAKE=yes¡C ³o¼Ë·|¨Ï configure ªº¶¥¬q¦Û°Ê°µ xmkmf -a¡C ¦pªG -a ³oÓºX¼Ð·|¹ï port ³y¦¨°ÝÃD¡A´N³]¦¨ XMKMF=xmkmf¡C¦pªG port ¥Îimake ³oÓ©R¥O«o¤S»{¤£±o install.man ³oÓ«ü¼Ð¡A ¨º´NÀ³¸Ó³] NO_INSTALL_MANPAGES=yes¡CÁÙ¦³¡A ³Ìªìªº port ªº§@ªÌ¦W¦rÀ³¸Ó³Q°O¤W¤@µ§¡C :->
¦pªG port ªºµ{¦¡½X¸Ìªº Makefile ¥H all ¥H¥~ªº¼Ðªº§@¬°¥Dnªº«Ø¥ß¼Ðªº¡A ¨º´N³]¦¨ ALL_TARGET¡C¦P¼Ëªº¹D²z¤]¾A¥Î¦b install ©M INSTALL_TARGET¡C
ÁÙ¦³¤@¨Ç¨Æ¶µ¬O³Ð³y¤@Ó·s port ®É©Òn¦Ò¼{ªº¡C ³oÓ³¹¸`¸ÑÄÀ¤F¤j³¡¥÷ªº¤@¯ë±¡§Î¡C
¦pªG port ¦w¸Ë¤F¤@Ó¦@¨É¨ç¦¡¡A¦b Makefile ¸Ì¥[¤W post-install ³oӼЪº¡A ¤º®e¬°¦b·s¨ç¦¡¦w¸Ëªº¥Ø¿ý¤W(³q±`¬O PREFIX/lib)°õ¦æ ${LDCONFIG} -m ¥H±N¨äµù¥U¶i¦@¨É¨ç¦¡¼È¦s°Ï¸Ì¡C
¦¹¥~¡A¼W¥[¤@¹ï @exec /sbin/ldconfig -m ©M @unexec /sbin/ldconfig -R ªº²Õ¦X¨ìÀÉ®× pkg/PLIST ¸Ì¥H«K¦w¸Ë¦¹ package ªº¨Ï¥ÎªÌ¥i¥H¥ß¨è¶}©l¥Î³oӨ禡¡A ¦Ó¸Ñ°£¦w¸Ë¤]¤£·|Åý¨t²Î¥H¬°¨ç¦¡ÁÙ¿àµÛ¤£¨«¡C ³o´X¦æÀ³¸Óºò¸ò¦b¼gµÛ¨ç¦¡¦WºÙ¸Ó¦æ«á±¡A¦p¤U¡G
lib/libtvl80.so.1 @exec /sbin/ldconfig -m %D/lib @unexec /sbin/ldconfig -R
µ´¹ïµ´¹ï¡A¤d¸U¤£n¦b Makefile ©Î pkg/PLIST ¸Ì¥[¤W¤@¦æ¨S¦³¥ô¦ó°Ñ¼Æªº ldconfig¡C ³o¼Ë·|¨Ï±o¦@¨É¨ç¦¡¼È¦s°Ï¸Ì«³]¦¨¥u§t /usr/lib ¸Ìªº¤º®e¡A¦Ó¥B·|¹³¬Ó«Ò¯ë¦a§Ë¶Ã¨Ï¥ÎªÌªº¨t²Î("±Ï©R¡A §Ú¸Ë§¹³oÓ port «á xinit ´N¦A¤]¤£°Ê¤F")¡C ¥ô¦ó³o»ò°µªº¤H³£·|³Qºj±þ¡A¥Î¥ÍÄ꺤M¤j¤Á 65,536 ¶ô¡A ³Q¤@¸s¯Q¾~§â¨xŦ§è¥X¨ï¸H¡AµM«áÄꦺ¦b¦aº»²`³B¡A¸U§T¤£´_ (¤£¤@©w·|·Ó³o¶¶§Ç¨Ó...)
¦Û±q FreeBSD ¦b 3.0-RELEASE «á¥ß¨è§ï¬° ELF binary format¡A §ÚÌn§ó´««Ü¦h«Ø¥ß¦@¨É¨ç¦¡ªº port ¨Ó¤ä´© ELF¡C ½ÆÂøªº¬O 3.0 ¥i¥H¦P®É°õ¦æ ELF ©M a.out¡A ¦Ó¥B§Ú̧Ʊæ«D¥¿¦¡¦a¤ä´© 2.2¡A¶V¤[¶V¦n¡C ¤U±³o¨Ç«ü¤Þ¦p¦ó§ó´«¥u¤ä´© a.out ªº port ¥H¦P®É¤ä´© a.out ©M ELF¡C
³o¥÷¦Cªíªº¬Y¨Ç³¡¥÷¥u¦³¦bÂà´«¹Lµ{¤¤¤~¾A¥Î¡A ¤£¹L¤´µM¯d¦b³o·í§@°Ñ¦Ò¥H§K§A¹J¨ì·Qn¤É¯Åªº¦Ñ port¡C
¥ô¦ó a.out ªº¨ç¦¡³£À³¸Ó²¾¶} /usr/local/lib ¨ì¤@Ó aout ªº¤l¥Ø¿ý¡C(¦pªG¤£§â¥¦Ì²¾¨«¡A ELF ports ·|«Ü¼Ö·N§â a.out ªº¨ç¦¡Âмg±¼¡C) ¦b 3.0-CURRENT ªº src/Makefile ¸Ìªº move-aout-libs (±q aout-to-elf ©I¥s)³oӼЪº·|À°§A°µ³o¥ó¨Æ¡C ¥¦¥u·|²¾°Ê a.ou ªº¨ç¦¡¡A©Ò¥H¦b¦P®É¦³ ELF ©M a.out ¨ç¦¡ªº¼Ð·Ç¥Ø¿ý©I¥s¥¦«Ü¦w¥þªº¡C
Ports tree ·|¨Ì·Ó¨t²Îªº®æ¦¡¨Ó«Ø¥ß package¡C ªí¥Ü¥Ñ `objformat` ¶Ç¦^ªºÈ¨M©w¦b 2.2 ¬O a.out ¦Ó¦b 3.0¬O a.out ©Î ELF¡C¦P¼Ë¦a¡A¤@¥¹¨Ï¥ÎªÌ±N a.out ªº¨ç¦¡²¾¨ì¤@Ó¤l¥Ø¿ý¤U¡A±N¤£¤ä´©«Ø¥ß a.out ªº¨ç¦¡¡C(´«¥y¸Ü»¡¡A¦pªG§A¯uªºª¾¹D¦b°µ¤°»òªº¸Ü¤´µM¥i¥H¹B§@¡A ¤£¹L±o¾a¦Û¤v¨Ó¡C)
Note: ¦pªG port ¥u¯à¦b a.out Àô¹Ò°õ¦æ¡A§â BROKEN_ELF ³]¬°¤@»¡©úì¦]ªº¦r¦ê¡C ¦b ELF ªº¨t²Î¤W«Ø¥ß port ®É·|§â³oÃþªº¸õ¹L¥h¡C
bsd.port.mk ·|§â PORTOBJFORMAT ³]¬° aout ©Î elf ¨Ã±N¥¦¿é¥X¨ìÀô¹ÒÅÜ¼Æ CONFIGURE_ENV¡ASCRIPTS_ENV ©M MAKE_ENV¡C(¦b 2.2-STABLE ¸Ì¥Ã»·¬O aout)¡C¥¦¤]·|³Q¥H PORTOBJFORMAT=${PORTOBJFORMAT} ¶Ç¤J PLIST_SUB¡C (¬Ý¤U±´X¦æ ldconfig ªº»¡©ú¡C)
³oÓÅܼƳ]©w¨Ï¥Î bsd.port.mk ¸Ì³o¦æ¡G
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout
Ports ªº make µ{§ÇÀ³¸Ó¥Î³oÓÅܼƨӨM©w¸Ó°µ¤°»ò¡C µM¦Ó¡A°²¦p port ªº configure script ¤w¸g¦Û°Ê¬d¥X¬° ELF ªº¨t²Î¡A¨º´N¨S¦³¥²n°Ñ·Ó PORTOBJFORMAT¡C
±µ¤U¨Óªº¦b¬° a.out ©M ELF ªº¨t²Î³B²z¦@¨É¨ç¦¡ªº³¡¥÷¦³«Ü¦h¤£¦P¡C
¦@¨É¨ç¦¡ªºª©¥»
¤@Ó ELF ªº¦@¨É¨ç¦¡À³¸Ó¦W¬° libfoo.so.M¡A M ¬OÓ³æ¤@ªºª©¥»½s¸¹¡A¦Ó a.out ªº¦@¨É¨ç¦¡À³¸Ó¦W¬° libfoo.so.M.N¡A M ¬O¥Dª©¥»½s¸¹¦Ó N ¬O¦¸ª©¥»½s¸¹¡C§O§â¥¦Ì·d²V¤F¡F ¤d¸U¤£n¦w¸Ë¤@Ó¥s°µ libfoo.so.N.M ªº ELF ¦@¨É¨ç¦¡¡A©Î¬O¥s°µ libfoo.so.N ªº a.out ¦@¨É¨ç¦¡(©Î¬O²Å¸¹³sµ²)¡C
³sµ²¾¹(linker)ªº©R¥O¦C
°²³] cc -shared ¤ñ ld ¥Î°_¨Ó§óª½±µ¡A¨º°ß¤@¤£¦Pªº¦a¤è´N¬O¦b ELF ¨t²Îªº©R¥O¦Cn¥[¤W -Wl,-soname,libfoo.so.M¡C
ÁÙ»Ýn¦w¸Ë¤@ӲŸ¹³sµ²(symlink)±q libfoo.so ¨ì libfoo.so.N Åý ELF ªº³sµ²¾¹§Ö¼ÖÂI¡C¦]¬°¥¦¤]À³¸Ó¦C¦b PLIST ¸Ì¡A¦Ó¥B¦b a.out ªº±¡ªp¤U¤]¤£·|³y¦¨¶Ë®`(¦³¨Ç port ¬Æ¦Ü°ÊºA¸ü¤J®É¤´»ÝnÓ³sµ²)¡A§A¥u¶·n°µÓ³sµ²¦Ó¤£¥²ºÞ PORTOBJFORMAT ªº³]©w¡C
LIB_DEPENDS ¸Ìªº¦¸½s¸¹À³¸Ó±q©Ò¦³ port ªº Makefiles ²¾°£¡A¤]n²¾°£©Ò¦³ regexp ªº¤ä´©¡C (¨Ò¦p¡Afoo\\.1\\.\\(33|40\\) Åܦ¨ foo.2¡C)¥i¥H¥Î grep -wF §â¥¦Ì§ä¥X¨Ó¡C
°²¦p a.out ªº¥D½s¸¹¬O 0 «h PLIST À³¸Ó¥]§tµuªº(ELF)¦@¨É¨ç¦¡¦WºÙ¡A¤Ï¤§«h¬°ªøªº(a.out)¦@¨É¨ç¦¡¦WºÙ¡C bsd.port.mk ·|¦b·í PORTOBJFORMAT µ¥©ó aout ®É¦Û°Ê©óµuªº¦@¨É¨ç¦¡¸Ó¦æ«á¥[¤W .0¡A¦Ó·í PORTOBJFORMAT µ¥©ó elf ®É§R¥hªøªº¦@¨É¨ç¦¡¤§¦¸½s¸¹¡C
¸U¤@§A¯uªº¥²¶·¦b ELF ªº¨t²Î¤W¦w¸Ë¨âÓª©¥»ªº¦@¨É¨ç¦¡¡A ©Î¬On¦b a.out ªº¨t²Î¦w¸Ë¤@Óª©¥»(¨Ò¦p¦w¸Ë¨ä¥¦ªº§@·~¨t²Îªº¬Û®e¨ç¦¡ªº port)¡A´N³]©wÅÜ¼Æ NO_FILTER_SHLIBS¡C ³o¼Ë·|Ãö±¼¤W¤@¬q¸Ì©Ò´£¨ì¹ï PLIST ½s¿è¡C
ldconfig ¨º¦æ¦b Makefiles ¸ÌÀ³¸ÓŪ¨ú¡G
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....
¦b PLIST ¸ÌÀ³¸ÓŪ¨ú¡G
@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ... @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
³o¬O¥Î¨Ó½T©w¥¿½Tªº ldconfig ªº©I¥s¬O¨M©w¦b package ªº®æ¦¡¦Ó¤£¬O¨t²Îªº¹w³]®æ¦¡¡G
¦pªG port »ÝnÂÇÅܼÆȪº¤£¦P¨Ó«Ø¥ßµy·L¤£¦Pª©¥»ªº package (¨Ò¦p¡Aresolution ©Î paper size)¡A´N´À¨CÓ package ¶}Ó¤l¥Ø¿ýÅý¨Ï¥ÎªÌ§ó®e©öª¾¹D¸Ó°µ¤°»ò¡A¤£¹L¾¨¶qÅý¦UÓ port ¤§¶¡¦@¥Î ªºÀɮ׶V¦h¶V¦n¡C¦pªG§A«Ü¥©§®¦a¹B¥ÎÅܼơA ¨º´X¥G¥u¶·n¦b¨ä¤¤¤@ӥؿý©ñÓ²µuªº Makefile «K¥i¡C¦b³o¨Ç³æ¤@ªº Makefiles¡A¥i¥H¥Î MASTERDIR ¨Ó»¡©ú¨ä¥¦ªºÀɮצbþӥؿý¡C ¦P¼Ë¦a¡A¨Ï¥Î¤@ÓÅܼưµ¬° PKGNAME ªº¤@³¡¥÷¡AÅý¨CÓ package ¾Ö¦³¤£¦Pªº¦WºÙ¡C
¤@Ó¨Ò¤l¬O³Ì¨Îªº»¡©ú¡C³o¬O japanese/xdvi300/Makefile ªº¤@³¡¥÷¡F
PKGNAME= ja-xdvi${RESOLUTION}-17 : # default RESOLUTION?= 300 .if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \ ${RESOLUTION} != 300 && ${RESOLUTION} != 400 @${ECHO} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\"" @${ECHO} "Possible values are: 118, 240, 300 (default) and 400." @${FALSE} .endif
japanese/xdvi300 ¤]¦³©Ò¦³¥¿¦¡ªº patch¡A package ÀÉ®×....µ¥µ¥¡C¦pªG¦b¦¹Áä¤J make¡A ¥¦·|¨ú¥Î¹w³]È°µ¬° resolution ªºÈ(300)¨Ã·Ó¤@¯ë±¡§Î«Ø¥ß port¡C
¹ï¨ä¥¦ resolution ¨Ó»¡¡A³o¬O§¹¾ãªº xdvi118/Makefile¡G
RESOLUTION= 118 MASTERDIR= ${.CURDIR}/../xdvi300 .include ${MASTERDIR}/Makefile
(xdvi240/Makefile ©M xdvi400/Makefile ®t¤£¦h)¡C MASTERDIR ªº©w¸q§i¶D bsd.port.mk »¡ PATCHDIR ©M PKGDIR ³oÃþ¥¿¦¡ªº¤l¥Ø¿ýªº³]©w¦b xdvi300 ¤U±¡CRESOLUTION=118 ³o¦æ·|»\±¼ xdvi300/Makefile ¸Ìªº RESOLUTION=300¡A¦Ó port ·|¥H resolution ¬° 118 ¨Ó«Ø¥ß¡C
º¥ý¡A½Ð¥ýŪŪ¦@¨É¨ç¦¡ª©¥»ªº¬Fµ¦ ¥H¤F¸Ñ¤@¯ë¦p¦ó¨M©w¦@¨É¨ç¦¡ªºª©¥»¡C¤£nª¼¥Ø¦a¥H¬°³nÅé§@ªÌª¾¹D¥L̦b°µ¤°»ò¡F «Ü¦h³£¤£ª¾¹D¡CÂÔ·V¦a¦Ò¼{³o¨Ç²Ó¸`¬O«Ü«nªº¡A ¦]¬°§Ú̸յÛÅý¤@°ï¥i¯à¤£¬Û®eªº³nÅé¤@°_¦s¦b¡A³o¬O¬Û·í¿W¯Sªº±¡ªp¡C ¦b¥H«e²Ê¤ßªº port ´¿¸g¦b¦@¨É¨ç¦¡ªº»{©w¤W³y¦¨«Ü¤jªº§xÂZ¡C (¦³¨S¦³·Q¹L¬°¤°»ò jpeg-6b ªº¦@¨É¨ç¦¡ª©¥»¬O 9.0¡H)¡C¤£«Hªº¸Ü´N¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org> °Ý°Ý¡C¤j³¡¥÷ªº®ÉÔ¡A §Aªº¤u§@³Ì«á´N¬O¨M©w¦@¨É¨ç¦¡ªºª©¥»©M°µ¥X¾A·íªº patch ¨Ó°µ³o¥ó¨Æ¡C
µM¦Ó¡A¦pªG¦³Ó port ¸ò port tree ¸Ì¦P¤@³nÅ骺ª©¥»¤£¦Pªº¸Ü¡A ¨º´N§ó½ÆÂø¤F¡C²³æªº»¡¡AFreeBSD ªº¹ê¦æ¨Ã¤£¤¹³\¨Ï¥ÎªÌ«ü©w³sµ²¾¹³sµ²þ¤@ª©¥»ªº¦@¨É¨ç¦¡ (³sµ²¾¹¥Ã»·³£¬D¿ï½s¸¹³Ì°ªªºª©¥»)¡C³oªí¥Ü°²¦p¨t²Î¸Ì¦³ libfoo.so.3.2 ©M libfoo.so.4.0¡A ´N¨S¦³¿ìªk¥s³sµ²¾¹³sµ²Ó§OªºÀ³¥Îµ{¦¡¨ì libfoo.so.3.2¡CIt is essentially completely overshadowed in terms of compilation-time linkage.¦b³o±¡§Î¤U¡A °ß¤@ªº¸Ñ¨M¿ìªk´N¬O§ó§ï¦@¨É¨ç¦¡°ò¦³¡¥÷ªº¦WºÙ¡C ¨Ò¦p¡A§â libfoo.so.4.0 §ï¦¨ libfoo4.so.1.0 ³o¼Ë 3.2 ©M 4.0 ªºª©¥»«K³£¥i¥H±q¨ä¥¦ port ³sµ²¡C
MAN[1-9LN] ³o¨ÇÅܼƷ|¦Û°Ê§â¥ô¦ó manpage ¥[¶i pkg/PLIST (³oªí¥Üµ´¤£n §â manpage ¦C¦b PLIST ¸Ì -- generating PLIST ¦³§ó¦h®Æ)¡C ¦b¦w¸Ëªº¶¥¬q¬O§_·|À£ÁY manpage ¨M©w©ó /etc/make.conf ¸Ì¬O§_¦³³]©w NOMANCOMPRESS¡C
¦pªGn¥Î²Å¸¹³sµ²(symlink)©Î¹êÅé³sµ²(hardlink)¬° manpage ¦w¸Ë¦hÓ¦WºÙ¡A«hÀ³¸Ó¥Î MLINKS ³oÓÅܼƨӽT»{¡C Port ©Ò¦w¸Ëªº³sµ²·|³Q bsd.port.mk ·´±¼©Î«·s³Ð³y¥H½T©w¥¦«ü¦V¥¿½TªºÀɮסC¥ô¦ó¦C¦b MLINKS ªº manpage µ´¤£¥i¦C¦b PLIST ¸Ì¡C
n«ü©w manpage ¬O§_¦b¦w¸Ë®ÉÀ£ÁY¥i¥ÎÅÜ¼Æ MANCOMPRESSED¡C³oÓÅܼƦ³¤TÓÈ¥i¥Î¡A yes¡Ano ©M maybe¡Cyes ªí¥Ü manpages ¤w¸g¥HÀ£ÁY¹Lªº§Î¦¡¦w¸Ë¡Ano ªí¥Ü¨S¦³À£ÁY¡A ¦Ó maybe ªí¥Ü¦¤w¿í¦u NOMANCOMPRESS ªºÈ¡A©Ò¥H bsd.port.mk ¨Ã¤£»Ýn°µ¤°»ò¯S§Oªº¨Æ¤F¡C
°²¦p³]©w¤F USE_IMAKE ¦Ó¥B¨S¦³³]©w NO_INSTALL_MANPAGES¡A«h MANCOMPRESSED ·|¦Û°Ê³]¬° yes¡A ¤Ï¤§«h³]¬° no¡C¨S¦³¥²n©ú½T¦a©w¸q¥¦¡A °£«D¹w³]Ȥ£¾A¦X§Aªº port¡C
¦pªG§Aªº port ªº¥Dn¾ðª¬µ²ºc¦ì©ó PREFIX ¥H¥~¡A¥i¥H¥Î MANPREFIX ¨Ó³]©w¡C ¦P¼Ë¦a¡A¦pªG¥u¦³¯S©w³¹¸`ªº manpages ¦b¤£¼Ð·Çªº¦a¤è¡A ¨Ò¦p¤@¨Ç Perl ¼Ò²Õ(module)ªº port¡A¥i¥H§Q¥Î MANsectPREFIX (sect ¬O 1-9¡A L ©Î N ¨ä¤¤¤§¤@) ¨Ó³]©wÓ§Oªº¥Dn¸ô®|¡C
¦pªG manpages ¸Ë¦b«ü©w»y¨¥ªº¤l¥Ø¿ý¡A §â MANLANG ³]¬°¸Ó»y¨¥ªº¦WºÙ¡C ³oÓÅܼƪº¹w³]ȬO "" (¤]´N¬O¥u¦³^¤å)¡C
³oÓ¨Ò¤l§â¤W±»¡ªº³£©ñ¤@°_¤F¡C
MAN1= foo.1 MAN3= bar.3 MAN4= baz.4 MLINKS= foo.1 alt-name.8 MANLANG= "" ja MAN3PREFIX= ${PREFIX}/share/foobar MANCOMPRESSED= yes
³oªí¥Ü³oÓ port ¸Ë¤F¤»ÓÀɮסF
${PREFIX}/man/man1/foo.1.gz ${PREFIX}/man/ja/man1/foo.1.gz ${PREFIX}/share/foobar/man/man3/bar.3.gz ${PREFIX}/share/foobar/man/ja/man3/bar.3.gz ${PREFIX}/man/man4/baz.4.gz ${PREFIX}/man/ja/man4/baz.4.gz
ªþ¥[ªº ${PREFIX}/man/man8/alt-name.8.gz ¥i¯à·|¤]¥i¯à¤£·|³Q port ¦w¸Ë¡CµL½×¦p¦ó¡A foo(1) manpage ©M alt-name(8) manpage ·|¥Î¤@ӲŸ¹³sµ²(symlink)±µ°_¨Ó¡C
¦³«Ü¦hµ{¦¡»Ýn Motif ªº¨ç¦¡(¥i¥H±q¤@¨Ç°Ó·~©Êªº¼t°Ó¨ú±o¡A ÁöµM¦³³ø¾É«ü¥X«Ü¦hÀ³¥Îµ{¦¡¤]¥i¥H¥Î§K¿úªº§Ï»s³nÅé x11-toolkits/lesstif ¨Ó°õ¦æ)¨Ó½sĶ¡C ¦]¬°³o¬OÓ«Ü´¶¤Îªº toolkit ¦Ó¥B¥¦ªº±ÂÅv³q±`¤¹³\¨Ï¥ÎªÌ«Âд²§GÀRºA³sµ²ªº binary¡A§Ú̬°³B²z»Ýn Motif ªº port °µ¤F¨Ç·Ç³Æ¡A´N¬YÆ[ÂI¦Ó¨¥¡A ³o¼Ë¤£½×¬O°ÊºA(¬°¤F¨º¨Ç±q port ½sĶªº¤H)©Î¬OÀRºA(¬°¤F´²§G package ªº¤H) ³sµ²ªº binary ³£¥i¥H®e©ö¦a½sĶ¡C
¦pªG port »Ýn Motif¡A¦b Makefile ¸Ì©w¸q³oÓÅܼơC³o¼Ë¥i¥H¨¾¤î¨S¦³ Motif ªº¤H¸Õ¹Ï¥h½sĶ¥¦¡C
³oÓÅܼƦb bsd.port.mk ³]©w¡A ¥Î¨Ó¾A·íªº°Ñ¦Ò Motif ªº¨ç¦¡¡C¤£½× Motif ªº¨ç¦¡¬O¦b Makefile ©Î Imakefile ¸Ì³Q°Ñ¦Ò¡A½Ð patch µ{¦¡½X¥H¨Ï¥Î³oÓÅܼơC
¦³¨âºØ¤@¯ëªº±¡ªp¡G
¦pªG port ¦b¥¦ªº Makefile ©Î Imakefile ¥H -lXm ¨Ó°Ñ¦Ò Motif ªº¨ç¦¡¡A¥un§â¥¦´«¦¨ ${MOTIFLIB}¡C
¦pªG port ¦b¥¦ªº Imakefile ¥Î XmClientLibs¡A§â¥¦§ï¦¨ ${MOTIFLIB} ${XTOOLLIB} ${XLIB}¡C
ª`·N MOTIFLIB (³q±`)®i¶}¦¨ -L/usr/X11R6/lib -lXm ©Î /usr/X11R6/lib/libXm.a¡A©Ò¥H¨S¦³¥²n¦b«e±¥[¤W -L ©Î -l¡C
¦pªG port ·|¬° X Window system ¦w¸Ë¦r«¬¡A§â¦r«¬©ñ¨ì X11BASE/lib/X11/fonts/local ¸Ì¡C ³oӥؿý¬O XFree86 release 3.3.3 ·s¦³ªº¡C¦pªG¤£¦s¦bªº¸Ü½Ð¶}¤@Ó¡A ¨Ã¦L¥X¤@Ó°T®§¶Ê«P¨Ï¥ÎªÌ¤É¯Å¥L̪º XFree86 ¨ì 3.3.3 ©Î§ó·sªº¡A ©ÎªÌ¦Ü¤Ö§â³oӥؿý¥[¶i /etc/XF86Config ¸Ìªº¦r«¬¸ô®|¡C
·sª©ªº texinfo (¥]¬A¦b 2.2.2-RELEASE ©M¤§«áªº) ¥]§t¤@Ó¹ê¥Îªºµ{¦¡¥s°µ install-info¡A ¥Î¨Ó¼W¥[©Î§R°£°O¿ý¨ì dir ¸Ì¡C¦pªG port ¦w¸Ë¥ô¦óªº info ¤å¥ó¡A½Ð¸òµÛ³o¨Ç«ü¤Þ¡A³o¼Ë port/package ¤~·|¥¿½T¦a§ó·s¨Ï¥ÎªÌªº PREFIX/info/dir ÀɮסC (©êºp³o¤@³¹³o»òªø¡A¤£¹L§â©Ò¦³ªº info ÀÉ®×½s¦b¤@°_¬O¥²nªº¡C ¦pªG°µªº¥¿½T±N·|²£¥Í¤@Óº}«Gªº¦Cªí¡A ©Ò¥H½Ð¸ò§Ú¤@°_§Ô§a¡I
º¥ý¡A³o¬O§A(¨¬°¤@Ó porter)±oª¾¹Dªº
% install-info --help install-info [OPTION]... [INFO-FILE [DIR-FILE]] Install INFO-FILE in the Info directory file DIR-FILE. Options: --delete Delete existing entries in INFO-FILE; don't insert any new entries. : --entry=TEXT Insert TEXT as an Info directory entry. : --section=SEC Put this file's entries in section SEC of the directory. :
Note: ³oÓµ{¬O¨Ã¤£·|¯uªº¦w¸Ë info ÀɮסF ¥¦¥u¬O¦b dir Àɸ̴¡¤J©Î§R°£°O¿ý¡C
³o¸Ì¦³¤CÓ¨BÆJªºµ{§Ç¥Î¨Ó§ó´« port ¨Ó¨Ï¥Î install-info¡C§Ú·|¥Î editors/emacs ·í¨Ò¤l¡C
À˵ø texinfo µ{¦¡½X¨Ã°µÓ patch ¨Ó§â @dircategory ©M @direntry ¥[¶i¨S¦³³o¨âÓ±ÔzªºÀɮסC³o¬O§Úªº patch ªº¤@³¡¥÷¡G
--- ./man/vip.texi.org Fri Jun 16 15:31:11 1995 +++ ./man/vip.texi Tue May 20 01:28:33 1997 @@ -2,6 +2,10 @@ @setfilename ../info/vip @settitle VIP +@dircategory The Emacs editor and associated tools +@direntry +* VIP: (vip). A VI-emulation for Emacs. +@end direntry @iftex @finalout :
³o®æ¦¡À³¸Ó¬O¤@¬Ý´NÀ´ªº¡C«Ü¦h§@ªÌ§â dir Àɯd¦b source tree ¸Ì¡A¸ÓÀÉ¥]§t©Ò¦³©Ò»Ýªº°O¿ý¡A ©Ò¥H¦bn¼g¤@Ó¦Û¤vªºÀÉ«e¥ý¯d·N¤@¤U¡C¦P¼Ë¦a¡A½T©w¦³¬d¬Ý¬ÛÃöªº ports ¨ÃÅý³¹¸`ªº¦WºÙ©M°O¿ý¤@P(§ÚÌ«Øij©Ò¦³°O¿ýªº¥¿¤å±q²Ä¥|Ó tab °±¤îªº¦a¤è¶}©l)¡C
Note: nª`·N¨CÓÀÉ®×¥u¯à¦³¤@µ§ info °O¿ý¦]¬° install-info --delete ªº¤@Ó¿ù»~¾ÉP¦pªG <@direntry> ªº³¡¥÷¦³¦hÓ°O¿ý¤]¥u·|¬å±¼²Ä¤@Ó¡C
¥i¥H§â dir ªº°O¿ýµ¹ install-info ·í°Ñ¼Æ¥Î (--section ©M --entry) ¥H¨ú¥N patch texinfo ì©l½X¡C§Ú¤£»{¬°³o¹ï port ¨Ó»¡¬O¦n¤èªk¡A ¦]¬°³o¼Ë¥²¶·§â¦P¼ËªºªF¦è½Æ»s¨ì¤TÓ¦a¤è (Makefile ©M PLIST ªº @exec/@unexec¡F ¬Ý¤U±)¡C¥i¬O¦pªG¦³¤é¤åªº(©Î¬O¨ä¥¦Âù¦ì¤¸½s½Xªº) info ÀÉ¡A ³o¼Ë install-info ¥²¶·¥ÎÃB¥~ªº°Ñ¼Æ¡A ¦]¬° makeinfo ¤£¯à³B²z¨º¨Ç texinfo µ{¦¡½X¡C (®³ japanese/skk ªº Makefile ©M PLIST ·í¨Ò¤l¬Ý¬Ý«ç»ò°µ)¡C
¦^¨ì port ªº¥Ø¿ý°õ¦æ make clean; make ¨Ã½T»{ info Àɤw¸g±q texinfo µ{¦¡½X«·s²£¥Í¡C ¬JµM texinfo µ{¦¡½X¤ñ info ÀÉÁÙ·s¡A·íÁä¤J make ®É´NÀ³¸Ó³Q«·s«Ø¥ß¡F¤£¹L«Ü¦h Makefiles ¨Ã¨S¦³¬° info ÀÉ¥]§t¥¿½Tªº dependency¡C¦b emacs ªº±¡ªp¡A«K¥²¶· patch ¥DnªºMakefile.in ³o¼Ë¥¦¤~·|©¹¤U¨ì man ªº¤l¥Ø¿ý«·s«Ø¥ß info¡C
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996 +++ ./Makefile.in Tue Apr 15 00:15:28 1997 @@ -184,7 +184,7 @@ # Subdirectories to make recursively. `lisp' is not included # because the compiled lisp files are part of the distribution # and you cannot remake them without installing Emacs first. -SUBDIR = lib-src src +SUBDIR = lib-src src man # The makefiles of the directories in $SUBDIR. SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile --- ./man/Makefile.in.org Thu Jun 27 15:27:19 1996 +++ ./man/Makefile.in Tue Apr 15 00:29:52 1997 @@ -66,6 +66,7 @@ ${srcdir}/gnu1.texi \ ${srcdir}/glossary.texi +all: info info: $(INFO_TARGETS) dvi: $(DVI_TARGETS)
²Ä¤G¶ô(hunk)¬O¥²nªº¦]¬°¤l¥Ø¿ý man ¹w³]ªº¼Ðªº¥s°µ info¡A¦Ó¥Dnªº Makefile ·|©I¥s all¡C §Ú¤]§R°£¤F info Àɪº¦w¸Ë¦]¬° /usr/share/info ¸Ì¤w¸g¦³¤@Ó¦P¦WªºÀÉ®× (¨ºÓ patch ¨S¦³¦b³o¨q¥X¨Ó)¡C
¦pªG Makefile ¸Ì¦³Ó¦a¤è·|¦w¸Ë dir ÀÉ¡A¬å¤F¥¦¡C§Aªº port ¥i¯à¤£·|»ò³o°µ¡C ¦P¼Ë¦a¡A§R¥h¥ô¦ó¥H§Oªº¤è¦¡§Ëż dir Àɪº©R¥O¡C
--- ./Makefile.in.org Mon Aug 19 21:12:19 1996 +++ ./Makefile.in Mon Apr 14 23:38:07 1997 @@ -368,14 +368,8 @@ if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ then \ (cd ${infodir}; \ - if [ -f dir ]; then \ - if [ ! -f dir.old ]; then mv -f dir dir.old; \ - else mv -f dir dir.bak; fi; \ - fi; \ cd ${srcdir}/info ; \ - (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir); \ - (cd $${thisdir}; chmod a+r ${infodir}/dir); \ for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* sc* vip*; do \ (cd $${thisdir}; \ ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ chmod a+r ${infodir}/$$f); \
(³oÓ¨BÆJ¥u¦³¦bקï¤@Ó²{¦sªº port ®É¤~»Ýn¡C) ¬Ý¤@¤U pkg/PLIST ¨Ã§R¥h¥ô¦ó¸ÕµÛקï info/dir ªº³¡¥÷¡C ¥i¯à¦b pkg/INSTALL ©Î¨ä¥¦Àɮ׸̡A ©Ò¥H¤j³W¼Ò¦a·j¯Á§a¡C
Index: pkg/PLIST =================================================================== RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v retrieving revision 1.15 diff -u -r1.15 PLIST --- PLIST 1997/03/04 08:04:00 1.15 +++ PLIST 1997/04/15 06:32:12 @@ -15,9 +15,6 @@ man/man1/emacs.1.gz man/man1/etags.1.gz man/man1/ctags.1.gz -@unexec cp %D/info/dir %D/info/dir.bak -info/dir -@unexec cp %D/info/dir.bak %D/info/dir info/cl info/cl-1 info/cl-2
¦b Makefile ¥[¤@Ó post-install ªº¼Ðªº¨Ó©I¥s ¦ñÀHµÛn¦w¸Ëªº info Àɪº install-info¡C (¤£»Ýn¦A¦Û¤v«Ø¤@Ó dir ÀɤF¡F·í¥¦¤£¦s¦b®É install-info ·|¦Û°Ê³Ð³y¤@Ó¡C)
Index: Makefile =================================================================== RCS file: /usr/cvs/ports/editors/emacs/Makefile,v retrieving revision 1.26 diff -u -r1.26 Makefile --- Makefile 1996/11/19 13:14:40 1.26 +++ Makefile 1997/05/20 10:25:09 1.28 @@ -20,5 +20,8 @@ post-install: .for file in emacs-19.34 emacsclient etags ctags b2m strip ${PREFIX}/bin/${file} .endfor +.for info in emacs vip viper forms gnus mh-e cl sc dired-x ediff ccmode + install-info ${PREFIX}/info/${info} ${PREFIX}/info/dir +.endfor .include <bsd.port.mk>
½s¿è PLIST ¨Ã¥[¤Wµ¥®Äªº @exec ±ÔzÁÙ¦³¦]À³ pkg_delete ªº @unexec¡C
Index: pkg/PLIST =================================================================== RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v retrieving revision 1.15 diff -u -r1.15 PLIST --- PLIST 1997/03/04 08:04:00 1.15 +++ PLIST 1997/05/20 10:25:12 1.17 @@ -16,7 +14,14 @@ man/man1/etags.1.gz man/man1/ctags.1.gz +@unexec install-info --delete %D/info/emacs %D/info/dir : +@unexec install-info --delete %D/info/ccmode %D/info/dir info/cl info/cl-1 @@ -87,6 +94,18 @@ info/viper-3 info/viper-4 +@exec install-info %D/info/emacs %D/info/dir : +@exec install-info %D/info/ccmode %D/info/dir libexec/emacs/19.34/i386--freebsd/cvtmail libexec/emacs/19.34/i386--freebsd/digest-doc
Note: @unexec install-info --delete ³oÓ©R¥O ¥²¶·¦C¦b info Àɤ§«e¡A³o¼Ë¤~¥i¥HŪ¨ú³oÓÀÉ¡C¦P¼Ë¦a¡A @exec install-info ³oÓ«ü¥On¦b info ÀÉ ©M³Ð³y dir Àɪº©R¥O @exec ¤§«á¡C
´ú¸Õ¨Ã¸ØÆg§Aªº¦¨ªG§a¡C :-)¡C ¦b¨CÓ¨BÆJ¶}©l¤§«e©M¤§«áÀˬd dir ÀÉ¡C
³o¦³¤@¨Ç¦³Ãö pkg/ ¦Ó§ÚÌ¥¼´¿´£¤Îªº¤p§Þ¥©¡A ¦³®É«á¥¦Ì¤]·|¬£¤W¥Î³õ¡C
¦pªGn¹ï¦w¸Ëªº¤HÅã¥Ü°T®§ªº¸Ü¡A¥i¥H§â°T®§©ñ¦b pkg/MESSAGE ¸Ì¡C³oÓ¥\¯à¦b·í pkg_add ¤§«ánÅã¥ÜÃB¥~ªº¦w¸Ë¨BÆJ¡A ©Î¬OnÅã¥Ü±ÂÅv¸ê°T®É©¹©¹¬Û·í¦³¥Î¡C
Note: pkg/MESSAGE ³oÓÀɤ£»Ýn¥[¶i pkg/PLIST ¸Ì¡C¦P¼Ë¦a¡A¦pªG¨Ï¥ÎªÌ¬O¥Î port ¦Ó«D package¡A¨º¥¦´N¤£·|¦Û°ÊÅã¥Ü¥X¨Ó¡A©Ò¥H§AÀ³¸Ó¦Û¤v¦b post-install ªº¼Ðªº¸Ì§â¥¦Åã¥Ü¥X¨Ó¡C
¦pªG port ¦b¥Î pkg_add ¦w¸Ë binary package ®É»Ýn°õ¦æ©R¥O¡A¥i¥HÂÇ¥Ñ pkg/INSTALL ³oÓ script ¨Ó¹F¦¨¡C³oÓ script ·|¦Û°Ê¥[¶i package ¸Ì¡A¥B·|ÂÇ¥Ñ pkg_add °õ¦æ¨â¦¸¡C²Ä¤@¦¸¬O INSTALL ${PKGNAME} PRE-INSTALL ¦Ó²Ä¤G¦¸¬O INSTALL ${PKGNAME} POST-INSTALL¡C $2 ¥i¥Î¥H½T©w script ¥¿¶i¤J¦óºØ¼Ò¦¡¡C PKG_PREFIX ³oÓÀô¹ÒÅܼƷ|³]©w¬° package ªº¦w¸Ë¥Ø¿ý¡C ¬d¬Ý pkg_add(1) ¥HÀò±o§ó¦h°T®§¡C
Note: ¦pªG¥Î make install ¦w¸Ë port¡A«h¦¹ script ¤£·|¦Û°Ê°õ¦æ¡C¦pªG§A¥²¶·¨Ì¿à¥¦ªº°õ¦æ¡A«h¥²¶·¦b port ªº Makefile ¸Ì©ú½T¦a©I¥s¥¦¡C
¦pªG port »Ýn¨M©w¥¦¬O§_À³¸Ó¦w¸Ë¡A«h¥i«Ø¤@Ó pkg/REQ ``¥²³Æ±ø¥ó(requirements)'' ªº script¡C¦b¦w¸Ë/¤Ï¦w¸Ë®É¥¦·|³Q¦Û°Ê±Ä¥Î¥H¨M©w ¦w¸Ë/¤Ï¦w¸Ëµ{§Ç¬O§_Ä~Äò¶i¦æ¡C
¦³¨Ç port¡A¤×¨ä¬O p5- ªº port¡A¥²¶·¨ú¨M©ó configure ®É¥Îªº¿ï¶µ(©Î¬O¦b p5- ports ®É¬° perl ªºª©¥»)¨Ó§ïÅÜ PLIST¡Cn¨Ï³o§ó®e©ö¤@ÂI¡A¦b PLIST ¸Ìªº %%OSREL%%¡A %%PERL_VER%% ©M %%PERL_VERSION%% ªº¥ô¦ó instance ³£±N³Q¾A·í¦a´À¥N¡C%%OSREL%% ªºÈ¬O§@·~¨t²Îªº×qª©¸¹½X(¦p 2.2.7)¡C %%PERL_VERSION%% ¬O perl §¹¾ãªºª©¥»½s¸¹(¦p 5.00502) ¦Ó %%PERL_VER%% «h¬O perl ª©¥»½s¸¹´î¥h patchlevel (¦p 5.005)¡C
¦pªG¥²¶·°µ¨ä¥¦ªº´À¥N¡A¥i¥H¥Î¦¨¹ïªº VAR=VALUE ªº¦Cªí¨Ó³]©wÅÜ¼Æ PLIST_SUB¡A¦Ó %%VAR%% ªº instance ±N·|³Q PLIST ¸Ìªº VALUE ©Ò¨ú¥N¡C
Á|Ó¨Ò¡A°²¦p¦³Ó port ¦w¸Ë¤F«Ü¦hÀɮצb¤@Ó«ü©wª©¥»ªº¤l¥Ø¿ý¡A ¥i¥H§â¤@ÓÃþ¦ü
OCTAVE_VERSION= 2.0.13 PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}ªºªF¦è©ñ¶i Makefile ¨Ã¦b©Ò¦³ PLIST ¸Ì¥X²{ª©¥»ªº¦ì¸m¨Ï¥Î %%OCTAVE_VERSION%%¡C·Ó³o¤èªk¡A·í§A¤É¯Å port ®É´N¤£¥²§ó§ï PLIST ¸Ì¨º¼Æ(©ÎªÌ¦b¤@¨Ç±¡§Î¤U¡A ¼Æ¦Ê)¦æªºªF¦è¡C
³oºØ´À¥N(¥H¤Î¥ô¦ó man pages) ªº¼W¥[)·|ÂÇ¥ÑŪ¨ú PLIST ©M¼g¤J TMPPLIST(¹w³]¡G WRKDIR/.PLIST.mktmp)¦b do-install ©M post-install ªº¼Ðªº¤§¶¡§¹¦¨ ¦]¦¹°²¦p§A¥^¦£¦a«Ø¥ß PLIST¡A¦b do-install ¸Ì©Î¤§«e³o¼Ë°µ¡C¦P¼Ë¦a¡A ¦pªG port ¥²¶·½s¿èµ²ªGªºÀɮסA¦b post-install ¸Ì¹ï¦W¬° TMPPLIST ªºÀɮ׳o»ò°µ¡C
©Ò¦³¦b¤l¥Ø¿ý pkg ¸ÌªºÀɦW³£¬O¥ÎÅܼƩw¸qªº¡A ©Ò¥H°²¦p»Ýn¥i¥H¦b Makefile ¸Ì§ïÅÜ¥¦Ì¡C ·ín¦b¼ÆÓ port ¶¡¤À¨É¦P¤@Ó¤l¥Ø¿ý pkg¡A ©ÎªÌ¥²¶·¼g¤J¤W±©ÒzÀɮפ¤ªº¬YÓÀÉ®×(¬Ý¬Ý ¦b WRKDIR ¥H¥~ªº¦a¤è¼g¤J¥iª¾¬°¦óª½±µ¼g¤J¤l¥Ø¿ý pkg ¬OÓÄê¤èªk)®É¡A³o¤èªk¯S§O¦a¦³¥Î¡C
³o¸Ì¦³¥÷ÅܼƦWºÙ¤Î¨ä¹w³]Ȫº¦Cªí¡C
ÅÜ¼Æ | ¹w³]È |
---|---|
COMMENT | ${PKGDIR}/DESCR |
DESCR | ${PKGDIR}/DESCR |
PLIST | ${PKGDIR}/PLIST |
PKGINSTALL | ${PKGDIR}/PKGINSTALL |
PKGDEINSTALL | ${PKGDIR}/PKGDEINSTALL |
PKGREQ | ${PKGDIR}/REQ |
PKGMESSAGE | ${PKGDIR}/MESSAGE |
½Ð§ïÅܳo¨ÇÅܼƦӤ£n¶Ã§Ë PKG_ARGS¡C ¦pªG§ïÅܤF PKG_ARGS¡A«h±q port ¦w¸Ë®É¨º¨ÇÀɮ׫K¤£·|³Q¥¿½T¦a¦w¸Ë¨ì /var/db/pkg¡C
¦³¨Ç³nÅé package ¦³³\¥iªº¨î©Î¥i³y¦¨¹Hªk(PKP ¦b public key crypto ªº±M§QÅv¡AITAR (crypto ³nÅ骺¿é¥X)³o¨âÓ«êÄÝ©ó³oºØ)¡C ¹ï³oºØ³nÅé§Ú̪º§@ªk®t²§«Ü¤j¡AºÝ¿à©óÓ§Oªº³\¥iªº½T¹ê»¡ªk¡C
Note: ¨¬°¤@Ó porter¡A¦³³d¥ôn¤F¸Ñ³nÅ骺³\¥i±ø¥ó¡A¨Ã½T«O FreeBSD project ¤£·|¦]¬°«·s´²§Gµ{¦¡½X©Î½sĶ¹Lªº binary ¦Ó¬°¹H¤Ï³\¥it³d¥ô¡A¤£½×¬O¸g¥Ñ ftp ©Î¥úºÐ¡C¦pªG¤£ªÖ©wªº¸Ü½Ð»P FreeBSD ports mailing list <freebsd-ports@FreeBSD.org> Ápô¡C
¦³¨âÓÅܼƥi¥H³]¦b Makefile ¸Ì¥H³B²z¸g±`µo¥Íªº±¡ªp¡G
¦pªG port ¦³``¤£¥i°â¥HÀò§Q''³oºØ§Î¦¡ªº³\¥i¡A³]©wÅÜ¼Æ NO_CDROM ¬°¤@±Ôzì¦]ªº¦r¦ê¡C§ÚÌ·|½T©w³oÃþªº port ¤£·|¦b release ®É¶i¤J¥úºÐ¸Ì¡C¦Ó distfile ©M package ¤´¥i¸g¥Ñ¨ú±o¡C
¦pªG resulting package ¥²¶·¦b¦UÓ¯¸¿W¥ß«Ø¥ß¡A©ÎªÌ resulting binary package ¦]¬°³\¥i¤£±o´²§G¡F³]©wÅÜ¼Æ NO_PACKAGE ¬°¤@±Ôzì¦]ªº¦r¦ê¡C§ÚÌ·|½T©w³oÃþªº package ¤£·|¥X²{¦b ftp ¯¸¤W¡A¤]¤£·|¦b release ®É¶i¤J¥úºÐ¸Ì¡C ¦Ó distfile ¤´·|¥]¬A¦b¨º¨âªÌ¸Ì¡C
°²¦p port ¦³ªk©wªº¨î¥i¨Ï¥Îªº¤H(¦p crypto ¦¹Ãþ)©ÎªÌ¦³ ``«DÀç§Q¥Î³~''ªº³\¥i¡A³]©wÅÜ¼Æ RESTRICTED ¬°±Ôzì¦]ªº¦r¦ê¡C¹ï³oÃþªº port¡A distfiles/packages §Y¨Ï±q§Ú̪º ftp ¯¸¤]µLªk¨ú±o¡C
Note: ²Ä¤@ª©¸ò²Ä¤Gª©ªº GNU ¤j²³¤½¥Îª©Åv(GPL)¹ï port À³¸Ó³£¤£¬OÓ°ÝÃD¡C
Note: ¦pªG§A¬OÓ committer¡A½T©w§A¤]§ó·s¤F ports/LEGAL¡C
·í§Aªº port ¤ñ¨Ó¦Û°_·½§@ªÌªº³Ì·sª©Á٦ѮɡA¥ý½T«O§A¦³³Ì·sªº port¡C ¥i¥H±q ftp mirror ¯¸ªº¥Ø¿ý ports/ports-current ¨ú±o¡C¤]¥i¥H¥Î CVSup ¨Ï¾ãÓ ports collection «O«ù¬°·sªº¡A¦p¦P Section 19.3.3.3 ¸Ì©Ò´yzªº¡C
¤U¤@¨B¬O±H«Hµ¹ maintainer¡A¦pªG port ªº Makefile ¦³¦C¥X¡C¨ºÓ¤H¥i¯à¤w¸g¦bµÛ¤â¤É¯Å¡A ©ÎªÌ¦³²{¦b¤£¤É¯Åªºì¦](¨Ò¦p¦]¬°·sª©¥»ªºÃ©w©Ê°ÝÃD)¡C
¦pªG maintainer n§A¶i¦æ¤É¯Å©Î¬O¨S¦³¥ô¦ó¤H¶}©lµÛ¤â¡A ½Ð°µ¦n¤É¯Å¨Ã§â·sªº©Mªº port ¥Ø¿ýªº recursive diff (unified ©Î context diff ¤]¦n¡A¤£¹L port committer ¦ü¥G¤ñ¸û³ßÅw unified diff) µ¹§ÚÌ(¤ñ¦p¡A¦pªGק諸 port ¥Ø¿ý¬O superedit ¦Ó쥻¦b port tree ¸Ìªº¬O superedit.bak¡A ±µµÛ´N§â diff -ruN superedit.bak superedit ªºµ²ªG±Hµ¹§ÚÌ)¡C½ÐÀˬd¿é¥X°T®§½T©w©Ò¦³ªº§ïÅܳ£¦³¹D²z¡C§â diff ±Hµ¹§Ú̳̦nªº¤èªk´N¬O§â¥¦¥]¬A¶i send-pr(1) (¤ÀÃþ¬° ports)¡C½Ð¦b°T®§¸Ì´£¤Î¼W¥[©Î§R°£ªºÀɮסA ¦]¬°·í commit ®É¥¦Ì¥²¶·³Q©ú½T¦a°O¤J CVS¡C¦pªG diff ¤j©ó 20KB¡A ½Ð§â¥¦À£ÁY¨Ã uuencode¡G¤£µM´N¥un§â¥¦¥]§t¶i¨Ó¦p¦P¥]§t¶i PR¡C
Note: ¦A»¡¤@¦¸¡A½Ð¥Î diff(1) ¨Ó±H¥X²{¦sªº port ªº§ó·s¦Ó¤£n¥Î shar(1)
³o¸Ì¦³¥÷·í¦b porting ¹Lµ{¤¤À³¸Ó»P¤£À³¸Ó¤Uªº©R¥Oªº¦Cªí¡C §AÀ³¸Ó¤ñ¹ï³o¥÷¦Cªí¨ÓÀˬd¦Û¤vªº port¡A¤£¹L¤]¥i¥HÀˬd PR ¸ê®Æ®w¸Ì¨ä¥L¤H´£¥Xªº port¡C¥H Bug Reports and General Commentary ©Ò´yzªº¨Ó´£¥X©ÒÀˬdªº port ªºµù¸Ñ¡CÀˬd PR ¸ê®Æ®w¸Ìªº port ¤£¶ÈÅý§Ú̯à§ó§Ö¦a commit ¥¦Ì¡A ¦Ó¥B¤]ÃÒ©ú¤F§Aª¾¹D§A¦b·F¤°»ò¡C
Do strip binaries. ¦pªG쥻ªºµ{¦¡½X¤w¸g strips the binaries¡A ¨º«Ü¦n¡F§_«h´NÀ³¸Ó¦Û¤v¥[¤@Ó post-install ªº³W«h ¨Ó°µ³o¥ó¨Æ¡C³o¸Ì¦³Ó¨Ò¤l¡G
post-install: strip ${PREFIX}/bin/xdl
¥Î file(1) ³oÓ©R¥O¦b¤@Ó¥i¦w¸Ëªº°õ¦æÀɤW¨ÓÀˬd³oÓ binary ¬O§_¦³³Q strip¡C¦pªG¥¦¨S¦³»¡ not stripped¡A ´Nªí¥Ü³oÓÀɤw¸g³Q strip¡C
¦b *-install ªº¼Ðªº¸Ì¨Ï¥Î bsd.port.mk ¸Ì´£¨Ñªº¥¨¶°«ü¥O¨Ó½T«OÀɮצ³¥¿½Tªº¼Ò¦¡©M¾Ö¦³Åv¡C ³o¨Ç«ü¥O¬O¡G
INSTALL_PROGRAM ³oÓ«ü¥O¬O¦w¸Ë binary ªº¥i°õ¦æÀÉ¡C
INSTALL_SCRIPT ³oÓ«ü¥O¬O¦w¸Ë¥i°õ¦æªº script¡C
INSTALL_DATA ³oÓ«ü¥O¬O¦w¸Ë¥i¤À¨Éªº¸ê®Æ¡C
INSTALL_MAN ³oÓ«ü¥O¬O¦w¸Ë manpage ©M¨ä¥¦ ¤å¥ó(¥¦¤£·|À£ÁY¥ô¦óªF¦è)¡C
³o¨Ç¬O¦³©Ò¦³¾A·íªººX¼Ðªº°ò¥» install «ü¥O¡C ¬Ý¤U±ªº¨Ò¤l¥Hª¾¦p¦ó¨Ï¥Î¥¦Ì¡C
¤£n¦b WRKDIR ¥H¥~¼g¤J¥ô¦óªF¦è¡C WRKDIR ¬O«Ø¥ß port ®É°ß¤@«OÃÒ¥i¼g¤Jªº¦a¤è (±q¥úºÐ½sĶ port ¦³±q°ßŪªº tree ½sĶ port ªº¨Ò¤l)¡C¦pªG¥²¶·×§ï¥ô¦ó PKGDIR ¸ÌªºÀɮסAÂǥѫ·s©w¸q¤@ÓÅܼƨӰµ¡A ¦Ó¤£¬Oª½±µ¼g¤J¡C
½T«O§Aªº port ·|´L·q WRKDIRPREFIX¡C ¤j³¡¥÷ªº port ¤£¥Î¾á¤ß³oÓ¡C¯S§O¬O°²¦p§A°Ñ¦Ò¥t¤@Ó port ªº WRKDIR¡A¥¿½Tªº¦ì¸mÀ³¬° WRKDIRPREFIXPORTSDIR/subdir/name/work ¦Ó¤£¬O PORTSDIR/subdir/name/work ©Î .CURDIR/../../subdir/name/work ©ÎªÌ¤@¨Ç³oÃþªº¡C
¦P¼Ë¦a¡A¦pªG¦Û¤v©w¸q WRKDIR¡A ½T©w§A¦³¦b«e±¥[¤W ${WRKDIRPREFIX}${.CURDIR}¡C
§A¥i¯à·|¹J¨ì¥²»Ýקï©Î¬O¦³±ø¥óªº½sĶªºµ{¦¡½X¡A³on¬Ý¥¦¬O¥H¦óºØª©¥» UNIX ¬°°ò¦¨Ó°õ¦æ¡C¦pªG¬°¤F¦³±ø¥óªº½sĶ¥²¶·¹ïµ{¦¡½X°µ³oÃþªº§ó§ï¡A ½T©w§A¦³ºÉ¶q§â¥¦§ïªº¤@¯ë¤ÆÂI¥H«K§ÚÌ¥i¥H§â port ©¹¦^²¾´Ó¨ì FreeBSD 1.x ªº¨t²Î¦Ó¥B¥i¥H²¾´Ó¨ì¨ä¥¦ªº BSD ¨t²Î¡A¦p·½¦Û CSRG ªº 4.4BSD¡BBSD/386¡B 386BSD¡BNetBSD ©M OpenBSD¡C
¤À¿ë 4.3BSD/Reno (1990) ©M¸û·sª©ªº BSD ªºµ{¦¡½X¸û¦nªº¤èªk¬O¥Î <sys/param.h> ¸Ì©w¸qªº BSD ¥¨¶°«ü¥O¡C§Æ±æ¨ºÓÀɤw¸g³Q¥]¬A¶i¥h¤F¡F °²¦p¨S¦³¡A§â³o¬qµ{¦¡½X¡G
#if (defined(__unix__) || defined(unix)) && !defined(USG) #include <sys/param.h> #endif
¥[¶i .c Àɮ׸̾A·íªº¦ì¸m¡C §Ú̬۫H¥ô¦ó¦³©w¸q³o¨âӲŸ¹ªº¨t²Î³£¦³ sys/param.h¡C¦pªGµo²{¦³¨t²Î¨S¦³¡A §ÚÌ·|«Ü¼Ö·Nª¾¹Dªº¡C½Ð±H«H¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org>¡C
¥t¤@ºØ¤èªk¬O¥Î GNU Autoconf ªº§Î¦¡¨Ó°µ¡G
#ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif
§O§Ñ¤F³oºØ¤è¦¡n¦b Makefile ¸Ìªº CFLAGS ¥[¤W -DHAVE_SYS_PARAM_H¡C
¤@¥¹¥]¬A¤F sys/param.h¡A¥i¥H¥Î¡G
#if (defined(BSD) && (BSD >= 199103))
¨ÓÀˬdµ{¦¡¬O§_¦b 4.3 Net2 code base ©Î§ó·sª©ªº¤W½sĶ(¦p FreeBSD 1.x¡B4.3/Reno¡BNetBSD 0.9¡B386BSD¡BBSD/386 1.1 ©M¤§¤Uªºª©¥»)¡C
¥Î¡G
#if (defined(BSD) && (BSD >= 199306))
¨ÓÀˬdµ{¦¡¬O§_¦b 4.4 code base ©Î§ó·sªº°ò¦¤W½s¸q(¦p FreeBSD 2.x¡B4.4¡BNetBSD 1.0¡BBSD/386 2.0 ©Î³o¤§¤Wªºª©¥»)¡C
¹ï 4.4BSD-Lite2 code base ¦Ó¨¥¡ABSD ¥¨¶°«ü¥OªºÈ¬O 199506¡C ³oÓ³¯z¥u¬O¬°¤F´£¨Ñ°T®§¡C¥¦¤£À³¸Ó³Q¥Î¨Ó¤ÀÅG³æ¯Â¥H 4.4 Lite ¬°°ò¦ªº FreeBSD ª©¥»¥H¤Î¿Ä¦X¤F¨Ó¦Û 4.4-Lite2 ªº§ïÅܪºª©¥»¡C ³o®É«áÀ³¸Ó¥Î __FreeBSD__ ³oÓ¥¨¶°«ü¥O¨Ó´À¥N¡C
Use sparingly:
__FreeBSD__ ©w¸q¦b©Ò¦³ª©¥»ªº FreeBSD ¸Ì¡C °²¦p§A°µªº§ïÅÜ¥u¦³¼vÅT¨ì FreeBSD ´N¥Î¥¦¡C Porting gotchas like the use of sys_errlist[] vs strerror() are Berkeleyisms, not FreeBSD changes.
¦b FreeBSD 2.x ¸Ì¡A__FreeBSD__ ©w¬° 2¡C¦b§ó¦ªºª©¥»«h¬° 1¡C ¸û·sªºª©¥»·|´£¤É³oÓȨӰt¦X¥¦Ìªº¥Dª©¥»½s¸¹¡C
¦pªG¥²¶·¤ÀÅG FreeBSD 1.x ¨t²Î©M FreeBSD 2.x ©Î 3.x ¨t²Î¶¡ªº¤£¦P¡A³q±`¥¿½Tªº¸Ñµª¬O¥Î¤Wzªº BSD ¥¨¶°«ü¥O¡C¦pªG¯uªº¦³±M¬° FreeBSD ªº§ïÅÜ(¦p¥Î¨ì ld®Éªº¯S®í¦@¨É¨ç¦¡¿ï¶µ)¨º´N¥i¥H¥Î __FreeBSD__ ©M #if __FreeBSD__ > 1 ¨Ó»{¥X FreeBSD 2.x ©M¨ä¤§«áªº¨t²Î¡C ¦pªG»Ýn§ó¦h²Ó¸`¨Ó»{¥X 2.0-RELEASE ¤§«áªº FreeBSD ¨t²Î¡A ¥i¥H¥Î¤U±ªº¤èªk¡G
#if __FreeBSD__ >= 2 #include <osreldate.h> # if __FreeBSD_version >= 199504 /* 2.0.5+ release specific code here */ # endif #endif
Release | __FreeBSD_version |
---|---|
2.0-RELEASE | 119411 |
2.1-CURRENT | 199501, 199503 |
2.0.5-RELEASE | 199504 |
2.1 ¤§«eªº 2.2-CURRENT | 199508 |
2.1.0-RELEASE | 199511 |
2.1.5 ¤§«eªº 2.2-CURRENT | 199512 |
2.1.5-RELEASE | 199607 |
2.1.6 ¤§«eªº 2.2-CURRENT | 199608 |
2.1.6-RELEASE | 199612 |
2.1.7-RELEASE | 199612 |
2.2-RELEASE | 220000 |
2.2.1-RELEASE | 220000 (¤£ÅÜ) |
2.2.1-RELEASE ¤§«áªº 2.2-STABLE | 220000 (¤£ÅÜ) |
2.2-STABLE after texinfo-3.9 | 221001 |
2.2-STABLE after top | 221002 |
2.2.2-RELEASE | 222000 |
2.2.2-RELEASE ¤§«áªº 2.2-STABLE | 222001 |
2.2.5-RELEASE | 225000 |
2.2.5-RELEASE ¤§«áªº 2.2-STABLE | 225001 |
¨Ö¤J ldconfig -R ¤§«áªº 2.2-STABLE | 225002 |
2.2.6-RELEASE | 226000 |
2.2.7-RELEASE | 227000 |
2.2.7-RELEASE ¤§«áªº 2.2-STABLE | 227001 |
semctl(2) §ïÅܫ᪺ 2.2-STABLE | 227002 |
2.2.8-RELEASE | 228000 |
2.2.8-RELEASE ¤§«áªº 2.2-STABLE | 228001 |
mount(2) §ïÅÜ«eªº 3.0-CURRENT | 300000 |
mount(2) §ïÅܫ᪺ 3.0-CURRENT | 300001 |
semctl(2) §ïÅܫ᪺ 3.0-CURRENT | 300002 |
ioctl arg §ïÅܫ᪺ 3.0-CURRENT | 300003 |
Âà´«¬° ELF «áªº 3.0-CURRENT | 300004 |
3.0-RELEASE | 300005 |
3.0-RELEASE ¤§«áªº 3.0-CURRENT | 300006 |
3/4 ¤À¤ä«áªº 3.0-STABLE | 300007 |
3.1-RELEASE | 310000 |
3.1-RELEASE «áªº 3.1-STABLE | 310001 |
C++ constructor/destructor order §ïÅܫ᪺ 3.1-STABLE | 310002 |
3.2-RELEASE | 320000 |
3.2-STABLE | 320001 |
binary-incompatible IPFW ©M socket §ïÅܫ᪺ 3.2-STABLE | 320002 |
3.3-RELEASE | 330000 |
3.3-STABLE | 330001 |
mkstemps() ¥[¶i libc «áªº 3.3-STABLE | 330002 |
3/4 ¤À¤ä«áªº 4.0-CURRENT | 400000 |
°ÊºA³sµ²¾¹ªººÞ²z§ïÅܫ᪺ 4.0-CURRENT | 400001 |
C++ constructor/destructor order §ïÅܫ᪺ 4.0-CURRENT | 400002 |
dladdr(3) °_§@¥Î«áªº 4.0-CURRENT | 400003 |
__deregister_frame_info °ÊºA³sµ²¾¹ªº¿ù»~×¥¿«áªº 4.0-CURRENT (¾ã¦X EGCS 1.1.2 «áªº 4.0-CURRENT ¤]¬O) | 400004 |
suser(9) API §ïÅܫ᪺ 4.0-CURRENT (newbus ¤§«áªº 4.0-CURRENT ¤]¬O) | 400005 |
cdevsw registration §ïÅܫ᪺ 4.0-CURRENT | 400006 |
4.0-CURRENT after the addition of so_cred for socket level credentials | 400007 |
4.0-CURRENT after the addition of a poll syscall wrapper to libc_r | 400008 |
§ó´« kernel ªº dev_t ®æ¦¡¬° struct specinfo «ü¼Ð«áªº 4.0-CURRENT | 400009 |
×¥¿ jail(2) ªºº|¬}«áªº 4.0-CURRENT | 400010 |
sigset_t ªº¸ê®Æ®æ¦¡§ïÅܫ᪺ 4.0-CURRENT | 400011 |
§ó·s¦Ü GCC 2.95.2 ½sĶ¾¹«áªº 4.0-CURRENT | 400012 |
4.0-CURRENT after adding pluggable linux-mode ioctl handlers | 400013 |
¿é¤J OpenSSL «áªº 4.0-CURRENT | 400014 |
GCC 2.95.2 ¸Ìªº C++ ABI ¥Ñ¹w³]ªº -fno-vtable-thunks §ï¬° -fvtable-thunks «áªº 4.0-CURRENT | 400015 |
Note: ª`·N¤@¤U¦³®É«á 2.2-STABLE ·|¥H¬°¦Û¤v¬O¦b 2.2.5-RELEASE «áªº ``2.2.5-STABLE''¡C쥻¸Ó¼Ë¦¡¬O¦~¥÷«áºò±µµÛ¤ë¥÷¡A ¤£¹L±q 2.2 ¶}©l§Ų́M©w§ï¬°§óª½±µªº ¥Dnªº/¦¸nªº ¨t²Î¡C ³o¬O¦]¬°¤@¨Ç¤À¤äªº¥¦æµo®iÅý²³æ¦a¥ÎÄÀ¥X¤é´Á¨Ó¤ÀÃþÅܱo¤£¥i¦æ¡C ¦pªG§A¥¿¦b°µ¤@Ó port¡A¤£¥Î¾á¤ßªº -CURRENT¡F ¥¦Ì·|¦C¦b³o´N¬O¬°¤FÅý§A°Ñ¦Ò¡C
¦b¤w¸g°µ¦nªº¼Æ¦ÊÓ port ¸Ì¡A¥u¦³¤Ö¼Æ¤@¨âÓ±¡§ÎÀ³¸Ó¤w¸g¥Î¨ì¤F __FreeBSD__¡C¥u¦]¬°¤@Ó¸û¦ªº port §Ë¶Ã¤F¥¦¨Ã§â¥¦¥Î¿ù¦a¤è¤£¥Nªí§A¤]À³¸Ó³o»ò°µ¡C
¤£n¦b .include <bsd.port.mk> ³o¦æ«á¼g¤W¥ô¦óªF¦è¡C³o³q±`¥i¥HÂǥѦb§Aªº Makefile ¤¤¶¡¬Y³B§t¦³ bsd.port.pre.mk ©Mµ²§À¦³ bsd.port.post.mk ¨ÓÁקK¡C
Note: §A¥²¶·§t¦³ pre.mk/post.mk ³o¤@¹ï©Î¬O¥u¦³ bsd.port.mk¡F ¤£n§â¨âªÌ²V¦b¤@°_¡C
bsd.port.pre.mk ¥u¦³©w¸q¤Ö¼Æ¥i¥H©ñ¦b Makefile ¥Î¨Ó´ú¸ÕªºÅܼơA bsd.port.post.mk ©w¸q¨ä¾lªºÅܼơC
³o¸Ì¦³´XÓ©w¸q¦b bsd.port.pre.mk ¸Ìªº«nÅܼÆ(³o¤£¬O§¹¾ãªº¦Cªí¡An¬Ý§¹¾ãªº½Ð¬Ý bsd.port.mk)¡C
ÅÜ¼Æ | ´yz |
---|---|
ARCH | ¨t²Î¬[ºc·|ÂÇ¥Ñ uname -m ¦^¶Ç(¦p i386) |
OPSYS | §@·~²Ó²Î§Î¦¡¡A¥Ñ uname -s ¦^¶Ç(¦p FreeBSD) |
OSREL | §@·~¨t²Îªº release ª©¥»(¦p 2.1.5 ©Î 2.2.7) |
OSVERSION | ¥Î¼Æ¦rªí¥Üªº§@·~¨t²Îª©¥»¡A¸ò __FreeBSD_version ¤@¼Ë¡C |
PORTOBJFORMAT | ¨t²Îªºª«¥ó®æ¦¡(aout ©Î elf |
LOCALBASE | ``local'' tree ªº°ò©³(¦p /usr/local/) |
X11BASE | ``X11'' tree ªº°ò©³(¦p /usr/X11R6) |
PREFIX | port ¸Ó§â¦Û¤v¸Ë¨ìþ¸Ì(¬Ý more on PREFIX). |
Note: ¦pn¥²¶·©w¸qÅÜ¼Æ USE_IMAKE¡A USE_X_PREFIX ©Î MASTERDIR¡A ¦b¥]¬A bsd.port.pre.mk «e°µ³o¥ó¨Æ¡C
³o¸Ì¦³´XÓ¥i¥H¼g¦b bsd.port.pre.mk «áªº¨Ò¤l¡F
# no need to compile lang/perl5 if perl5 is already in system .if ${OSVERSION} > 300003 BROKEN= perl is in system .endif # only one shlib version number for ELF .if ${PORTOBJFORMAT} == "elf" TCL_LIB_FILE= ${TCL_LIB}.${SHLIB_MAJOR} .else TCL_LIB_FILE= ${TCL_LIB}.${SHLIB_MAJOR}.${SHLIB_MINOR} .endif # software already makes link for ELF, but not for a.out post-install: .if ${PORTOBJFORMAT} == "aout" ${LN} -sf liblinpack.so.1.0 ${PREFIX}/lib/liblinpack.so .endif
¦pªG³nÅ馳¼Ð·Çªº man ©M info ¥H¥~§A»{¬°¹ï¨Ï¥ÎªÌ¦³¥Îªº¤å¥ó¡A §â¥¦¦w¸Ë¨ì PREFIX/share/doc ¤U¡C¦p¦P«e±ªº¶µ¥Ø¡A³o¥i¥H¦b post-install ªº¼Ðªº¸Ì°µ¨ì¡C
¬°§Aªº port «Ø¤@Ó·sªº¥Ø¿ý¡C¸Ó¥Ø¿ýÀ³¸Ón¯à¤ÏÀ³¸Ó port ¬°¦óª«¡C ³o³q±`·N¿×µÛ PKGNAME ´î¥hª©¥»ªº³¡¥÷¡C µM¦Ó¡A¦pªG»{¬°¨Ï¥ÎªÌ¥i¯à¦P®É¦w¸Ë¤£¦Pª©¥»ªº port¡A¨º´N¥i¥H¥Î¾ãÓ PKGNAME¡C
Åý¦w¸Ëªº°Ê§@¨Ì¿àÅÜ¼Æ NOPORTDOCS ¥H«K¨Ï¥ÎªÌ¥i¥H¦b /etc/make.conf Åý¥¦¥¢¥Î§@¥Î¡A ¦p¤U¡G
post-install: .if !defined(NOPORTDOCS) ${MKDIR}${PREFIX}/share/doc/xv ${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv .endif
§O§Ñ¤F¤]§â¥¦Ì¥[¶i pkg/PLIST¡I (¦b³oÃ䤣¥Î¾á¤ß NOPORTDOCS¡F¥Ø«e package ¨S¦³¿ìªk±q /etc/make.conf Ū¨úÅܼơC)
¤]¥i¥H¥Î pkg/MESSAGE ³oÓÀÉÅý¦w¸Ë®ÉÅã¥Ü°T®§¡C ¬Ý ¨Ï¥Î pkg/MESSAGE ªº³¹¸`¨ÓÀò±o§ó¦h²Ó¸`¡C
Note: MESSAGE ¤£»Ýn¥[¶i pkg/PLIST ¸Ì¡C
¤£nÅý port §Ë¶Ã¤F /usr/ports/distfiles¡C ¦pªG port »Ýn§ì«Ü¦hÀɮסA©Î¬O§t¦³ÀɦW¥i¯à·|©M¨ä¥¦ port ¬Û½ÄªºÀÉ®×(¦p¡AMakefile)¡A§â DIST_SUBDIR ³]¬° port ªº¦WºÙ(¨S¦³ª©¥»ªº³¡¥÷ªº PKGNAME À³¸Ó´N¦æ¤F)¡C³o¼Ë·|§â DISTDIR ±q¹w³]ªº /usr/ports/distfiles §ï¬° /usr/ports/distfiles/DIST_SUBDIR¡A ¹ê»Ú¤W¨Ã§â port »Ýnªº©Ò¦³ªF¦è³£©ñ¶i¨ºÓ¤l¥Ø¿ý¡C
¥¦¦b¥Dnªº³Æ¥÷¯¸ ftp.FreeBSD.org ¤W¤]¬O¬Ý¦P¦Wªº¤l¥Ø¿ý¡C(¦b Makefile ©ú½T¦a³]©w DISTDIR ¤£·|°µ¨ì³o¤@ÂI¡A©Ò¥H½Ð¥Î DIST_SUBDIR¡C)
Note: ³o¤£·|¼vÅT Makefile ¸Ì³]©wªº MASTER_SITES¡C
§â package ªº¸ê°T¥]¬A¨ì pkg ¸Ì¡A¦p. COMMENT¡ADESCR¡A©M PLIST¡C
Note: ³o¨ÇÀɮפw¤£¦A¥u¥Î©ó¥]¸Ë¡A²{¦b§Y¨Ï³]©w¤F NO_PACKAGE ³o¨ÇÀɮפ´¬O¥²nªº¡C
¤£n§â RCS ¦r¦ê©ñ¶i patch ¸Ì¡C·í§Ú̧âÀɮשñ¶i ports tree ®É CVS ·|§â¥¦Ì¤Á¥h¡A¦Ó·í§ÚÌÀˬd®É¤S¤@¦¸¡A ³o¼Ë¥¦Ì·|Åܱo¤£¤@¼Ë¦Ó¥B patch ·|¥¢±Ñ¡CRCS ¦r¦ê¥Ñ dollar ²Å¸¹($)³ò°_¨Ó¡A¤@¯ë¨Ó»¡¥Ñ $Id ©Î $RCS °_ÀY¡C
¹ï diff ¨Ï¥Î»¼°j¿ï¶µ(-r) diff ¨Ó²£¥Í patch ·|¦n¦h¤F¡A¤£¹L½Ð¬Ý¤@¤U³Ì«áªº patch ¨Ó½T©w¨S¦³¥ô¦ó¤£»Ýnªº©U§£¦b¸Ì±¡C¤×¨ä¬O¨âӳƥ÷Àɶ¡ªº diff¡A ©M·í port ¥Î Imake ©Î GNU configure µ¥µ¥®Éªº Makefiles ¤]¤£»Ýn¦Ó¸Ó¬å±¼¡C¦pªG¥²¶·½s¿è configure.in ¨Ã°õ¦æ autoconf ¨Ó«·s²£¥Í configure¡A¤£n°µ configure ªº diff (³o³q±`·|¼Æ¤d¦æ¡I)¡F©w¸q USE_AUTOCONF=yes ¨Ã°µ configure.in ªº diff¡C
¦P¼Ë¦a¡A¦pªG¥²¶·¬å±¼ÀɮסA¨º´N¼g¦b post-extract ªº¼Ðªº¸Ì¨Ó°µ¦Ó¤£n§Ë¬° patch ªº¤@³¡¥÷¡C¦pªG¹ï³Ì²×ªº diff º¡·N¡A ½Ð§â¥¦¤À³Î¦¨¤@Ó patch ´N¹ïÀ³¤@Óì©lÀÉ¡C
¸ÕµÛÅý port ¦w¸Ë¦Ü¬Û¹ï©ó PREFIX (³oÓÈÀ³¸Ó³]¬° LOCALBASE (¹w³]¬O /usr/local)¡A°£«D¤w¸g³]¤F USE_X_PREFIX ©Î USE_IMAKE¡A ³o¼Ëªº¸Ü´NÀ³¸Ó¬O X11BASE (¹w³]¬O /usr/X11R6)¡C)ªº¦ì¸m¡C
¤£n§â /usr/local ©Î /usr/X11R6 ¼g¦º¦bµ{¦¡½Xªº¥ô¦ó¦a¤è¡A ³o·|Åý port §ó¦³¼u©Ê¦Ó¥B¥i¥Hªï¦X¨ä¥¦¯¸ªº»Ý¨D¡C¹ï¥Î imake ªº X port ¨Ó»¡¡A³o¬O¦Û°Ê²£¥Íªº¡F ¤£µM©¹©¹¥i¥H¶ÈÂǥѧâ port ¸Ì¦UÓ scripts/Makefiles ¥X²{ /usr/local (¨S¦³¥Î imake ªº X port ´N¬O /usr/X11R6) ªº¦a¤è¨ú¥N¬°¥hŪ¨ú PREFIX ¨Ó¹F¦¨¡A ¦]¬°³oÓÅܼƷ|¦Û°Ê¦a©¹¤U¶Ç¦Ü«Ø¥ß»P¦w¸Ë¹Lµ{¤¤ªº¨CÓ¶¥¬q¡C
¤£n³] USE_X_PREFIX¡A°£«D§Aªº port ¯uªº»Ýn¥¦ (¨Ò¦p¡A¥¦³sµ² X ªº¨ç¦¡©Î¥¦¥²¶·°Ñ¦Ò¨ì X11BASE ¸ÌªºÀÉ®×)¡C
PREFIX ³oÓÅܼƥi¥H¦b§Aªº Makefile ©Î¨Ï¥ÎªÌªºÀô¹Ò¸Ì«·s«ü©w¡CµM¦Ó¡A ¦b³æ¿W port ªº Makefiles ©ú½T¦a³]©w³oÓÅܼƬO¬Û·í¥O¤H·P¨ì®ð¾kªº¡C
¦P¼Ë¦a¡A¥Î¤W±´£¨ìªºÅܼƨӰѦҨ䥦 port ªºµ{¦¡/ÀɮסA ¦Ó«D¥Î©ú½Tªº¸ô®|¦WºÙ¡CÁ|Ó¨Ò¡A¦pªG port »Ýn¤@Ó§¹¾ãªº less ¸ô®|¦WºÙ°µ¬°¥¨¶° PAGER¡A ¥Î½sĶ¾¹ªººX¼Ð¡G
-DPAGER=\"${PREFIX}/bin/less\"©Î
-DPAGER=\"${LOCALBASE}/bin/less\"¦pªG³o¬O¤@Ó X port¡A¨ú¥N±¼ -DPAGER=\"/usr/local/bin/less\"¡C ³o¼Ë°²¦p¨t²ÎºÞ²zªÌ§â¾ãÓ `/usr/local' tree ²¾¨ì¨ä¥¦¦a¤è¡A ¥¦·|¦³¸û¨Îªº¾÷·|¥i¥H¹B§@¡C
¸ÕµÛÅý port §âªF¦è©ñ¨ì PREFIX ¤U¥¿½Tªº¤l¥Ø¿ý¡C ¦³¨Ç port §â©Ò¦³ªF¦è»E¦b¨Ã©ñ¶i»P port ¦P¦Wªº¤l¥Ø¿ý¡A³o¬O¤£¹ïªº¡C ¦P¼Ë¦a¡A¦³«Ü¦h port §â binaries¡Aheader files ©M manual pages ¥H¥~ªº©Ò¦³ªF¦è©ñ¨ì lib ªº¤@Ó¤l¥Ø¿ý¤U¡A³o¹ï BSD ªº¼Ò½d¨Ã¤£¬OÓ¦n¥üÀY¡C³o¸Ì±¦³«Ü¦hÀɮ׳£À³¸Ó²¾¨ì¤U±©Ò¦C¦ì¸mªº¨ä¤¤¤@Ó¡G etc (setup/configuration ÀÉ)¡A libexec (¤º³¡±Ò°Êªº¥i°õ¦æÀÉ)¡A sbin (superusers/managers ¥Îªº¥i°õ¦æÀÉ) info (¬° info ÂsÄý¾¹°µªº¤å¥ó) ©Î share (»P¬[ºcµLÃöªºÀÉ®×)¡C¸Ô²Ó¸ê®Æ°Ñ¦Ò man hier(7)¡A¤ä°t /usr ªº³W«h¦³¬Û·í¦hªº³¡¥÷¤]¾A¥Î¦b /usr/local¡C °£¤F³B²z USENET ``news'' ªº port ¥H¥~¡C¥¦Ì¥H PREFIX/news ¬°Àɮץتº¦a¡C
·í port ³Q¤Ï¦w¸Ë®ÉÅý¥¦¯à²M²z°®²b¡C³o³q±`ÂǥѬ°¨CÓ©ú½T¦a¥Ñ port «Ø¥ßªº¥Ø¿ý¥[¤W @dirrm ³o´X¦æ¨Ó¹F¦¨¡C ¦b§R°£ parent ¥Ø¿ý«e¥²¶·¥ý§R°£¤l¥Ø¿ý¡C
: lib/X11/oneko/pixmaps/cat.xpm lib/X11/oneko/sounds/cat.au : @dirrm lib/X11/oneko/pixmaps @dirrm lib/X11/oneko/sounds @dirrm lib/X11/oneko
µM¦Ó¦³®É«á @dirrm ·|¥X²{¿ù»~¦]¬°¨ä¥¦ªº port ¤]¦b¦@¥Î¦P¤@Ó¤l¥Ø¿ý¡C¥i¥H±q @unexec ©I¥s rmdir ¨Ó²¾°£ªÅ¥Ø¿ý¦Ó¤£¥X²{ĵ§i¡C
@unexec rmdir %D/share/doc/gimp 2>/dev/null || true
³o±N¤£·|¦L¥X¥ô¦ó¿ù»~°T®§¡A¤]¤£·|³y¦¨ pkg_delete ¤£¥¿±`¸õ¥X§Y¨Ï PREFIX/share/doc/gimp ¤£¬OªÅªº¡A¥Ñ©ó¨ä¥¦ port §â¤@¨ÇÀɮ׸˦b¸Ì±¡C
¦pªG»Ýn¦w¸Ëªº¨t²Î¤W¦³¯S©wªº¬Y¨Ï¥ÎªÌ¡AÅý pkg/INSTALL script ©I¥s pw ¨Ó¦Û°Ê«Ø¥ß¥¦¡C¨Ò¤l¥i¦b net/cvsup-mirror ¬Ý¨ì¡C
¦pªG port ¦w¸Ë¤@Ó binary package ®É¥²¶·¨Ï¥Î»P½sĶ®É¬Û¦Pªº¨Ï¥ÎªÌ/¸s²Õ(user/group) ID ½s¸¹¡A ¨º´N¥²¶·±q 50 ¨ì 99 ¿ï¾Ü¤@Ó¥¼³Q¦û¥Îªº UID ¨Ãµn°O¥¦¡C ¨Ò¤l¥i¨ì japanese/Wnn ¬Ý¡C
½T©w§A¨S¦³¥Î¤@Ó¤w¸g³Q¨t²Î©Î¨ä¥¦ port ¦û¥Îªº UID¡C ³o¸Ì¬O²{¦b 50 ¨ì 99 ¶¡ªº UID ªº¦Cªí¡C
majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico xten:*:67:67:X-10 daemon:/usr/local/xten:/nonexistent pop:*:68:6:Post Office Owner (popper):/nonexistent:/nonexistent wnn:*:69:7:Wnn:/nonexistent:/nonexistent ifmail:*:70:66:Ifmail user:/nonexistent:/nonexistent pgsql:*:70:70:PostgreSQL pseudo-user:/usr/local/pgsql:/bin/sh ircd:*:72:72:IRCd hybrid:/nonexistent:/nonexistent alias:*:81:81:QMail user:/var/qmail/alias:/nonexistent qmaill:*:83:81:QMail user:/var/qmail:/nonexistent qmaild:*:82:81:QMail user:/var/qmail:/nonexistent qmailq:*:85:82:QMail user:/var/qmail:/nonexistent qmails:*:87:82:QMail user:/var/qmail:/nonexistent qmailp:*:84:81:QMail user:/var/qmail:/nonexistent qmailr:*:86:82:QMail user:/var/qmail:/nonexistent msql:*:87:87:mSQL-2 pseudo-user:/var/db/msqldb:/bin/sh mysql:*:88:88:MySQL Daemon:/var/db/mysql:/sbin/nologin
·í´£¥X¤@Ón¹w¯d³o½d³ò¤º·sªº UID ©Î GID ªº port (©Î¤É¯Å)®É¡A ½Ð¥]¬A¶i¤@Ó¤½§i¡C³o·|®e³\§Ú̧â¹w¯dªº ID ¦Cªí«O«ù¦b³Ì·sª¬ºA¡C
Makefile À³¸Ó²³æ¨Ã¦X²z¦a°µ¨Æ¡C ¦pªG¯àÅý¨â¤T¦æÅܱo§óµu©Î§ó¦X¸Ì¡A¨º´N³o»ò°µ§a¡C³o¨Ç¨Ò¤l¥]¬A¥Î .if construct ¨Ó´À¥N shell¡A¦pªG¥i¥H«·s©w¸q EXTRACT* ´N¤£n¦A©w¸q do-extract¡AÁÙ¦³¥Î GNU_CONFIGURE ¨Ó´À¥N CONFIGURE_ARGS += --prefix=${PREFIX}¡C
port À³¸Ó´L« CFLAGS ³oÓÅܼơC ¦pªG¨S¦³½Ð¥[¤W NO_PACKAGE=ignores cflags ¨ì Makefile ¸Ì¡C
¦pªG port »Ýn©ñ¤@¨Ç configuration Àɦb PREFIX/etc ¸Ì¡A ¤£n¥u¬O¦w¸Ë¥¦Ì¨Ã¦C¦b pkg/PLIST ¸Ì¡C³o·|³y¦¨ pkg_delete §R°£¨Ï¥ÎªÌ¶O¤ß½s¿èªºÀɮשM³Q·sªº¦w¸Ë§¹¥þ®ø°£¡C
¤Ï¤§¡A¦w¸Ë¦³¦r§À»yªº¼Ë«~ÀÉ (filename.sample ´N¤£¿ù)¨Ã¦L¥X¤@¬qmessage «ü©ú¨Ï¥ÎªÌ¦b¸Ó³nÅé¯à¹B§@¿ú¥²¶·¥ý«þ¨©¨Ã½s¿è¸ÓÀɮסC
¦b´£¥X©Î commit ¤§«e¥Î portlint Àˬd¦¨ªG¡C
§â¾A¦Xªº§ïÅÜ/patch ±Hµ¹ì¥ýªº§@ªÌ/maintainer ¥H¦b¤U¤@ÓÄÀ¥Xªºµ{¦¡½X¥]§t¶i¥h¡C³o¥u·|Åý§A¦b¤U¤@ª©ªº¤u§@§ó»´ÃP¡C
pkg/DESCR¡Apkg/COMMENT¡A ©M pkg/PLIST ¨CÓÀɳ£À³¸Ó¥[¿Àˬd¡C ¦pªG«·sÀ˵ø¤@Ó port ¨Ãı±o¥i¥Hªí¹Fªº§ó¦n¡A´N°µ§a¡C
¤£n½Æ»sÃB¥~ªº GNU ¤j²³¤½¥Îª©Åv(GPL) ªº½Æ¥»¨ì§Ú̪º¨t²Î¡A«ô¦«¡C
½Ð¤p¤ßª`·N¥ô¦óªºªk«ßijÃD¡I¤£nÅý§Ú̹Hªk´²§G³nÅé¡I
¦b°Ý§ÚÌ¥ô¦ó°ÝÃD«e¥ý¬Ý²{¦sªº¨Ò¤l©M bsd.port.mk ÀÉ¡I ;)
¦pªG¦³¥ô¦ó³Â·Ð´N°Ý§Ú̧a¡I¤£n¥ÎÀY¥h¼²Àð¡I:-)
³o¸Ì¦³Ó Makefile ªº¼Ë«~¥i¥H¥Î¨Ó³Ð³y¤@Ó·sªº port¡C½T©w¤w²¾°£©Ò¦³ÃB¥~ªº»¡©ú(¤è¬A©·¤ºªºªF¦è)¡I
«Øij§A¸òµÛ³oӮ榡(Åܼƪº¦¸§Ç¡A³¹¸`¶¡ªºªÅ¦æµ¥µ¥)¡C ³oӮ榡³Q³]p©ó®e©ö§ä¨ì¤j³¡¥÷ªº«n°T®§¡C§ÚÌ«Øij¥Î portlint ¨ÓÀˬd Makefile¡C
[ÀÉÀY...¥u¬OÅý§ÚÌ®e©ö½T»{ port¡C] # New ports collection makefile for: xdvi [·í¤É¯Å¤@Ó port ®É version required ªºÀÉÀYÀ³¸Ó§ó·s¡C] # Version required: pl18 [things like "1.5alpha" are fine here too] [³o¬O³oÓ Makefile ªº²Ä¤@ª©³Ð³y®Éªº¤é´Á¡C§ó·s port ®Éµ´¤£n§ïÅܳoÓ¡C] # Date created: 26 May 1995 [³o¬O°µ¥X³Ìªìªº port µ¹ FreeBSD ªº¤H¡A¤×¨ä¬O¼g¥X³oÓ Makefile ²Ä¤@ª©ªº¤H¡C °O¦í¡A¥H«á¤É¯Å port ®É³o¤£À³¸Ó§ïÅÜ¡C] # Whom: Satoshi Asami <asami@FreeBSD.org> # # $FreeBSD$ [ ^^^^^^^^^ ·í¥¦³Q commit ¨ì§Ú̪º¶JÂîw®É·|³Q CVS ¦Û°Ê¦a¥H RCS ID ¦r¦ê¨ú¥N¡C ¦pªG¤É¯Å port¡A¤£n§â³o¦æ§ï¦^ "$FreeBSD$"¡CCVS ·|¦Û°Ê³B²z¡C] # [¥Î¨Ó´yz port ¥»¨©M¥D¯¸ªº³¹¸` - DISTNAME ¥Ã»·³Ì¥ý¡A¸òµÛ¬O PKGNAME(¦pªG»Ýn)¡A CATEGORIES¡AµM«á¬O MASTER_SITES¡AMASTER_SITE_SUBDIR ¥i¥H¸ò¦b¨ä«á¡C ¦b³o¨Ç¤§«á¡AEXTRACT_SUFX ©Î DISTFILES ¤¤¤§¤@¤]¥i¥H¸Ô¸ü¡C]ü DISTNAME= xdvi PKGNAME= xdvi-pl18 CATEGORIES= print [¦pªG¤£¬O¥Î MASTER_SITE_* ¥¨¶°§O§Ñ¤F³Ì«áªº±×½u ("/")¡I] MASTER_SITES= ${MASTER_SITE_XCONTRIB} MASTER_SITE_SUBDIR= applications [¦pªGµ{¦¡½X¤£¬O¥Î¼Ð·Çªº ".tar.gz" µ²ºc´N³]©w³oÓ] EXTRACT_SUFX= .tar.Z [´²§Gªº patch ªº³¹¸` -- ¥i¥HªÅµÛ] PATCH_SITES= ftp://ftp.sra.co.jp/pub/X11/japanese/ PATCHFILES= xdvi-18.patch1.gz xdvi-18.patch2.gz [maintainer; *©e°UºÞ²zªº*¡I³o¬O¤@ӨϥΪ̦³°ÝÃD©M bug ¦^³ø®ÉÁpµ¸ªº¤H (³Ì¦n¦³ commit ªº¯SÅv) - ³oÓ¤HÀ³¸Ó¬O porter ©Î¬O¥i¥H§Y¨è¦X²z¦a¶Ç¹F°ÝÃDµ¹°_ªìªº porter ªº¤H¡C¦pªG¯uªº¤£·Q¦b³o¼g¤W¦ì§}¡A´N³]¬° "ports@FreeBSD.org"¡C] MAINTAINER= asami@FreeBSD.org [dependencies -- ¥i¥HªÅµÛ] RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript LIB_DEPENDS= Xpm.5:${PORTSDIR}/graphics/xpm [³oÓ³¹¸`¬O¬°¤F¤£ÄÝ©ó¤W±¥ô¤@³¹ªº¨ä¥¦¼Ð·Çªº bsd.port.mk ÅܼÆ] [¦pªG¦b configure¡A«Ø¥ß¡A¦w¸Ë...ªº¹Lµ{¤¤·|°Ý°ÝÃD] IS_INTERACTIVE= yes [¦pªG¥¦¸Ñ¨ì ${DISTNAME} ... ¥H¥~ªº¥Ø¿ý] WRKSRC= ${WRKDIR}/xdvi-new [¦pªG´²§Gªº patch ¨S¦³¬Û¹ï©ó ${WRKSRC}¡A¥i¯à±o¶O¤ß³B²z³oÓ] PATCH_DIST_STRIP= -p1 [¦pªG¥¦»Ýn°õ¦æ¤@ GNU autoconf ²£¥Íªº "configure" script] GNU_CONFIGURE= yes [¦pªG¥¦¶·n¥Î GNU make ¨Ó«Ø¥ß...¡A¦Ó¤£¬O /usr/bin/make] USE_GMAKE= yes [¦pªG¥¦¬O¤@Ó X À³¥Îµ{¦¡¥B»Ýn°õ¦æ "xmkmf -a"] USE_IMAKE= yes [et cetera.] [¥Î¦b¤U±³W«hªº«D¼Ð·ÇÅܼÆ] MY_FAVORITE_RESPONSE= "yeah, right" [¦A¨Ó¬O¯S®íªº³W«h¡A¥H¥¦Ì³Q©I¥sªº¶¶§Ç±Æ¦C] pre-fetch: i go fetch something, yeah post-patch: i need to do something after patch, great pre-install: and then some more stuff before installing, wow [µM«á´N¬Oµ²§À¤F] .include <bsd.port.mk>
º¥ý¡A½T©w port ¤w´X¥G§¹¦¨¡A¥u¯Ê PLIST¡C ³Ð³y¤@ӪŪº PLIST¡C
# touch PLIST
¦A¨Ó¡A³Ð³y¤@²Õ port ¥i¥H¦w¸Ëªº·s¥Ø¿ý¡A¨Ã¦w¸Ë¥ô¦óªº dependency¡C
# mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/port-name # make depends PREFIX=/var/tmp/port-name
§â¥Ø¿ýªºµ²ºc¦s¦b¤@Ó·sÀɮ׸̡C
# (cd /var/tmp/port-name && find * \! -type d) > OLD-DIRS
¦pªG port ´L·q PREFIX (¥¦À³¸Ó¦p¦¹) ±µµÛ´N¥i¥H¦w¸Ë port ¨Ã³Ð³y package ¦Cªí¡C
# make install PREFIX=/var/tmpport-name # (cd /var/tmp/port-name && find * \! -type d) > pkg/PLIST
§A¤]¥²¶·§â¥ô¦ó³Ì·s³Ð³yªº¥Ø¿ý¥[¶i¥]¸Ë¦Cªí¡C
# (cd /var/tmp/port-name && find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm#' >> pkg/PLIST
³Ì«á¡A¥²¶·¦Û¤v°Ê¤â¾ã²z¥]¸Ë¦Cªí¡C·í§Ú»¡³o¬O¥þ¦Û°Ê®É§Ú¼»¤FÓÁÀ¡C Manual pages À³¸Ó¦C¦b port ªº Makefile ¸Ìªº MANn ¤U¡A ¦Ó¤£¬O¦b¥]¸Ë¦Cªí¸Ì¡C¨Ï¥ÎªÌªº configuration ÀÉÀ³¸Ó²¾°£¡A©Î¬O¦w¸Ë¬° filename.sample¡C ¥ô¦ó port ¦w¸Ëªº¨ç¦¡À³¸Ó¦p¦P ldconfig ¸Ó¸`©Ò¸Ôzªº¤è¦¡¦C¥X¡C
±µ¤U¨Ó¬O¦b¬° package ©R¦W®ÉÀ³¿í¦uªººD¨Ò¡C³o¬O¬°¤FÅý§Ú̪º package ªº¥Ø¿ý®e©ö·j´M¡A¦]¬°¤w¸g¦³¤Ó¦h¤Ó¦hªº package¡A °²¦p³o¶Ë¨ì¥L̪º²´·ú¨º¥LÌ´N·|Á׶}¤F¡I
Package ªº¦WºÙÀ³¸Ó¬Ý°_¨Ó¹³ language-name-compiled.specifics-version.numbers.
¦pªG DISTNAME ¬Ý°_¨Ó¤£¹³³oÓ¡A´N§â PKGNAME ³]¬°³oºØ®æ¦¡¡C
FreeBSD ºÉ¤O¥h¤ä´©¨Ï¥ÎªÌªº¥»¦a»y¨¥¡C¦pªG port «ü©wµ¹¬Y¯S©w»y¨¥¡A language- ªº³¡¥÷´NÀ³¸Ó¬O¸Ó»y¨¥¥Ñ ISO-639 ©Ò©w¸qªº¨âÓ¦r¥ÀªºÁY¼g¡C¨Ò¦p Japanese ¬O ja¡A Russian ¬O ru¡AVietnamese ¬O vi¡Ahinese ¬O zh¡A Korean ¬O ko¡A¦Ó German ¬O de¡C
name ªº³¡¥÷À³¸Ó¥þ¬O¤p¼g¡A°£¤F¯uªº«Ü¤jªº package (¸Ì±¦³«Ü¦hµ{¦¡)¡C¦p XFree86 (¨S¿ù¡A¯uªº¦³³oÓ port¡A ¬d¤@¤U§a) ©M ImageMagick ´N¬O³o¤@Ãþ¡C§_«hªº¸Ü¡A§â¦W¦r (©Î¦Ü¤Ö²Ä¤@Ó¦r¥À)Âন¤p¼g¡C¦pªG¤j¼g¦r¥À¹ï¦WºÙ«Ü«n(¨Ò¦p¹³ R ©Î V ¦³¤@Ó¦r¥Àªº¦WºÙ) §A¥i¥H¦Û¤v·r°u¨Ï¥Î¤j¼g¦r¥À¡C¬° Perl 5 ªº¼Ò²Õ©R¦W¶Ç²Î¤W·|¹w¥ý¥[¤W p5- ¨Ã§âÂù«_¸¹ªº¤À¹jÂର³s¦r¸¹¡F¨Ò¦p Data::Dumper ¼Ò²ÕÅܬ° p5-Data-Dumper¡C¦pªG¦³ª§Ä³ªº³nÅé¦WºÙ¤¤¦³ ¼Æ¦r¡A³s¦r¸¹¡A©Î©³½u¡A¤]¥i¥H§â¥¦Ì³£¥]¬A¶i¥h (´N¹³ kinput2)¡C
¦pªG port ¥i¥H¥Î¤£¦Pªº hardcoded defaults «Ø¥ß (³q±`¬O¤@Ó port ªº®a±Úªº¥Ø¿ý¦WºÙªº¤@³¡¥÷)¡A -compiled.specifics ªº³¡¥÷À³¸ÓÁn©ú¤F compiled-in ªº¹w³]È (³s¦r¸¹¬O¿ï¾Ü©Êªº)¡C¨Ò¦p¯È±i¤j¤p©M¦r«¬³æ¤¸¡C
version ¦r¦êÀ³¸Ó¬O¥yÂI¤À¹jªº¾ã¼Æ©M¤@Ó·Ó¶¶§Çªº¤p¼g¦r¥À¡C °ß¤@ªº¨Ò¥~¬O pl (ªí¥Ü `patchlevel') ¦r¦ê¡A ³o°ß¦³·í³nÅé¨S¦³¥Dn©M¦¸nªºª©¥»½s¸¹¤~¥i¥H¥Î¡C
³o¸Ì¦³¨Ç¦p¦ó§â DISTNAME Âà´«¦¨¦X¾Aªº PKGNAME ªº(¯u¹êªº)¨Ò¤l¡G
µo¦æª©¥»ªº¦WºÙ | Package ¦WºÙ | ì¦] |
---|---|---|
mule-2.2.2. | mule-2.2.2 | ¤£¥Î§ï |
XFree86-3.1.2 | XFree86-3.1.2 | ¤£¥Î§ï |
EmiClock-1.0.2 | emiclock-1.0.2 | ³æ¤@µ{¦¡¤£¥Î¤j¼g¦WºÙ |
gmod1.4 | gmod-1.4 | ª©¥»½s¸¹«e»Ýn¤@Ó³s¦r¸¹ |
xmris.4.0.2 | xmris-4.0.2 | ª©¥»½s¸¹«e»Ýn¤@Ó³s¦r¸¹ |
rdist-1.3alpha | rdist-1.3a | ¤£¯à¦³¹³ alpha ªº¦r¦ê |
es-0.9-beta1 | es-0.9b1 | ¤£¯à¦³¹³ beta ªº¦r¦ê |
v3.3beta021.src | tiff-3.3 | ³oË©³¬O¤°»òªF¦è¡H |
tvtwm | tvtwm-pl11 | ¤@©wn¦³ª©¥»¦r¦ê |
piewm | piewm-1.0 | ¤@©wn¦³ª©¥»¦r¦ê |
xvgr-2.10pl1 | xvgr-2.10.1 | °ß¦³¨S¥Dn/¦¸nªºª©¥»½s¸¹¤~¥i¥Î pl |
gawk-2.15.6 | ja-gawk-2.15.6 | ¤é»yªºª©¥» |
psutils-1.13 | psutils-letter-1.13 | Package ½sij®É¤w¼g¦ºªº¯È±i¤j¤p |
pkfonts | pkfonts300-1.0 | 300dpi ¦r«¬ªº package |
¦pªG¦bì©lªºµ{¦¡½X¸Ì§¹¥þ¨S¦³ª©¥»¸ê°Tªº²ª¸ñ¡A ¦Ó¥B°_ªìªº§@ªÌ¤]¤£¤j¥i¯à´¿¸gÄÀ¥X¨ä¥¦ª©¥»¡A´N§âª©¥»ªº¦r¦ê³]¬° 1.0 (´N¹³¤W±ªº¨Ò¤l piewm)¡C §_«h´N°Ý°_ªìªº§@ªÌ©Î¥Î¤é´Á¦r¦ê (yy.mm.dd) ·íª©¥»¡C
¦p¦P¤wª¾¡Aport ¥H¼ÆÓºØÃþ¨Ó¤ÀÃþ¡C¤£¹LnÅý³oµo´§¥\®Ä¡Aporter ©M¨Ï¥ÎªÌ¤F¸Ñ¨CÓºØÃþ¦Ó¥B§Ų́M©w¨CÓºØÃþn©ñ¤°»ò¬O«Ü«nªº¡C
º¥ý¡A³o¬O²{¦b port ªººØÃþªº¦Cªí¡C¥H¬P¸¹(*) ¼Ð¥Üªº¬OµêÀÀªººØÃþ--¨º¨Ç¦b ports tree ¸Ì¨Ã¨S¦³¬Û¹ïÀ³ªº¤l¥Ø¿ý¡C
Note: ¦Ó«DµêÀÀªººØÃþ¡A¥i¥H¦b¸Ó¤l¥Ø¿ý¸Ìªº pkg/COMMENT §ä¨ì¤@¦æªº´yz(¦p archivers/pkg/COMMENT)¡C
ºØÃþ | ´yz |
---|---|
afterstep* | ¤ä´© AfterStep µøµ¡ºÞ²zûªº port |
archivers | Àɮ׳B²zªº¤u¨ã¡C |
astro | ¤Ñ¤åªº port¡C |
audio | Ánµªº¤ä´©¡C |
benchmarks | ®Ä¯àµû¤ñªº¤u¨ã¡C |
biology | ¦³Ãö¥Íª«ªº³nÅé¡C |
cad | ¹q¸£»²§U³]pªº¤u¨ã¡C |
chinese | ¤¤¤åªº¤ä´©¡C |
comms | ³q°T³nÅé¡C¤j³¡¥÷ªº³nÅé¬O¥Î¦ê¦C°ð¥æ½Í¡C |
converters | ¦r½XªºÂà´«¾¹¡C |
databases | ¸ê®Æ®w¡C |
deskutils | ¹q¸£µo©ú«e¦b®à¤WªºªF¦è¡C |
devel | µo®i¤u¨ã¡C¤£n¥u¦]¬°¥¦Ì¬O¨ç¦¡´N§â¨ç¦¡©ñ¦b³o-- °£«D¥¦Ì¯uªº¤£ÄÝ©ó¨ä¥¦¦a¤è¡A§_«h¥¦Ì¤£¸Ó¦b³oºØÃþ¸Ì¡C |
editors | ¤@¯ëªº½s¿è¾¹¡C¯S®í¥Î³~ªº½s¿è¾¹¦b¨º¨Ç¤u¨ãªº°Ï°ì¸Ì (¨Ò¦p¡A¼Æ¾Ç¤½¦¡ªº½s¿è¾¹·|¦b math)¡C |
elisp | Emacs-lisp ªº port¡C |
emulators | ¨ä¥¦§@·~¨t²Îªº¼ÒÀÀ¾¹¡C²×ºÝ¾÷(terminal)ªº¼ÒÀÀ¾¹ ¤£ÄÝ©ó³o¸Ì--¥H X ¬°°ò¦ªºÀ³¸Ó¦b x11 ¦Ó¤å¦r°ò¦ªº¤£¬O¦b comms ´N¬O misc¡A µø¨ä½T¹êªº¥\¯à¦Ó©w¡C |
ftp | FTP «È¤áºÝ©M¦øªA¾¹ºÝªº¤u¨ã¡C¦pªG port ¥i»P FTP ©M HTTP ¥æ½Í¡A§â¥¦¥H www ¬°¦¸nªº¤ÀÃþ©ñ¦b ftp¡C |
games | ¹CÀ¸¡C |
german | ¼w»yªº¤ä´©¡C |
gnome* | ¨Ó¦Û GNU Object Model Environment (GNOME) Project ªº port¡C |
graphics | ¹Ï§Î¤u¨ã¡C |
irc | Internet Chat Relay ªº¤u¨ã¡C |
japanese | ¤é»yªº¤ä´©¡C |
java | Java »y¨¥ªº¤ä´©¡C |
kde* | ¨Ó¦Û K Desktop Environment (KDE) Project ªº port¡C |
korean | Áú»yªº¤ä´©¡C |
lang | µ{¦¡»y¨¥¡C |
¶l¥ó³nÅé¡C | |
math | ¼ÆȹBºâªº³nÅé©M¨ä¥¦ªº¼Æ¾Ç¤u¨ã¡C |
mbone | MBone ªºÀ³¥Îµ{¦¡¡C |
misc | ¦U¦¡¦U¼Ëªº¤u¨ã--°ò¥»¤W¬O¤£ÄÝ©ó¥ô¦ó¦a¤èªºªF¦è¡C ³o¬O°ß¤@¤£À³¸Ó¥X²{¨ä¥¦«DµêÀÀºØÃþªº¤ÀÃþ¡C¦pªG§A¦b CATEGORIES ¨º¦æ¦³ misc ¥H¥~ªºªF¦è¡A¨º§A¥i¥H©ñ¤ß¦a§R°£ misc ¨Ã§â port ©ñ¶i¥t¤@Ó¤l¥Ø¿ý¡I |
net | ¦U¦¡¦U¼Ëªººô¸ô³nÅé¡C |
news | USENET news ªº³nÅé¡C |
offix* | ¨Ó¦Û OffiX ®M¥óªº port¡C |
palm | 3Com Palm(tm) ¨t¦Cªº³nÅé¤ä´©¡C |
perl5* | »Ýn perl ²Ä¤ª©¤~¯à°õ¦æªº port¡C |
plan9* | Plan9 ªº¦UºØµ{¦¡¡C |
¦C¦L³nÅé¡C®à±¥Xª©ªº¤u¨ã¤]ÄÝ©ó³o¸Ì (previewers µ¥µ¥)¡C | |
python* | ¥Î python ¼gªº³nÅé¡C |
russian | «X»yªº¤ä´©¡C |
security | ¹q¸£¦w¥þªº¤u¨ã¡C |
shells | ©R¥O¦C¤Uªº shell¡C |
sysutils | ¨t²Î¤u¨ã¡C |
tcl75* | ¥Î Tcl 7.5 ª©°õ¦æªº port¡C |
tcl76* | ¥Î Tcl 7.6 ª©°õ¦æªº port¡C |
tcl80* | ¥Î Tcl 8.0 ª©°õ¦æªº port¡C |
tcl81* | ¥Î Tcl 8.1 ª©°õ¦æªº port¡C |
textproc | ¤å¦r³B²zªº¤u¨ã¡C¥¦¤£¥]¬A®à±¥Xª©ªº¤u¨ã¡A ¨ºÄÝ©ó print/¡C |
tk41* | ¥Î Tk 4.1 ª©°õ¦æªº port¡C |
tk42* | ¥Î Tk 4.2 ª©°õ¦æªº port¡C |
tk80* | ¥Î Tk 8.0 ª©°õ¦æªº port¡C |
tk81* | ¥Î Tk 8.1 ª©°õ¦æªº port¡C |
tkstep80* | ¥Î TkSTEP 8.0 ª©°õ¦æªº port¡C |
vietnamese | ¶V«n»yªº¤ä´©¡C |
windowmaker* | ¤ä´© WindowMaker µøµ¡ºÞ²zûªº port |
www | ¸ò World Wide Web ¦³Ãöªº³nÅé¡CHTML »y¨¥ªº¤ä´©¤]ÄÝ©ó³o¸Ì¡C |
x11 | X window system ©M¥¦ªºªB¤ÍÌ¡C ³oÓºØÃþ¥uµ¹ª½±µ¤ä´©µøµ¡¨t²Îªº³nÅé¡C¤£n§â¥±`ªº X À³¥Îµ{¦¡©ñ¦b³o¡C¦pªG port ¬OÓ X À³¥Îµ{¦¡¡A ©w¸qUSE_XLIB (¥]§t¦³ USE_IMAKE) ¨Ã§â¥¦©ñ¦b¾A·íªººØÃþ¡C ¦P¼Ë¦a¡A¥¦Ì¸Ì±¦³«Ü¦hÄÝ©ó¨ä¥¦ªº x11-* ºØÃþ(¬Ý¤U±)¡C |
x11-clocks | X11 ªº®ÉÄÁ¡C |
x11-fm | X11 ªºÀɮ׺޲zû¡C |
x11-fonts | X11 ªº¦r«¬©M¦r«¬¤u¨ã¡C |
x11-servers | X11 servers. |
x11-toolkits | X11 toolkits. |
x11-wm | X11 µøµ¡ºÞ²zû¡C |
¦]¬°¦³«Ü¦hªººØÃþ«Å|¡A§A¥²¶·¿ï¾Ü¦óªÌ¬° port ºnªººØÃþ¡C ¦³´XÓ³W«h¤ä°tµÛ³oÓijÃD¡C³o¸Ì¦³¥÷Àu¥ýÅvªº¦Cªí¡A¨äÀu¥ýÅv¨Ì§Ç»¼´î¡C
¯S©w»y¨¥ªººØÃþ¥Ã»·¬O²Ä¤@Ó¡C¨Ò¦p¡A¦pªG port ¦w¸Ë ¤é»yªº X11 ¦r«¬¡A¨º CATEGORIES ¨º¦æÀ³¬O japanese x11-fonts¡C
«ü©wºØÃþªº³Ó¹L¯Ê¥F«ü©wªº¡CÁ|Ó¨Ò¡A¤@Ó HTML ½s¿è¾¹À³¸Ó¦C¦¨ www editors¡A¦Ó¤£¬O¬Û¤Ï¹L¨Óªº¤è¦¡¡C ¦P¼Ë¦a¡A·í port ÄÝ©ó irc¡A mail¡Ambone¡A news¡Asecurity¡A ©Î www ¨ä¤¤¤§¤@®É¡A«K¤£»Ýn¦C¥X net¡C
¥u¦³·íºnªººØÃþ¬O¥À»y®É x11 ¤~¥i·í§@²Ä¤GÓºØÃþ¡CX ªºÀ³¥Îµ{¦¡¯S§O¤£¸Ó§â x11 ©ñ¶iºØÃþ¨º¦æ¡C
Emacs ªº¼Ò²ÕÀ³¸Ó©M¨ä¤ä´©ªºÀ³¥Îµ{¦¡©ñ¦b¦P¤@ÓºØÃþ¸Ì¡A ¦Ó¤£¬Oeditors¡C¨Ò¦p¡A ¥Î¨Ó½s¿è¬Y¨Çµ{¦¡»y¨¥ªºì©lÀɪº Emacs ¼Ò²Õ´NÀ³¸Ó¦b lang ¸Ì¡C
¦pªG port ¯uªº¤£ÄÝ©ó¥ô¦ó¦a¤è¡A´N§â¥¦©ñ¦b misc¡C
¦pªG¤£½T©w¬O¦óºØÃþ¡A½Ð¦b°e¥Xªº send-pr ¸Ìªþ¤W¤@¬qµùÄÀ»¡©ú¡A¥H«K§ÚÌ¥i¥H¦b§â¥¦¿é¤J«e°Q½×°Q½×¡C (¦pªG§A¬O committer¡A±H¤W¤@¥÷³Æ§Ñ¿ý¨ì FreeBSD ports mailing list <freebsd-ports@FreeBSD.org>¡A ³o¼Ë§ÚÌ¥i¥H¥ý°Q½×¥¦--·sªº port ©¹©¹³Q¿é¤J¨ì¿ù»~ªººØÃþµ²ªG³Q¥ß¨è²¾¨«¡C)
¦pªG§AºûÅ@¤j¶qªº port¡AÀ³¸Ó¦Ò¼{¸òµÛFreeBSD ports mailing list <freebsd-ports@FreeBSD.org>¡C¹ï port ªº¹B§@ªº«n§ïÅܳ£·|¦b³o¸Ì¤½§i¡C§A¥Ã»·¥i¥H¦b the bsd.port.mk CVS log §ä¨ì³Ì·sªºÅܰʪº¸Ô²Ó¸ê°T¡C
«z¡A³o¬q»¡©ú¯u¬Oªø¡A¤£¬O¶Ü¡H¯uªº·PÁ¦U¦ì¸ò§Ų́«¨ì³oÃä¡C ²{¦b§Aª¾¹D¦p¦ó°µ¤@Ó port ¨Ã§â¥@¬É¤W¨CÓªF¦èÂà´«¨ì port ¸Ì¤F¡I ³o¬O¶}©l¹ï FreeBSD Project °µ¥X°^Äm³Ì²³æªº¤è¦¡¡I :-)