Skip to content

Miscellaneous

%install_bin

Install files to %(bindir)
Example usage
%install_bin nano

%install_dir

Create a new empty directory with the default permissions
Example usage
%install_dir %(installroot)%(datadir)/pkgname/docs

%install_exe

Macro to install a file with default executable permissions

%install_file

Macro to install a file without executable permissions
Example usage
%install_file %(pkgdir)/helper.file %(installroot)%(datadir)/pkgname/pkgfile

%patch

Patch the upstream sources using an input patch file.
Example usage
%patch %(pkgdir)/${file}
# If you need to override -p#, add it after ${file}
%patch %(pkgdir)/some.patch -p3

%tmpfiles

Create a tmpfiles.d file for the package with given content

%sysusers

Create a sysusers.d file for the package with given content