Questions & Answers

How to package all files generated by "make install" with prefix set to /usr

I'm building protobuf from source.

The make install will generate many files and folders.

When setting the prefix to /usr, it will install everything into the system path:

cmake ../cmake -DCMAKE_INSTALL_PREFIX=/usr
make install

But if change the prefix to /opt/test, the generated /bin and /lib folder are not in the default system path:

cmake ../cmake -DCMAKE_INSTALL_PREFIX=/opt/test

I want to set the prefix to /usr, but tell "make install" generate all files into the "/path/to/package", here is the dummy code "--output "/path/to/package""

cmake ../cmake -DCMAKE_INSTALL_PREFIX=/usr
make install --output "/path/to/package"

I want to create deb from "/path/to/package" later. Is it possible? How to do this?

Answers(0) :