Development Packages

Creating development rpms is done in the same spec file you created the original package rpm in.  All you have to do is add a few extra fields.  The extra fields added are used to describe the development package.  This shouldn’t be too hard to understand so I have just highlighted the added information required for the development information on this example file I have included.  This spec file is for one the dependencies of vpython called gtkglarea.

Name: gtkglarea
Version: 1.2.3
Release: 1%{?dist}
Summary: Gtkglarea is an opengl wigdet for the gtk+ gui toolkit

Group: Development/Libraries
License: GPLv2+
URL: http://www.bradlongo.wordpress.com
Source0: gtkglarea-1.2.3.tar.gz
Patch0:gtkglarea.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: gtk+-devel >= 1.2
Requires: gtk+ >= 1.2

%description
Gtkglarea is an opengl widget similar to the GtkDrawingArea.

%package devel
Group: Development/Libraries
Summary: Development files for gtkglarea
Requires: gtkglarea == 1.2.3

%description devel
Development files for gtkglarea.

%post -p /sbin/ldconfig

%prep
%setup -q
%patch0 -p1

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f %{_libdir}/libgtkgl.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgtkgl.la

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc COPYING
%doc README
%doc INSTALL
%doc AUTHORS
%{_libdir}/libgtkgl.so.5
%{_libdir}/libgtkgl.so.5.0.0
%{_datadir}/aclocal/gtkgl.m4

%files devel
%defattr(-,root,root,-)
%doc COPYING
%doc README
%doc INSTALL
%doc AUTHORS
%{_includedir}/gtkgl/gdkgl.h
%{_includedir}/gtkgl/gtkglarea.h
%{_libdir}/libgtkgl.so
%{_libdir}/libgtkgl.a

%changelog
*Sun Jul 13 2008 Brad Longo <bjlongo@ncsu.edu> 1.2.3-1
–Fixed files section
–Deleted zero length file.
–Created patch to get rid of rpmlint errors.

*Thu Jun 26 2008 Brad Longo <bjlongo@ncsu.edu> 1.2.3-1
–Initial Build.

Previous Home Next
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: