Cтатический бинарник

Для статического бинарника без особых файлов конфигурации, запуск осуществляется командой вида rtc --path_prefix / -- /путь/к/программе

Или с использованием shell обёртки

#!/bin/sh
exec rtc64 --path_prefix / -- %scdir/storcli64 "\$@"
Пример spec файла rtc-storcli.spec
Name: rtc-storcli
Version: 1704
Release: alt1.E2K.1

Summary: storcli repackaged for use with rtc
License: proprietary
Group: System/Configuration/Hardware

Source: storcli64
AutoReqProv: no
Requires: rtc >= 4.1-alt1.E2K.5

%define scdir %prefix/libexec
%add_debuginfo_skiplist %scdir
%set_verify_elf_method none

%description
%summary

%prep

%build
cat > storcli64.sh << EOF
#!/bin/sh
exec rtc64 --path_prefix / -- %scdir/storcli64 "\$@"
EOF

%install
install -pDm755 %SOURCE0 %buildroot%scdir/storcli64
install -pDm755 storcli64.sh %buildroot%_sbindir/storcli64

%files
%_sbindir/*
%scdir/storcli64

%changelog
* Fri Oct 14 2022 Michael Shigorin <[email protected]> 1704-alt1.E2K.1
- initial repackage

Last updated