I know the question is over a year old, and you probably already found a solution. In case this helps someone, here is a solution I came up with that adds a feed on an init hook, removes it when the plugin is deactivated, and also adds it back when the plugin is re-activated. The feed removal code is based on what the add_feed function does in WordPress, and just undoing that.
/*
* Function that loads my PHP module that outputs the RSS feed
*/
function my_podcast_rss()
{
require_once plugin_dir_path( __FILE__ ) . 'templates/archive-custom_post_type_name.php';
}
/*
* Add the feed
*/
function add_my_rss_feed()
{
add_feed('my-feed-name', 'my_podcast_rss') );
delete_option( 'rewrite_rules' );
}
/*
* Call during the 'init' hook
* Also call during activation (otherwise, when deactivating and
* reactivating, my changes weren't applying somehow).
*/
add_action( 'init', 'add_my_rss_feed')
register_activation_hook( __FILE__, 'add_my_rss_feed' );
/*
* Remove the feed
* Call during deactivation
*/
function deactivate_my_plugin_name()
{
$hook = 'do_feed_' . 'my-feed-name'
remove_action($hook, 'my_podcast_rss'), 10, 1);
delete_option( 'rewrite_rules' );
}
register_deactivation_hook( __FILE__, 'deactivate_my_plugin_name' );