I have solved this issue. It needed to fully specify the path to the file at -f option like this: %files lang -f %_sourcedir/%name-%version/%{name}.lang