carps-cups icon indicating copy to clipboard operation
carps-cups copied to clipboard

Adapt Makefile for RPM packaging

Open mikhailnov opened this issue 7 months ago • 3 comments

When building an RPM via rpmbuild, we need to:

  • pass system default compiler flags, example from ROSA 2023.1:
$ rpm -E %optflags
-O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -m64 -mtune=generic
  • pass system default linker flags
  • pass directory where files should be copied to (DESTDIR)
  • build an unstripped binary, RPM will strip it by itself and save debuginfo in a special way

All these changes will be usefull for any other packaging format, not only RPM.

mikhailnov avatar Jan 05 '24 20:01 mikhailnov