I have a very simple tar.gz file wih Java files which I want to install using RPM package. I created this spec file:
Name: test
Version: 1.0
Release: 1%{?dist}
Summary: test installation script
Group: Utilities
License: GPL
URL: http://oracle-base.com/articles/linux/linux-build-simple-rpm-packages.php
Source0: test-1.0.tar.gz
BuildArch: x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildRequires:
#Requires:
%description
test installation script
%prep
%setup -c /opt/test
%build
#%%configure
#make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
#install -d $RPM_BUILD_ROOT/opt/agent
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc
%changelog
It's not very clear how I can configure the target directory where the target files should be extracted. Can you tell me what I'm missing?