FreeBSD pkg_create like

I want to create a FreeBSD binary package containing some software. All I'm interested in doing is say

“Some files in directory X need to go to directory Y,” keeping the directory hierarchy underneath. If necessary, I can easily indicate each file in the packing list.

However, this is very difficult to achieve, since I cannot find a combination of the -s, -S @cwd and @srcdir options that do what I want. It either looks in the Y directory for files (which does not exist in the build system), or it packs the files in the X directory, which is also not what I want.

Before you answer "just create a port", I DO NOT REMOVE REMOTELY interested in creating a "port". The "port" has nothing to do with what we do. This is not a package for distribution by third parties, as well as a cross-platform application designed to leak a source by third parties.

All I want to do is make a binary package to install some files in the specified location on the file system. Is it too complicated?

This is under FreeBSD 7.3.

+4
source share
1 answer

Just create the package directly. Either with pkg_create (and generation, or with a pipeline in the "find" style pkg list, or alternatively create a trivial package (select something like pub / FreeBSD / ports / amd64 / packages-6.3-release / Allwidentd-1.03_1.tbz as a simple example) consisting of a directory with:

+CONTENTS see example or man page +COMMENT foo +DESC foo +MTREE_DIRS /set type=dir uname=root gname=wheel mode=0755 . bin .. etc .. .. 

and then:

 your files.. 

later than / usr / local. Just grab the package as described above in what happens there. Above is just tar and gz'-ed up, and presto is pacakge.

Dw.

+4
source

Source: https://habr.com/ru/post/1334340/


All Articles