From fcd8caf2fc9134569b5978fc02a167d3afd6c0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Tue, 28 Jun 2005 13:19:37 +0000 Subject: [PATCH] =?UTF-8?q?...=20=20=20=20=20*=20KDE=20uygulamalar=C4=B1?= =?UTF-8?q?=20i=C3=A7in=20kde=20api'si=20eklendi.=20ActionsAPI'yi=20OO'ya?= =?UTF-8?q?=20=C3=A7evirip=20=C3=A7evirmemek=20=C3=BCzerinde=20=C3=A7ok=20?= =?UTF-8?q?d=C3=BC=C5=9F=C3=BCnd=C3=BCm=20ve=20bir=20getirisi=20olmayaca?= =?UTF-8?q?=C4=9F=C4=B1na=20karar=20verdim.=20Fonksiyonal=20hali=20ile=20d?= =?UTF-8?q?evam.=20=C5=9Eimdilik=20fonksiyonlar=20her=20ne=20kadar=20birbi?= =?UTF-8?q?rini=20tekrarl=C4=B1yor=20gibi=20g=C3=B6r=C3=BCnsede=20ilerde?= =?UTF-8?q?=20ba=C5=9Fka=20destekler=20(=20ccache=20v.s=20gibi=20)=20girdi?= =?UTF-8?q?k=C3=A7e=20birbirlerinden=20ayr=C4=B1lacaklar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Barış'ın bu argümanları buraya böylece yazmayalım yorumu çıkartıldı, gene yukarıdaki sebepten dolayı bundan başka çaremiz olmadığına karar verdim. * Amarok'un actions.py'si kde'yi kullanacak şekilde değiştirildi. Buna uygun olarak spec'te değiştirildi. --- pisi/actionsapi/autotools.py | 34 +++++++++++------------ pisi/actionsapi/kde.py | 40 +++++++++++++++++++++++++++ samples/amarok/actions.py | 13 +++++---- samples/amarok/amarok-1.3-beta1.pspec | 10 +++---- 4 files changed, 69 insertions(+), 28 deletions(-) create mode 100644 pisi/actionsapi/kde.py 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