Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building both devel and normal version of a RPM package

I have a library from which I'd like to create two RPM packages.

While I found several links on how to create a basic RPM package, I can't find how to create a devel package (see this question if you wonder what a devel package is).

What do I have to do to generate both devel and non-devel versions of my RPM package ?

Thanks.

like image 347
ereOn Avatar asked May 26 '10 13:05

ereOn


People also ask

Can you create an RPM from an installed package?

Rpmerizor is a script that allows you to create an RPM package from installed files. You simply have to specify files on the command line and answering a few interactive questions to fill rpm meta-data (package name, version ...). You can also use it in batch mode with command line options for meta-data.

What is RPM devel?

This package contains the RPM C library and header files. These development files will simplify the process of writing programs that manipulate RPM packages and databases.

When installing downloaded package on a Red Hat-based distribution manually using RPM what you have to do first?

In order to install an RPM package you must first have the RPM package you are trying to install on your system. The Red Hat Customer Portal provides all the RPM packages included in our products in our Downloads area.

Which portion of an RPM references the version of the package build?

Specifically, an RPM package consists of the cpio archive, which contains the files, and the RPM header, which contains metadata about the package. The rpm package manager uses this metadata to determine dependencies, where to install files, and other information. There are two types of RPM packages: source RPM (SRPM)


2 Answers

I found an example of a .spec file which generates both devel and non-devel packages.

It seems you can create one (or several) sub-package(s) inside a package, appending devel (or whatever name you want to) after the %files directive.

Below is an extract from the example I posted:

Name:      kmymoney
Summary:   The Personal Finances Manager for KDE.
Version:   0.8
Release:   1.%{disttag}%{distver}
License:   GPL
Packager:  %packer
Group:     Productivity/Office/Finance
Source0:   %{name}2-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}2-%{version}-%{release}-build
BuildRequires: kdebase3-devel
Prereq: /sbin/ldconfig

%description
Description goes here...

%package devel
#Requires:
Summary: KMyMoney development files
Group: Productivity/Office/Finance
Provides: kmymoney-devel

%description devel
This package contains necessary header files for KMyMoney development.

... more to go here ...

%files
... some files ...

%files devel
... the devel files ...

Note the devel suffixes.

like image 90
ereOn Avatar answered Sep 23 '22 07:09

ereOn


Read this.

like image 28
Ignacio Vazquez-Abrams Avatar answered Sep 23 '22 07:09

Ignacio Vazquez-Abrams