You are not logged in.

#1 2008-08-30 18:38:27

wantilles
Member
From: Athens - Greece
Registered: 2007-03-29
Posts: 327

[solved] A little help on making a mail-notification 5.4 PKGBUILD

The new mail-notification 5.4 builds in a way completely different than the 5.0 version.

So by studying the following:

- previous 5.0 Arch PKGBUILD
- mail-notification 5.4 documentation
- Gentoo 5.4 e-build

I managed to come up with these:

mail-notification.install

pkgname=mail-notification

post_install() {
  usr/sbin/gconfpkg --install ${pkgname}
  gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  update-desktop-database -q
}

pre_upgrade() {
  pre_remove $1
}

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
}

op=$1
shift

$op $*

PKGBUILD

pkgname=mail-notification
pkgver=5.4
pkgrel=1
pkgdesc="Tray icon application that informs you if you have new mail"
arch=('i686' 'x86_64')
url="http://www.nongnu.org/mailnotify/"
license=('GPL3' 'FDL')
depends=('eel>=2.18.0-2' 'cyrus-sasl-plugins' 'gmime>=2.2.6' 'libnotify>=0.4.4'
         'gconf>=2.18.0.1-4' 'gnome-keyring' 'hicolor-icon-theme'
         'desktop-file-utils')
makedepends=('gob2' 'perlxml' 'evolution>=2.12' 'gnome-doc-utils>=0.12.0')
options=('!libtool' '!emptydirs')
install=mail-notification.install
source=(http://savannah.nongnu.org/download/mailnotify/${pkgname}-${pkgver}.tar.bz2)
md5sums=('c8dc33a61251acb5474e56eab6b18f43')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}

  ./jb configure destdir=${startdir}/pkg prefix=/usr \
         cflags="${CFLAGS}" cppflags="${CXXFLAGS}" ldflags="${LDFLAGS}" \
         scrollkeeper-dir="/var/lib/scrollkeeper" \
           sysconfdir=/etc localstatedir=/var \
         library-mode=0755
  ./jb build

  GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" ./jb install

  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

  rm -rf ${startdir}/pkg/var/lib/scrollkeeper
}

It builds and installs fine.

If you compare however the filelist of the 5.0 version with that of the 5.4 version, you will see that the application's default configuration is missing from the gconf2 gschemas.

And this needs to be done because when ran, the program exits immediately complaining it cannot find its default configuration.

Any help on how to make the gschemas correctly?

This is the only thing needed to be done, and it should finally work.

Last edited by wantilles (2008-08-31 08:52:32)

Offline

#2 2008-08-31 08:53:38

wantilles
Member
From: Athens - Greece
Registered: 2007-03-29
Posts: 327

Re: [solved] A little help on making a mail-notification 5.4 PKGBUILD

OK it seems the jb build system was not giving default values as it should to two variables.

A PKGBUILD that works is this:

pkgname=mail-notification
pkgver=5.4
pkgrel=1
pkgdesc="Tray icon application that informs you if you have new mail"
arch=('i686' 'x86_64')
url="http://www.nongnu.org/mailnotify/"
license=('GPL3' 'FDL')
depends=('eel>=2.18.0-2' 'cyrus-sasl-plugins' 'gmime>=2.2.6' 'libnotify>=0.4.4'
         'gconf>=2.18.0.1-4' 'gnome-keyring' 'hicolor-icon-theme'
         'desktop-file-utils')
makedepends=('gob2' 'perlxml' 'evolution>=2.12' 'gnome-doc-utils>=0.12.0')
options=('!libtool' '!emptydirs')
install=mail-notification.install
source=(http://savannah.nongnu.org/download/mailnotify/${pkgname}-${pkgver}.tar.bz2)
md5sums=('c8dc33a61251acb5474e56eab6b18f43')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}

  ./jb configure destdir=${startdir}/pkg prefix=/usr \
         cflags="${CFLAGS}" cppflags="${CXXFLAGS}" ldflags="${LDFLAGS}" \
         scrollkeeper-dir="/var/lib/scrollkeeper" \
           sysconfdir=/etc gconf-schemas-dir=/etc/gconf/schemas \
         install-gconf-schemas=yes localstatedir=/var \
         library-mode=0755
  ./jb build

  GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" ./jb install

  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

  rm -rf ${startdir}/pkg/var/lib/scrollkeeper
}

Offline

#3 2008-09-11 21:06:48

krims0n
Member
Registered: 2008-08-25
Posts: 17

Re: [solved] A little help on making a mail-notification 5.4 PKGBUILD

Thanks for this, perhaps you can add it AUR ? smile

Offline

#4 2008-09-12 05:59:25

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] A little help on making a mail-notification 5.4 PKGBUILD

krims0n wrote:

Thanks for this, perhaps you can add it AUR ? smile

Don't add it to AUR. It's already in extra. If you want to do something, send the updated PKGBUILD and .install file to the package maintainer.

Offline

#5 2008-09-13 09:27:11

krims0n
Member
Registered: 2008-08-25
Posts: 17

Re: [solved] A little help on making a mail-notification 5.4 PKGBUILD

Snowman wrote:
krims0n wrote:

Thanks for this, perhaps you can add it AUR ? smile

Don't add it to AUR. It's already in extra. If you want to do something, send the updated PKGBUILD and .install file to the package maintainer.

Done.

Offline

Board footer

Powered by FluxBB