I have a general question about how to make filegroup into a declare_directory.
So what I can think about is like,
filegroup -> pkg_tar -> untar_to_dir(A rule to untar the tarball into the declare_directory).
It would work, and I already proved it. However, I want to know whether any other more graceful method to avoid tar and untar the filegroup?
One idea I tried, but much complicated, is to copy them into the declare_directory file by file. But the tricky point is, it could not gracefully deal with keeping the same dir structure in the new dir. (like I have to mkdir a lot of sub-directory before cp).
From another thread
And actually I wrote a func files_to_dir and did the same thing.