[kde-edu]: RPM releases

Maurizio Paolini paolini at dmf.unicatt.it
Wed Apr 26 10:26:00 CEST 2006


Hi Andreas,

On Tue, Apr 25, 2006 at 08:09:04PM -0400, Andreas Nicolai wrote:
> Hi there,
> 
> sorry to bother you again, but this time it's again about a KDE 3.5 release of 
> KTouch. Since the new KTouch 1.6 version is out I got a few requests for RPMs 
> because some users don't have all developer packages installed. Now before I 
> start learning everything about building RPMs myself, I was wondering if some 
> of you guys have experience with that. Judging from KRPMBuilder I would need 
> to create a specs file. But when I google for that, I find thousends of 
> examples and that is not really helping.
> 
> So, how do I create RPMs for KTouch as easy as possible?

We had the same issue with kig.  In the end we were able to produce an "rpm"
with the "post-kde-3.5" version that can be successfully installed on a
"Fedora 4" (e.g.) distribution.

There are some issues, however, that can perhaps solved by someone more skillfull
with rpms than us.
One important issue is that the 'rpm' system treats the resulting rpm as an
update for the whole 'kdeedu' package, so that an
"rpm -U kig_xxx.rpm" will remove all of kdeedu apps.  Instead an
"rpm -i ..." will complain about conflicting files (those of kig), so that
you need to add an "--replacefiles" option.

Your "ktouch.spec" file must be placed in /usr/src/redhat/SPECS (I am referring
to a Fedora installation); then you must create a "ktouch-post-kde-3.5.tar.bz2"
containing the whole directory structure (in our case we also include the
'kdeedu parent' with che Makefile.cvs and the kde-common directory).
This tar.bz2 must be placed in /usr/src/redhat/SOURCES.

Now, if everything is fine, it should be enough to do a
"rpmbuild -ba ktouch.spec" and you will then find the binary rpms in
/usr/src/redhat/RPMS and the '.src.rpm' in /usr/src/redhat/SRPMS/.

Cheers,
Maurizio

Here is our 'spec' file, which you must modify according to
your needs:

----------------------- kig.spec ---------------------------------------------------------
Name: kig
Version: 0.90.0
Release: svn20060327_post_kde_3.5
Summary: Educational/Geometry applications for KDE
License: GPL
Group: User Interface/Desktops
Prefix: %{_prefix}

#Source: %{name}-%{version}.tar.bz2
Source: kig-post-kde-3.5.tar.bz2

BuildRequires: kdelibs-devel
BuildRequires: qt-devel 
BuildRequires: arts-devel 
BuildRequires: libart_lgpl-devel

BuildRoot: %{_tmppath}/post-kde-3.5

%description
Educational/Geometry applications for KDE, this is a snapshot
taken from "branches/kig/post-kde-3.5/" in the svn repository
hosted by kde.  This contains the latest features of kig, but
still usable with qt3/kde3.

%prep

%setup -q -n post-kde-3.5

%build
make -f Makefile.cvs
%configure \
   --disable-rpath

cd kig
make

%install
cd kig
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT/usr
mkdir $RPM_BUILD_ROOT/usr/share
mkdir $RPM_BUILD_ROOT/usr/share/doc
mkdir $RPM_BUILD_ROOT/usr/share/doc/HTML
mkdir $RPM_BUILD_ROOT/usr/share/doc/HTML/en
cp -a ../doc/kig $RPM_BUILD_ROOT/usr/share/doc/HTML/en

make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc %{_docdir}/HTML/en/*
%{_bindir}/*
%{_libdir}/kde3/*
%{_datadir}/applications/kde/*
%{_datadir}/apps/*
%{_datadir}/mimelnk/application/*
%{_datadir}/icons/*/*/*/*
%{_datadir}/services/*
%{_datadir}/config/magic/*
-------------------------------------------------------------------


More information about the kde-edu mailing list