Conditionally include file in an RPM
How can I conditionally include a file in an .rpm based on a define _foobar being set or not? The define _foobar would contain the absolute path inside the build root. The file is there. According to the documentation, I expected the following to work (note: there are more files in this %files section, but this is the gist): %files %if %{_foobar} %{_foobar} %endif which, however, gives me the error: error: parse error in expression error: /path/to/specfile:LINENO: parseExpressionBoolean returns -1 where /path/to/specfile:LINENO is the path to the .spec file and the line number of the line with