carps-cups
carps-cups copied to clipboard
Adapt Makefile for RPM packaging
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.