I have a tar file myapp.tar.gz, that contains binaries. When untared, the directory structure created is something like this:
myapp/
-bin/myapp
-lib/mylib
<more directories and subdirectories and file>
I want to create a RedHat RPM for myapp, when installed the RPM should simply untar my application binaries in /usr/local/myapp. I am struggling with the RPM spec file, it seems overly complicated. All I want it to do is untar my app in /usr/local/myapp.
This is what I have tried so far:
Name: myapp
Version: 0.1
Release: 1%{?dist}
Summary: myapp
License: apache
URL: myapp
Source0: myapp.tar.gz
BuildArch: noarch
%description
MyApp does fun things.
%prep
%setup -q
%build
%install
mkdir -p %{buildroot}/%{_bindir}
install -m 0755 %{name} %{buildroot}/%{_bindir}/%{name}
%files
%license LICENSE
%{_bindir}/%{name}
This is not working for me, not sure why.