spec file:
Code:
Summary: A collection of great scripts and tools to maintain Linux systems.
Name: tomcat
Version: 1
Release: 1
License: GPL
BuildArch: noarch
Group: Development/Tools
Source: tomcat.tar.gz
BuildRoot: %{_tmppath}/tools
%description
This is a testpackages that containes some files. The files will be placed on a system.
%prep
%setup -q -n %{name}
%build
%install
rm -rf $RPM_BUILD_ROOT
# Then we create the directories where the files go
# don't worry if the directories exist on your target systems, rpm
# creates if necessary
#mkdir -p $RPM_BUILD_ROOT/local/scripts
mkdir -p $RPM_BUILD_ROOT/tmp
# The actual moving
cp * $RPM_BUILD_ROOT/tmp
#cp * $RPM_BUILD_ROOT/local/bin
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%attr(0755,root,root) /tmp
%changelog
* Mon Jan 23 2012 el <h@rt.com> - 1-1
software...
It build rpm fine with
rpmbuild -ba my.spec
resulting rpm installs fine.
Code:
[me@localhost SRPMS]$ sudo rpm -ivh tomcat-1-1.src.rpm
1:tomcat ########################################### [100%]
[me@localhost SRPMS]$
But it does not copy files in /tmp dir.
Neither it show as installed.
Code:
[me@localhost SRPMS]$ sudo rpm -ql tomcat-1-1.src.rpm
package tomcat-1-1.src.rpm is not installed
[me@localhost SRPMS]$