empty dirs needed in package

Florent Thoumie flz at xbsd.org
Sun Feb 6 03:17:29 PST 2005


Mike Brown a écrit :
> Hi again,
> 
> My port creates some empty directories. They won't always be empty,
> if certain features of the software are used.
> 
> I need installing from a pacakge to result in the creation of these
> directories. Apparently, 'make package' produces a package that has
> no idea that it needs to create these directories, since there is no
> way, AFAIK, to specify empty dirs in a pkg-plist.
> 
> Since there are @dirrm entries for these directories in my pkg-plist,
> doing a 'make deinstall' after a 'pkg_add' results in complaints
> that the directories don't exist.
> 
> What's the proper way to deal with this?
> 
> Do I do something special to the pkg-plist?
> Do I use a custom +MTREE_DIRS somehow when making the package?
> Do I remove the @dirrm entries and put something in a post-deinstall
> target in the Makefile instead?

	I guess using something like that will be good :

	@exec mkdir -p %D/path/to/dir

	Note that %D is needed, and will be handled as ${PREFIX} by
	pkg_create.

-- 
Florent Thoumie
flz at xbsd.org


More information about the freebsd-ports mailing list