Date: Wed, 22 Sep 1999 00:06:59 -0700 From: Jeremy Lea <reg@shale.csir.co.za> To: Alexander Langer <alex@cichlids.com> Cc: ports@FreeBSD.ORG Subject: Re: Port Making Program Message-ID: <19990922000659.B422@shale.csir.co.za> In-Reply-To: <19990921133230.A43770@cichlids.cichlids.com> References: <19990921133230.A43770@cichlids.cichlids.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Tue, Sep 21, 1999 at 01:32:30PM +0200, Alexander Langer wrote: > Is there a program that helps one with making ports (automatically > creating list for PLIST etc), or must this first be written? No, there's no program to do this automatically (although there's this rumour about Satoshi's hamster...) This is the general procedure which I follow, although it's not going to work for everything. 1. Copy a working similar port to the directory name you've chosen for your port. Delete all the CVS directories (rm -r CVS; rm -r */CVS). Delete all the patches (rm patches/patch*). 2. Edit the Makefile, starting at the top to reflect your new baby. Check everything... and set to $FreeBSD$. Remove any targets which you don't think you'll need, and any settings which might not be useful. Edit pkg/* and remove everything from the PLIST. Make up a COMMENT and DESCR. 3. Once the Makefile has the right PKGNAME/DISTNAME and SITES, then run 'make makesum'. Don't copy the tarball into /usr/ports/distfiles first, check the URLs. You should check them all, unless you're pretty sure they are good mirrors. 4. 'make patch'. Then cd to the work directory and start looking for clues. ltconfig means you need USE_LIBTOOL. configure.in means GNU_CONFIGURE, configure HAS_CONFIGURE and Imakefile's means that you need USE_IMAKE. Read the README if there is one, and if there is a configure script, run it to see what it's looking for. Don't worry about failures at the moment. 5. Go back and edit your port's Makefile to reflect what you found. Then run 'make configure | & more' to see if the port finds all it's dependencies. If it doesn't then you need to either start patching or adding configure arguments or other settings. Repeat until the port configures correctly. 6. 'make clean' and 'make'. Start patching you whatever until it builds. Then run 'make install' and carry on patching until it installs. 7. 'make clean' and 'make install'. Then 'find /usr/local/ -newer work/.builddone' and 'find /usr/X11R6/ -newer work/.builddone'. You might also want to check the entire tree for new files. Continue patching until the files are all going to the right places. 8. Run 'make clean' and 'make install'. Then run 'find /usr/local/ -newer work/.builddone ! -type d | sed -e "s^/usr/local/^^g" | sort > pkg/PLIST', followed by 'find /usr/local/ -newer work/.builddone -type d | sed -e "s^/usr/local/^@dirrm ^g | sort -r >> pkg/PLIST'. Then edit the PLIST and look for wrong files (especially info/dir) and copy in the ldconfig lines from another port if you are installing shared libraries, and the install-info commands if you have info files. Obviously use /usr/X11R6/ if you're going there... Also move man pages into the Makefile MAN?= variables. 9. Run 'make clean' then 'make install' then 'make deinstall' and 'find /usr/local -newer work/.builddone' to make sure the port is not leaving anything behind. Then install and see if the port works. Then run: make clean make install make package make deinstall pkg_install pkg_delete make reinstall 10. Repeat the procedure above until this completes without error... Or something like that... -Jeremy -- | ------------------------------------------------------ --+-- "Maybe tomorrow will be better than today, | or maybe it will not come at all..." - Pam Thum | ------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990922000659.B422>