You are not logged in.

#1 2008-07-21 22:18:27

sablabra
Member
Registered: 2008-07-21
Posts: 32

[PKGBUILD] Need help with yanihp-git PKGBUILD

I was briefly trying to put together my first PKGBUILD, or more specifically PKGBUILD-git. However, I keep getting "ERROR: Build Failed" message when I run makepkg, and it doesn't give me any more info. I'm using Arch64, I haven't tested if it works on Arch i686. Perhaps someone will tell me/figure out what I'm doing wrong? smile

PKGBUILD:

pkgname=yanihp-git
pkgver=20080722
pkgrel=1
pkgdesc="a Qt 4.4-based media player"
arch=(i686 x86_64)
url="http://www.fredemmott.co.uk/"
license=('GPL')
groups=()
depends=('qt' 'taglib')
makedepends=('git' 'cmake')
provides=('yanihp')
conflicts=('yanihp')
source=()
md5sums=() #generate with 'makepkg -g'

_gitroot="http://git.fredemmott.co.uk/repo/yanihp/"
_gitname="yanihp"

build() {
  cd $startdir/src
  msg "Connecting to git.fredemmott.co.uk GIT server...."

  if [ -d $startdir/src/$_gitname ] ; then
    cd $_gitname && git-pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi

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

  #Remove old -build
  rm -r $startdir/src/$_gitname-build
  
  cp -r $startdir/src/$_gitname $startdir/src/$_gitname-build
  cd $startdir/src/$_gitname-build

  #
  # BUILD HERE
  #

  cmake || return 1
  make || return 1
  make DESTDIR=$startdir/pkg/ install
}

Offline

#2 2008-07-21 22:34:16

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [PKGBUILD] Need help with yanihp-git PKGBUILD

The "Build failed" message comes from makepkg, and is not of much use here. The actual error will be somewhere in the build output. If you're having trouble locating it, use the -L flag and pastebin the build log for others to look at.

Offline

#3 2008-07-21 23:26:38

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [PKGBUILD] Need help with yanihp-git PKGBUILD

I find the best way to do PKGBUILDs is to get the code to at least compile from the command line, that way you know what commands need to go into the build function.  That way, if makepkg still fails I only have a small range of possibilities to look at.

The INSTALL file for yanihp (from the git download) says

To build:

mkdir build
cd build
cmake ..
make

To install:

make install

so I changed the build bit in your PKGBUILD to

  #
  # BUILD HERE
  #

  mkdir build || return 1
  cd build || return 1
  cmake .. || return 1
  make || return 1
  make DESTDIR=$startdir/pkg/ install || return 1

Tha actual compile failed for me after 72% because it needs QT4 components that I dont have on my system (phonon) so you probably need a dependancy on phonon in your PKGBUILD.  Looking at the Makefile generated I'm not sure that your 'make DESTDIR' line will work since DESTDIR does not appear in the Makefile.

Last edited by ghostHack (2008-07-21 23:41:10)

Offline

#4 2008-07-22 10:00:01

sablabra
Member
Registered: 2008-07-21
Posts: 32

Re: [PKGBUILD] Need help with yanihp-git PKGBUILD

Thanks for your help. After doing the changes you suggested and installed phonon, I now got this message:

==> Starting make...
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.4.0
-- Found OpenSSL: /usr/lib/libssl.so
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
QT_PHONON_INCLUDE_DIR (ADVANCED)

-- Configuring done
==> ERROR: Build Failed.
    Aborting...

Should I set the variables in the PKGBUILD? And if so, how?

Offline

#5 2008-07-26 12:07:55

sablabra
Member
Registered: 2008-07-21
Posts: 32

Re: [PKGBUILD] Need help with yanihp-git PKGBUILD

No one knows what I need to do?

Offline

Board footer

Powered by FluxBB