MacPorts: violation of the ports-filesystem hierarchy in the destroot phase
- by Dawood
I'm in the process of developing a Portfile for my application and I'm running into problems during the destroot phase. According to the MacPorts guide, the destroot phase executes the following command:
make install DESTDIR=${destroot}
I think I may be misunderstanding how this is supposed to work in the Makefile. My application is very simple and the install rule only needs to copy a couple of directories to the DESTDIR so it is specified as follows:
install:
cp -R bin $(DESTDIR)/bin
cp -R lib $(DESTDIR)/lib
cp -R cfg $(DESTDIR)/cfg
However, when I try to do a MacPort installation of my application, I get the following warnings:
---> Staging test into destroot
Warning: violation by /bin
Warning: violation by /lib
Warning: violation by /cfg
Warning: test violates the layout of the ports-filesystems!
How do I fix this? Am I misunderstanding how the DESTDIR variable is used in the install rule or missing something altogether?