You are not logged in.

#1 2008-12-22 00:04:20

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Help with a PKGBUILD

Hello I am creating a PKGBUILD for an branch of ffmpeg, but I need a libswscale git pull to

Here is my PKGBUILD:

pkgname=ffmpeg-mt
pkgver=20081222
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
arch=('i686' 'x86_64')
url="http://ffmpeg.mplayerhq.hu/"
license=('GPL')
depends=('zlib' 'imlib2')
makedepends=('git')
provides=("ffmpeg=`date +%Y%m%d`")
conflicts=('ffmpeg')
source=()
md5sums=()

_gitroot="git://gitorious.org/ffmpeg/mainline.git"
_gitname="mainline"

build() {
  cd ${srcdir}
  msg "Connecting to gitorious.org GIT server...."

  if [ -d ${srcdir}/$_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..."

  cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build
  cd ${srcdir}/$_gitname-build

  git clone git://gitorious.org/libswscale/

  ./configure \
  --prefix=/usr \
  --enable-gpl \
  --disable-libmp3lame \
  --disable-libvorbis \
  --disable-libfaac \
  --disable-libfaad \
  --disable-libxvid \
  --disable-libx264 \
  --disable-libtheora \
  --enable-postproc \
  --enable-shared \
  --enable-pthreads \
  --enable-x11grab \
  --enable-swscale \
  --arch=`uname -m` \
  || return 1

  make -j 2 || return 1
  make doc/ff{mpeg,play,server}.1 || return 1

  mkdir -p $startdir/pkg/usr/share/ffmpeg || return 1
  install -m644 $srcdir/$_svnmod/ffpresets/*.ffpreset $startdir/pkg/usr/share/ffmpeg || return 1
  
  make DESTDIR="$pkgdir" install || return 1
  make DESTDIR="$pkgdir" install-man || return 1

}

But when I run the PKGBUILD I get this:

fatal: destination directory 'libswscale' already exists.

What am I doing wrong?

Last edited by Roberth (2008-12-22 00:42:30)


Use the Source, Luke!

Offline

#2 2008-12-22 18:46:45

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: Help with a PKGBUILD

So many views and no suggestions?:(


Use the Source, Luke!

Offline

#3 2008-12-22 22:07:03

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: Help with a PKGBUILD

Maybe others were like me and didn't really understand your question.. what exactly is your question?  The error message is pretty clear..


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#4 2008-12-22 22:23:58

xaiviax
Member
From: Michigan
Registered: 2008-11-04
Posts: 282

Re: Help with a PKGBUILD

creslin wrote:

The error message is pretty clear..

It's not clear to me, and doesn't seem to be clear to the OP, so why don't you explain it then?

Offline

#5 2008-12-22 22:27:37

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Help with a PKGBUILD

fatal: destination directory 'libswscale' already exists.

Find out where the "libswscale" directory is, and put in a line in to the PKGBUILD to remove it?

Offline

#6 2008-12-22 22:28:14

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: Help with a PKGBUILD

"destination directory 'libswscale' already exists"

I really don't know how it can be explained any more clearly, so I guess I have to ask which part you don't understand.

Last edited by creslin (2008-12-22 22:36:48)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#7 2008-12-22 22:39:40

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: Help with a PKGBUILD

Beyond the simple problem of the directory already existing, I think you're going to have a problem checking out another git repository inside an existing check out. Somebody with better git-fu may correct me here, but I would check out the second git repo alongside the ffmpeg mainline checkout, and cp it into the build directory.

Untested (also, note this PKGBUILD contains an rm -rf to remove the offending directory. Use at your own risk!):

pkgname=ffmpeg-mt
pkgver=20081222
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
arch=('i686' 'x86_64')
url="http://ffmpeg.mplayerhq.hu/"
license=('GPL')
depends=('zlib' 'imlib2')
makedepends=('git')
provides=("ffmpeg=`date +%Y%m%d`")
conflicts=('ffmpeg')
source=()
md5sums=()

_gitroot="git://gitorious.org/ffmpeg/mainline.git"
_gitname="mainline"

_libswscaleroot="git://gitorious.org/libswscale/mainline.git"
_libswscalename="libswscale"

build() {
  cd ${srcdir}
  msg "Connecting to gitorious.org GIT server...."

  if [ -d ${srcdir}/$_gitname ] ; then
    cd ${srcdir}/$_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi
  msg "GIT checkout done or server timeout"

  msg "Connecting to gitorious.org GIT server for libswscale...."
  if [ -d ${srcdir}/$_libswscalename ] ; then
    cd ${srcdir}/$_libswscalename && git pull origin
    msg "The local files are updated."
  else
    cd ${srcdir}
    git clone $_libswscaleroot $_libswscalename
  fi
  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build
  cd ${srcdir}/$_gitname-build
  rm -rf libswscale &&  cp -r ${srcdir}/$_libswscalename libswscale

  ./configure \
  --prefix=/usr \
  --enable-gpl \
  --disable-libmp3lame \
  --disable-libvorbis \
  --disable-libfaac \
  --disable-libfaad \
  --disable-libxvid \
  --disable-libx264 \
  --disable-libtheora \
  --enable-postproc \
  --enable-shared \
  --enable-pthreads \
  --enable-x11grab \
  --enable-swscale \
  --arch=`uname -m` \
  || return 1

  make -j 2 || return 1
  make doc/ff{mpeg,play,server}.1 || return 1

  mkdir -p $startdir/pkg/usr/share/ffmpeg || return 1
  install -m644 $srcdir/$_svnmod/ffpresets/*.ffpreset $startdir/pkg/usr/share/ffmpeg || return 1

  make DESTDIR="$pkgdir" install || return 1
  make DESTDIR="$pkgdir" install-man || return 1

}

EDIT: oh yeah, cp a builddir for libswscale

Last edited by nogoma (2008-12-22 22:50:54)


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#8 2008-12-23 06:58:31

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: Help with a PKGBUILD

  install -m644 $srcdir/$_svnmod/ffpresets/*.ffpreset $startdir/pkg/usr/share/ffmpeg || return 1

That line doesn't seem to work. A part from that, THX!

Last edited by Roberth (2008-12-23 06:59:00)


Use the Source, Luke!

Offline

Board footer

Powered by FluxBB