rpmbuild spec file ignore file that does not exist
Is it possible to tell an rpmbuild spec file to ignore a file in the files list if it doesn't exist?
Something like:
%files
%{exi开发者_JAVA百科stingfile}
if [ -f %{dtdfile} ]; then
%{dtdfile}
fi
It sounds like subpackages may help you out.
In the main package could include all the common files, then each subpackage could return the main package, and also include any additional files particular to that package.
See http://fedoraproject.org/wiki/How_to_create_an_RPM_package#Subpackages and http://www.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
精彩评论