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.
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.
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.
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.
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)
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.
Read this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With