For a quick start, we can use the existing ROS plugin package (chapter_5_codes/pluginlib_calculator).
If we want to create this package from scratch, you can use the following command:
$ catkin_create_pkg pluginlib_calculator pluginlib roscpp std_msgs
The main dependency of this package is pluginlib. We can discuss the main source files in this package to build plugins.