You are not logged in.

#1 2012-09-18 22:45:43

mlee
Member
Registered: 2008-05-31
Posts: 7

PKGBUILD for hydrogen-git

This was requested in a comment on the hydrogen-svn aur page.  I converted that PKGBUILD into one to build hydrogen from its new git repository.

pkgname=hydrogen-git
pkgver=20120915
pkgrel=1
pkgdesc="Drum Machine and Pattern-based Sequencer"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.hydrogen-music.org/"
depends=('jack' 'liblrdf' 'qt' 'lash' 'libarchive')
provides=('hydrogen')
conflicts=('hydrogen')

_gitroot="https://github.com/hydrogen-music/hydrogen.git"
_gitname="hydrogen"


build() {
  cd "${srcdir}"

  msg "Connecting to GIT server...."

  if [ -d ${srcdir}/$_gitname ] ; then
    cd $_gitname && git pull origin master
    msg "Local repository updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout."
  msg "Starting make..."

  rm -rf "${srcdir}/${_gitname}-build"
  cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
  cd "${srcdir}/${_gitname}-build"
}

package() {
  mkdir -p "${srcdir}/${_gitname}-build/build"
  cd "${srcdir}/${_gitname}-build/build"

  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DWANT_LASH:BOOL=ON -DWANT_LIBARCHIVE:BOOL=ON ..
  make DESTDIR="${pkgdir}" install
}

Offline

#2 2012-09-18 22:48:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: PKGBUILD for hydrogen-git

You may want to post it (or a link to this thread) in the comments too :-)

That was fast :-)

Last edited by karol (2012-09-18 22:48:50)

Offline

#3 2012-09-18 23:55:10

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,219
Website

Re: PKGBUILD for hydrogen-git

A couple comments:

Git should be listed in makedepends.

You should not have to "mkdir" the build directory.  If it isn't already there then there certainly isn't a makefile in it to run make on.

The build process (cmake and make) should be in the build function.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#4 2012-09-30 14:03:31

funkmuscle
Member
Registered: 2006-02-09
Posts: 506

Re: PKGBUILD for hydrogen-git

the build fail for me using this but works using the git tree or link from H2's website:

==> Local repository updated.
==> GIT checkout done or server timeout.
==> Starting make...
==> Entering fakeroot environment...
==> Starting package()...
CMake Error: The source directory "/tmp/packerbuild-1000/hydrogen-git/hydrogen-git/src/hydrogen-build/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
==> ERROR: A failure occurred in package().
    Aborting...
The build failed.

Offline

#5 2012-11-05 01:52:31

funkmuscle
Member
Registered: 2006-02-09
Posts: 506

Re: PKGBUILD for hydrogen-git

any help at all with this?


figured it out now!!

Last edited by funkmuscle (2012-11-05 02:00:23)

Offline

Board footer

Powered by FluxBB