There is a good handy utility for setting options in a binary file: setcap. This should run as root in the binary application of your application, but after installing it, it can run as a regular user. Example:
$ sudo setcap 'cap_sys_nice=eip' <application>
You can confirm what features are available in the application using getcap:
$ getcap <application> <application> = cap_sys_nice+eip
I would suggest integrating features into your makefile on the installation line, which usually runs as root. Please note that features cannot be stored in a TAR file or in any derived package formats. If you later pack your application, you will need a script (postinst for Debian packages) to apply the deployment capabilities.
source share