Last active
July 31, 2018 21:14
-
-
Save slayerlab/6af37dfdef1c66d07d63ae4f5467c805 to your computer and use it in GitHub Desktop.
Add this snippet at /usr/lib/rpm/macros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#======= | |
# this expanded %install scriptlet will create automatically if a directory not exists. | |
# So, you do not need to worry with rpm .spec file to create directory. | |
%__spec_install_pre %{___build_pre}\ | |
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ | |
mkdir -p `dirname "$RPM_BUILD_ROOT"`\ | |
mkdir "$RPM_BUILD_ROOT"\ | |
%{nil} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning:
Updates can overwrite your custom "/usr/lib/rpm/macros" file then I recommend you to check this inline
spec
if some errors occur at runtime.