You are not logged in.

#1 2007-08-01 14:46:21

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Xwinwrap my first cvs PKGBUILD, a little help.

As the title suggests really.

arch=(i686 x86_64)
pkgname=xwinwrap
pkgver=1.1.1.1
pkgrel=1
pkgdesc="xwinwrap a Utility to play Movies on your Desktop or ElectricSheep etc"
url="http://swik.net/xwinwrap"
license=
depends=()
provides=('xwinwrap')
conflicts=('xwinwrap')
makedepends=('cvs')

_cvsroot=":pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps"
_cvsmod="xwinwrap"

build() {
  cd $startdir/src
  msg "Connecting to $_cvsmod.freedesktop.org CVS server...."
  if [ -d $_cvsmod/CVS ]; then
    cd $_cvsmod
    cvs -z3 update -d
  else
    cvs -z3 -d $_cvsroot co $_cvsmod
    cd $_cvsmod
  fi

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

  cp -r ../$_cvsmod ../$_cvsmod-build
  cd ../$_cvsmod-build

  make || return 1
}

This is initially based on the wiki one, but the problem I've got is the pkg.tar.gz is empty, which sort of makes sense as I end up with a binary in  $_cvsmod-build.

Now my question is how should I handle it/mv it to the right place and register it with pacman/users path's?

Offline

#2 2007-08-01 14:59:19

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Xwinwrap my first cvs PKGBUILD, a little help.

You have to install it into $startdir/pkg - usually using make install with PREFIX=$startdir/pkg or DESTDIR=$startdir/pkg or something like that.  You'll have to look at the makefile or installation documentation of the app to see what it supports.

Last edited by Cerebral (2007-08-01 14:59:45)

Offline

#3 2007-08-01 15:06:00

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Xwinwrap my first cvs PKGBUILD, a little help.

It doesn't have a make install that's the bit that got me really confused, doesn't seem to use a .configure either.

Using just src after downloading typing
make
creates the binary xwinwrap in the same folder as the src, certainly not a way I've encountered before. Which then is usable as ./xwinwrap but on using abs it doesn't move the binary to the pkg.tar.gz.

So how would I tell pacman where to install it, and how do I get the binary into the pkg.tar.gz?

Offline

#4 2007-08-01 15:13:39

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Xwinwrap my first cvs PKGBUILD, a little help.

Wow, that's a tiny program... anyway, as I said, you have to install it into $startdir/pkg  -- makepkg takes the files in $startdir/pkg and tarballs them up into the .pkg.tar.gz

If the Makefile doesn't have an install target, which is true in this case, then you need to manually place xwinwrap into $startdir/pkg/usr/bin, usually with a command line

install -D -m0755 $startdir/src/xwinwrap/xwinwrap $startdir/pkg/usr/bin/xwinwrap

(check man install for more information on that command)

Offline

#5 2007-08-01 16:56:20

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Xwinwrap my first cvs PKGBUILD, a little help.

Thanks Cerebral that helped wink

arch=(i686 x86_64)
pkgname=xwinwrap
pkgver=1.1.1.1
pkgrel=1
pkgdesc="xwinwrap a Utility to play Movies on your Desktop Or ElectricSheep"
url="http://swik.net/xwinwrap"
license=
depends=()
provides=('xwinwrap')
conflicts=('xwinwrap')
makedepends=('cvs')

_cvsroot=":pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps"
_cvsmod="xwinwrap"

build() {
  cd $startdir/src
  msg "Connecting to $_cvsmod.freedesktop.org  CVS server...."
  if [ -d $_cvsmod/CVS ]; then
    cd $_cvsmod
    cvs -z3 update -d
  else
    cvs -z3 -d $_cvsroot co $_cvsmod
    cd $_cvsmod
  fi

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

  cp -r ../$_cvsmod ../../pkg
  cd ../../pkg/$_cvsmod


  make || return 1
  install -D -m0755 $startdir/pkg/xwinwrap/xwinwrap $startdir/pkg/usr/bin/xwinwrap || return 1
}

A revised version so unless you see something specific I'll post it in AUR perhaps I'm not the only one that wants ElectricSheep on my cube lol

Offline

#6 2007-08-01 17:47:49

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Xwinwrap my first cvs PKGBUILD, a little help.

you might want to make your package name xwinwrap-cvs - either that, or remove the provides and conflicts lines (since I don't know how pacman will handle a package providing and conflicting with itself)

Offline

#7 2007-08-01 18:33:08

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Xwinwrap my first cvs PKGBUILD, a little help.

I did think about xwinwrap-cvs, though I'll just remove conflicts as I can't find another one.

My bad, still learning how to write these PKGBULD's only my second one. Perhaps I'll have a little try with electricsheep tools now. wink

Offline

#8 2007-08-03 00:23:01

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Xwinwrap my first cvs PKGBUILD, a little help.

Offline

Board footer

Powered by FluxBB