In my install section of my rpm Spec file I have a bunch of mkdir's to create the directories I need. The ones that don't have any files installed in them get pruned out in the end and don't end up getting created. How can I ensure that the empty directories get created when it is all said and done?
Create the new directory by right-clicking (in your system's file tree) on the folder where you want to create the directory, and selecting menu item "New Folder...". When prompted, enter the directory name: Empty.
spec file following the %build section is the %install section. This script installs the binaries, man pages, configuration files, and all other components that belong in your RPM package to their respective locations in our virtual build root directory.
This helps package building by normal users. Simply use. Buildroot: <dir> in your spec file. The actual buildroot used by RPM during the build will be available to you (and your prep, build, and install sections) as the environment variable RPM_BUILD_ROOT.
In your %files section:
%files %dir /my/directory/name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With