-
Notifications
You must be signed in to change notification settings - Fork 2
PF5
ᴀɴᴛᴏɴ ɴᴏᴠᴏᴊɪʟᴏᴠ edited this page Jun 23, 2024
·
6 revisions
Checks build
, install
, and clean
scriptlets for using variables instead of macroses.
%build
gcc $RPM_OPT_FLAGS -o myapp myapp.c
%install
rm -rf %{buildroot}
install -pm myapp $RPM_BUILD_ROOT%{_usr}/
%build
gcc %{optflags} -o myapp myapp.c
%install
rm -rf %{buildroot}
install -pm myapp %{buildroot}%{_usr}/
Variables contain the same data as macroses, there is no demand to mix them.
Variable | Macros |
---|---|
$RPM_BUILD_ROOT |
%{buildroot} |
$RPM_OPT_FLAGS |
%{optflags} |
$RPM_LD_FLAGS |
%{build_ldflags} |
$RPM_DOC_DIR |
%{_docdir} |
$RPM_SOURCE_DIR |
%{_sourcedir} |
$RPM_BUILD_DIR |
%{_builddir} |
$RPM_ARCH |
%{_arch} |
$RPM_OS |
%{_os} |
$RPM_PACKAGE_NAME |
%{name} |
$RPM_PACKAGE_VERSION |
%{version} |
$RPM_PACKAGE_RELEASE |
%{release} |