Medi Montaseri
Medi Montaseri

Reputation: 125

seeking simple noarch rpm spec file

I am trying to make a noarch RPM pkg consisting of bunch of python and .png files. No build/compile. Assume I have all the src files tarred up in utp.tgz and I have copied it to rpmbuild/SOURCES/utp-1.0.tgz

Can you provide me with a simple spec file to package this up?

I have tried several versions of spec file, my current one looks like

Name:       utp
Version:    1.0
Release:    1%{?dist}
Summary:    some summary

Group:      Applications/Engineering
License:    Proprietary
URL:        http://www.example.com
Source0:    %{name}-%{version}.tgz
BuildArch:  noarch
BuildRoot: %{_builddir}/%{name}-root

%description
A very nice description

and when I run

rpmbuild --define "_topdir $(WORKDIR)/rpmbuild" --define "_tmppath $(WORKDIR)/rpmbuild/tmp" -vv -ba utp.spec

I get the following

medi@medi:~/work> tree rpmbuild/
rpmbuild/
├── BUILD
├── BUILDROOT
├── RPMS
│   └── noarch
├── SOURCES
│   └── utp-1.0.tgz
├── SPECS
│   └── utp.spec
├── SRPMS
│   └── utp-1.0-1.el8.src.rpm
└── tmp
    └── rpm-tmp.uFu2e3

8 directories, 4 files

I was expecting utp-*.rpm to be under rpmbuild/RPMS/noarch/

Upvotes: 1

Views: 2875

Answers (1)

Chris Maes
Chris Maes

Reputation: 37832

You need to specify a %files section (can be empty), otherwise no package will be produced:

%files

Upvotes: 2

Related Questions