Making separate KDE packages

From ArchWiki

Jump to: navigation, search
Image:Tango-dialog-warning.png This article is out of date.
Please help improve the wiki by updating the article and correcting mistakes.

Describe Making separate KDE packages here.

If a package is not compiled with conflict flag (e.g. conflicts=('kdelibs') then......
BE CAREFUL, THIS WAY OF INSTALLING KDE APPS CONFLICTS WITH THE OFFICIAL ARCH KDE PACKAGES AND COULD CAUSE PROBLEMS

Contents

Making separate KDE packages

I personally like some KDE apps, like kate, kopete or kpdf. That means i have to install kdebase, kdenetwork and kdegraphics besides all dependencies. But there´s a way to install sthose applications separate. I´ll show how to do that on the example of the the pdf reader kpdf.

Where´s kpdf??

Kpdf is part of the kdegraphics package, so we need the kdegraphics PKGBUILD.

cp -R var/abs/extra/kde/kdegraphics /var/abs/local
cd /var/abs/local/kdegrahics

Edit the PKGBUILD.

  • Change the pkgname to kpdf
  • kpdf is part of kdegraphics. So it conflicts with this package
  • Delete all dependencies
  • Change the source line (kdegraphics instead of $pkgname!!)
  • Change first line after build { (again kdegraphics instead of $pkgname)
  • Insert cd kpdf after ./configure

The PKGBUILD should look like this than

# $Id: PKGBUILD,v 1.21 2005/05/28 09:00:06 tpowa Exp $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=kpdf
pkgver=3.4.1
kdever=3.4.1 # if minor 0, then without .0
pkgrel=1
pkgdesc="KDE pdf reader"
url="http://www.kde.org"

conflicts=(kdegraphics)
makedepends=()
depends=()

# for easier build, just uncomment the mirror you want to use
  mirror="ftp.solnet.ch/mirror/KDE"         # updated every 2 hours, very fast for Europe
# mirror="ftp.kde.org/pub/kde/"             # main server
# mirror="ibiblio.org/pub/mirrors/kde/"     # ibiblio mirror


source=(ftp://$mirror/stable/$kdever/src/kdegraphics-$pkgver.tar.bz2)


build() {
  cd $startdir/src/kdegraphics-$pkgver
  ./configure --prefix=/opt/kde --disable-debug --disable-dependency-tracking --disable-kpdf-drm --enable-final
  #           --enable-final # remove this if you build with < 512mb ram.

  cd kpdf
  make ||| return 1
  make DESTDIR=$startdir/pkg install
}

Checking dependencies

Checking all dependencies would be the biggest problem. Becaues not all the deps that are given in the original PKGBUILD are needed. So how to figure out the deps? We could use namcap, that should tell us what is needed. Build the package for the first time. After that start namcap

 namcap -i kpdf-3.4.1-1.pkg.tar.gz
 kpdf       I: Depends as namcap sees them: depends=(kdelibs xorg)

Than edit the PKGBUILD again and insert the dependencies.

depends=(kdelibs xorg)

Adding md5sum

After that we have to add the md5sum.

makepkg -g >> PKGBUILD

Finally

Finally we should have this PGBUILD

# $Id: PKGBUILD,v 1.21 2005/05/28 09:00:06 tpowa Exp $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=kpdf
pkgver=3.4.1
kdever=3.4.1 # if minor 0, then without .0
pkgrel=1
pkgdesc="KDE pdf reader"
url="http://www.kde.org"

conflicts=(kdegraphics)
makedepends=()
depends=('kdelibs' 'xorg')

# for easier build, just uncomment the mirror you want to use
  mirror="ftp.solnet.ch/mirror/KDE"         # updated every 2 hours, very fast for Europe
# mirror="ftp.kde.org/pub/kde/"             # main server
# mirror="ibiblio.org/pub/mirrors/kde/"     # ibiblio mirror


source=(ftp://$mirror/stable/$kdever/src/kdegraphics-$pkgver.tar.bz2)
md5sums=('d91ef530a416bd8407abb28103bc049c')

build() {
  cd $startdir/src/kdegraphics-$pkgver
  ./configure --prefix=/opt/kde --disable-debug --disable-dependency-tracking --disable-kpdf-drm --enable-final
  #           --enable-final # remove this if you build with < 512mb ram.

  cd kpdf
  make ||| return 1
  make DESTDIR=$startdir/pkg install
}

HINTS & TIPS

To avoid any conflict with Arch's kde packages, add this line in PKGBUILD. This requires to compile a new kdelibs renamed to e.g. kdelibs-sta.

conflicts=('kdelibs')

'* No rule to make target
If this error appears when compiling the package, read what it says and add in PKGBUILD.

Example for Konqueor (add libkonq):

build() {
  cd $startdir/src/kdebase-$pkgver
  ./configure --prefix=/opt/kde --with-dpms \
  --disable-dependency-tracking --disable-debug
  #        --enable-final # remove this if you build with < 512mb ram.

  cd libkonq
  make

  cd ..
  cd konqueror
  make ||| return 1
  make DESTDIR=$startdir/pkg install
}

Kdesktop:

  cd libkonq
  make
  cd ..
  cd kcontrol/background
  make
  cd ..
  cd kicker/share
  make
  cd ..
  cd kdmlib
  make

  cd ..
  cd kdesktop
  make ||| return 1
  make DESTDIR=$startdir/pkg install

Standalone packages (conflict secured):

http://user-contributions.org/users/incoming/package/KDE-standalone/

More information:

http://bbs.archlinux.org/viewtopic.php?t=13370

Personal tools