You are not logged in.

#1 2013-01-25 15:14:12

David López
Member
Registered: 2012-08-26
Posts: 98

indicator-ubuntuone (my first PKGBUILD, I need review)

Hi, I've made a PKGBUILD of indicator-ubuntuone. I've used City-busz's indicator-sync as a model, but honestly I'm not sure of what I'm doing. It's my first build, I'll appreciate suggestions, corrections,... before uploading it to AUR.

PKGBUILD

# Maintainer: David López <david dot lopez at upct dot es>

pkgname=indicator-ubuntuone
pkgver=1.0.6
pkgrel=1
pkgdesc="An indicator displaying current Ubuntu One synchronization state"
arch=('i686' 'x86_64')
url="https://launchpad.net/indicator-ubuntuone"
license=('GPL')
depends=('libgee' 'libappindicator3' 'libsoup' 'json-glib' 'libnotify' 'liboauth' 'xdg-utils' 'ubuntuone-control-panel')
makedepends=('intltool' 'gobject-introspection')
optdepends=('ubuntu-mono: Ubuntu Mono Icon theme')
options=('!libtool')
install=$pkgname.install
source=(https://launchpad.net/$pkgname/trunk/$pkgver/+download/$pkgname-$pkgver.tar.bz2)
md5sums=('488111cd82e5d4ed96110d9741b1a1a8')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
              --disable-static
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}

indicator-ubuntuone.install

post_install() {
  xdg-icon-resource forceupdate
}

post_upgrade() {
  post_install $1
}

post_remove() {
  post_install $1
}

Offline

#2 2013-01-26 00:30:12

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: indicator-ubuntuone (my first PKGBUILD, I need review)

Looks good, but vala needs to be added to makedepends.

Offline

#3 2013-01-26 07:56:11

David López
Member
Registered: 2012-08-26
Posts: 98

Re: indicator-ubuntuone (my first PKGBUILD, I need review)

tdy wrote:

Looks good, but vala needs to be added to makedepends.

Thanks tdy. I tried to extract the dependances from PKG_CHECK_MODULES in configure.ac

AC_INIT([indicator-ubuntuone],
        [1.0.6],
        [https://bugs.launchpad.net/indicator-ubuntuone/+filebug],
        [indicator-ubuntuone],
        [https://launchpad.net/indicator-ubuntuone])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 dist-bzip2])
AM_MAINTAINER_MODE

AC_PROG_CC
AM_PROG_CC_C_O
AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AC_PATH_PROG(VALAC, valac-0.16, valac)
AC_SUBST(VALAC)

AH_TEMPLATE([GETTEXT_PACKAGE], [Package name for gettext])
GETTEXT_PACKAGE=indicator-ubuntuone
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.40.0])

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

PKG_CHECK_MODULES(INDICATOR_UBUNTUONE,
                  gtk+-3.0
                  gee-1.0
                  appindicator3-0.1
                  libsoup-2.4
                  indicator3-0.4
                  json-glib-1.0
                  libnotify
                  oauth )
AC_SUBST(INDICATOR_UBUNTUONE_CFLAGS)
AC_SUBST(INDICATOR_UBUNTUONE_LIBS)

INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`

AC_SUBST(INDICATORDIR)
AC_SUBST(INDICATORICONSDIR)

DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
AC_SUBST(DBUSSERVICEDIR)

AC_CONFIG_FILES([Makefile
    src/Makefile
    data/Makefile
    data/icons/ubuntu-mono-dark/Makefile
    data/icons/ubuntu-mono-dark/status/Makefile
    data/icons/ubuntu-mono-dark/status/24/Makefile
    data/icons/ubuntu-mono-dark/status/22/Makefile
    data/icons/ubuntu-mono-light/Makefile
    data/icons/ubuntu-mono-light/status/Makefile
    data/icons/ubuntu-mono-light/status/24/Makefile
    data/icons/ubuntu-mono-light/status/22/Makefile
    data/icons/Makefile
    po/Makefile.in
    vapi/Makefile])

AC_OUTPUT

You're telling me vala is necessary from AC_PATH_PROG, right?

Offline

#4 2013-01-26 13:55:18

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: indicator-ubuntuone (my first PKGBUILD, I need review)

Well in this particular case I just built indicator-ubuntuone in a clean system, and at some point it broke after trying to use valac.

Last edited by tdy (2013-01-26 14:00:27)

Offline

#5 2013-01-28 08:25:30

David López
Member
Registered: 2012-08-26
Posts: 98

Re: indicator-ubuntuone (my first PKGBUILD, I need review)

You've tested in a clean install, very clever ;-)

Thank you, I've included vala dependance and uploded to AUR.

Offline

Board footer

Powered by FluxBB