RPM Build

Posted on

Hi, i make one spec feile but not understand how can put inseide spec one bash skript for after installation this rpm start bash skrip. Maybe someone have idea or link where i can read how put inseide spec feile bash or how used %prep for make after install this rpm start my bash skript.

This is my spec

Name: inet.dbg
Version: 1.0
Release: 1
Summary: inet.dbg
License: -
URL: https://www.astec.de/
Source0: /home/adis/rpmbuild/SOURCES/skript.sh
Source1: /home/adis/rpmbuild/SOURCES/inetdbg.tar.xz

BuildArch: noarch

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

%description
Smth like Hello World

%install
install -D -pm 755 %{SOURCE0} %{_bindir} skript.sh
install -D -pm 755 %{SOURCE1} %{_bindir} /adis/bin/inetdbg.tar.xz

%files
/opt/*

%post
/home/adis/rpmbuild/SOURCES/skript.sh

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Mon Jan 21 2023
- Add script.sh

Responses