You are not logged in.

#1 2008-03-29 02:35:23

disturbed1
Member
Registered: 2008-02-29
Posts: 13

Need help with schemas

Attempting to make a PKGBUILD for brightside. Everything goes fine, except merging the gconf schemas correctly.

Here's the files

PKGBUILD

# Contributor: disturbed1 <disturbed1976@gmail.com>
pkgname=brightside
pkgver=1.4.0
pkgrel=1
pkgdesc="Add reactivity to the corners and edges of your GNOME desktop"
depends=('libgnomeui' 'libwnck')
arch=('i686' 'x86_64')
license=('GPL')
install=brightside.install
source=('http://archive.ubuntu.com/ubuntu/pool/universe/b/brightside/brightside_1.4.0.orig.tar.gz'
    'wnck_workspace.patch'
    'brightside.install')
md5sums=('7cbe6056db177fd2a4bfe7b0f889dec9' 'ef4fef5c25077b81ecce32440a20fec3' '582d0e04a95efbe0bc71b863e91d2807')

build() {
  cd $startdir/src/$pkgname-$pkgver.orig/src
  patch -Np1 -i $startdir/wnck_workspace.patch || return 1
  cd ..
  ./configure --prefix=/usr --enable-tray-icon
  make || return 1
  make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=$startdir/pkg install || return 1
  
  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas \
  ${startdir}/pkg/etc/gconf/schemas/*.schemas
  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
}

wnck_workspace.patch

--- src/brightside.c.orig    Sun Mar 13 19:44:54 2005
+++ src/brightside.c    Sun Mar 13 19:47:26 2005
@@ -1253,7 +1253,7 @@
 
     new_workspace = wnck_screen_get_workspace (brightside->screen, new_index);
     if (new_workspace) {
-        wnck_workspace_activate (new_workspace);
+        wnck_workspace_activate (new_workspace, event->time);
         pager_show (brightside, new_workspace, n_rows, TRUE);
     }
     
@@ -1540,7 +1540,7 @@
 
     new_workspace = wnck_screen_get_workspace (
             brightside->screen, new_space);
-    wnck_workspace_activate (new_workspace);
+    wnck_workspace_activate (new_workspace, gtk_get_current_event_time());
 
     pager_show (brightside, new_workspace, rows, FALSE);

brightside.install

pkgname=brightside

post_install() {
  cat << EOM
>> Current actions are:
>> Fade out volume (uses the OSS mixer by default, then ALSA; the ALSA code 
>> doesn't work too well)
>> Prevent screensaver starting (implemented by running 
>> xscreensaver-command -deactivate every 30 seconds)
>> Start screensaver and lock screen (using xscreensaver-command -lock)
>> Enter DPMS standby mode (using xset dpms force standby)
>> Enter DPMS suspend mode
>> Enter DPMS off mode
>> Dim laptop backlight (kernel 2.4.18-rc2-benh minimum, PowerBooks only)
>> Custom action
EOM
  usr/sbin/gconfpkg --install ${pkgname}
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  update-desktop-database -q
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  usr/sbin/gconfpkg --uninstall ${pkgname}
}

post_remove() {
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  update-desktop-database -q
}

I'm left with an empty schema file in /usr/share/gconf/schemas/ but the correct schema is in the built pkg. I screwed up the make or install options. This my first attempt with a propper Gnome PKGBUILD.

Last edited by disturbed1 (2008-03-29 02:37:05)

Offline

#2 2008-03-30 09:25:26

disturbed1
Member
Registered: 2008-02-29
Posts: 13

Re: Need help with schemas

Fixed it, I think. Changed the end of the PKGBUILD to read this instead.

mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
cp ${startdir}/pkg/usr/etc/gconf/schemas/*.schemas ${startdir}/pkg/usr/share/gconf/schemas/
rm -rf ${startdir}/pkg/usr/etc/

Offline

Board footer

Powered by FluxBB