I seems all the neat solutions mentioned are not available here in ancient Debian sid grass 5.0.3. Don't have the bandwidth to download source nor the brains to compile. Maybe instead I can give the roads a constant incline, and then create contour labels or something.