In an effort to try using postgres 10 with pgrouting 2.2.2 (because of a bug in node network) I tried switching the PGROUTING_VERSION and rebuilding but it still uses 2.5.2 since postgresql-$PG_MAJOR-pgrouting always pulls down the latest pgrouting. The only thing that I can think of doing would be to pull directly from pgrouting on github and compile from source if you wanted to specify the version.
In an effort to try using postgres 10 with pgrouting 2.2.2 (because of a bug in node network) I tried switching the PGROUTING_VERSION and rebuilding but it still uses 2.5.2 since postgresql-$PG_MAJOR-pgrouting always pulls down the latest pgrouting. The only thing that I can think of doing would be to pull directly from pgrouting on github and compile from source if you wanted to specify the version.