diff --git a/pisi/actionsapi/autotools.py b/pisi/actionsapi/autotools.py
index 70142989..805b7e59 100644
--- a/pisi/actionsapi/autotools.py
+++ b/pisi/actionsapi/autotools.py
@@ -6,20 +6,18 @@ from pisi.context import const
def configure(parameters = ''):
''' FIXME: Düzgün hale getirilecek '''
- ''' {EXTRA} = '--with-nls --with-libusb --with-something-usefull '''
+ ''' parameters = '--with-nls --with-libusb --with-something-usefull '''
- # FIXME: I don't think its feasible to write all these parameters
- # here. There should be a way to get all these... pisi.context.Constants?
configure_string = './configure --prefix=/usr \
--host=i686-pc-linux-gnu \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc \
- --localstatedir=/var/lib {EXTRA}'
+ --localstatedir=/var/lib \
+ %s' % parameters
- cmd = configure_string.replace('{EXTRA}', parameters)
- os.system(cmd)
+ os.system(configure_string)
def make():
''' FIXME: Düzgün hale getirilecek '''
@@ -27,18 +25,18 @@ def make():
def install():
''' FIXME: Düzgün hale getirilecek '''
- ''' {D} = /var/tmp/pisi/ _paket_adı_ /image/ '''
+ ''' dir_suffix = /var/tmp/pisi/ _paket_adı_ /image/ '''
global const
- install_string = 'make prefix={D}/usr \
- datadir={D}/usr/share \
- infodir={D}/usr/share/info \
- localstatedir={D}/var/lib \
- mandir={D}/usr/share/man \
- sysconfdir={D}/etc \
- install'
+ dir_suffix = os.path.dirname(os.path.dirname(os.getcwd())) + \
+ const.install_dir_suffix
- cmd = os.path.dirname(os.path.dirname(os.getcwd())) + \
- const.install_dir_suffix
- cmd = install_string.replace('{D}', cmd)
- os.system(cmd)
+ install_string = 'make prefix=%(prefix)s/usr \
+ datadir=%(prefix)s/usr/share \
+ infodir=%(prefix)s/usr/share/info \
+ localstatedir=%(prefix)s/var/lib \
+ mandir=%(prefix)s/usr/share/man \
+ sysconfdir=%(prefix)s/etc \
+ install' % {'prefix': dir_suffix}
+
+ os.system(install_string)
diff --git a/pisi/actionsapi/kde.py b/pisi/actionsapi/kde.py
new file mode 100644
index 00000000..28d7606b
--- /dev/null
+++ b/pisi/actionsapi/kde.py
@@ -0,0 +1,40 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import os
+from pisi.context import const
+
+# Global variables for compiling KDE programs...
+kde_dir = os.getenv('KDEDIR')
+qt_dir = os.getenv('QTDIR')
+qt_libdir = os.getenv('QTDIR') + '/lib/'
+
+def configure(parameters = ''):
+ ''' FIXME: Düzgün hale getirilecek '''
+ ''' parameters = '--with-nls --with-libusb --with-something-usefull '''
+
+ configure_string = './configure --prefix=%s \
+ --host=i686-pc-linux-gnu \
+ --with-x \
+ --enable-mitshm \
+ --with-qt-dir=%s \
+ --enable-mt \
+ --with-qt-libraries=%s \
+ %s' % (kde_dir, qt_dir, qt_libdir, parameters)
+
+ os.system(configure_string)
+
+def make():
+ ''' FIXME: Düzgün hale getirilecek '''
+ os.system('make')
+
+def install():
+ ''' FIXME: Düzgün hale getirilecek '''
+ ''' dir_suffix = /var/tmp/pisi/ _paket_adı_ /image/ '''
+ global const
+
+ dir_suffix = os.path.dirname(os.path.dirname(os.getcwd())) + \
+ const.install_dir_suffix
+
+ install_string = 'make prefix=%s/%s install' % (dir_suffix, kde_dir)
+ os.system(install_string)
diff --git a/samples/amarok/actions.py b/samples/amarok/actions.py
index a1c85a8f..aa0b88a1 100644
--- a/samples/amarok/actions.py
+++ b/samples/amarok/actions.py
@@ -2,15 +2,18 @@
# -*- coding: utf-8 -*-
from pisi.actionsapi import gnuconfig
-from pisi.actionsapi import autotools
+from pisi.actionsapi import kde
def setup():
gnuconfig.gnuconfig_update()
-# libtoolize.libtoolize()
- autotools.configure()
+
+ # amarok does not respect kde coding standards, and makes a lot of
+ # assuptions regarding its installation directory. For this reason,
+ # it must be installed in the KDE install directory.
+ kde.configure('--with-arts --with-xine --with-gstreamer --with-opengl --with-libvisual --disable-amazon --disable-debug --without-debug')
def build():
- autotools.make()
+ kde.make()
def install():
- autotools.install()
+ kde.install()
diff --git a/samples/amarok/amarok-1.3-beta1.pspec b/samples/amarok/amarok-1.3-beta1.pspec
index 29bb4465..45a7e58f 100644
--- a/samples/amarok/amarok-1.3-beta1.pspec
+++ b/samples/amarok/amarok-1.3-beta1.pspec
@@ -39,10 +39,10 @@
kdebase
- /usr/lib
- /usr/share
- /usr/share/locale
- /usr/bin
+ /usr/kde/3.4/lib
+ /usr/kde/3.4/share
+ /usr/kde/3.4/share/locale
+ /usr/kde/3.4/bin
@@ -53,7 +53,7 @@
This package provides documentation files for Amarok.
- /usr/share/doc
+ /usr/kde/3.4/share/doc