10

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.

Community
  • 1
  • 1
ereOn
  • 53,676
  • 39
  • 161
  • 238
  • 1
    Great question - I can't believe how hard it is to find info on the web about how to build a -devel package. – gareth_bowles May 26 '10 at 16:27
  • @gareth_bowles I was surprised as well. It seems likes the *few* guys who are doing `devel` packages want to keep their secrets ! – ereOn May 27 '10 at 07:13

2 Answers2

6

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.

ereOn
  • 53,676
  • 39
  • 161
  • 238
4

Read this.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358