You are not logged in.

#1 2009-06-30 03:23:39

majiq
Member
Registered: 2009-03-06
Posts: 259

My first PKGBUILD: feedback?

Hello.

I'm finally trying to install something that both is not available in the repository and I have a sneaking suspicion I'll want to remove at some point, so I'm actually working with making a PKGBUILD and using pacman. So, I'm just looking for feedback.

Two things I think that may come up:
1) Why did I do an svn install as my first: Because the latest available version doesn't work well with the latest ffmpeg update.
2) Do I know that 'BSD' is not a valid license: Yes, but it's the only one they list. What else can I do?

# Contributor: Muhammad Qadri <maqadri@comcast.net>
pkgname=vxl-svn
pkgver=25554
pkgrel=1
pkgdesc="Collection of C++ libraries designed for computer vision research and implementation"
arch=('i686')
url="http://vxl.sourceforge.net"
license=('BSD')
groups=()
depends=()
makedepends=('subversion' 'cmake')
provides=('vxl')
conflicts=('vxl')
replaces=()
backup=()
options=()
install=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'

_svntrunk=https://vxl.svn.sourceforge.net/svnroot/vxl/trunk
_svnmod=vxl

build() {
  cd "$srcdir"

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

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

  rm -rf "$srcdir/$_svnmod-build"
  cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  cd "$srcdir/$_svnmod-build"

  cmake -DCMAKE_INSTALL_PREFIX=/usr "$srcdir/$_svnmod-build"

  # If you want to customize options, uncomment one of the following two lines.
  # Only one should be uncommented at a time.
  # ccmake "$srcdir/$_svnmod-build"
  # cmake -i "$srcdir/$_svnmod-build"

  make || return 1
  make DESTDIR="$pkgdir/" install
}

Last edited by majiq (2009-06-30 03:24:48)

Offline

#2 2009-06-30 16:16:26

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: My first PKGBUILD: feedback?

I am currently building your package. It takes long, no errors yet. I try on x86_64, so you can add that architecture to th arch array.

If everything works, you should remove lines containing sad) from your PKGBUILD.

The license is stated in vxl_copyright.h, so you should copy that file using

install -Dm644 $srcdir/vxl-build/core/vxl_copyright.h $pkgdir/usr/share/licenses/$pkgname/vxl_copyright.h

and replace

license=('BSD')

by

license=('custom:BSD')

or

license=('custom')

Offline

#3 2009-06-30 16:47:49

dezza
Member
From: Denmark
Registered: 2007-04-05
Posts: 126

Re: My first PKGBUILD: feedback?

Hey, would you like to comment on mine as well, is there something that needs to be added?

I wanted to try out bash-4.0 for fun to try out some special commands, I created both bash-4.0 and readline-6.0 from earlier abs PKGBUILDs with edited values.

http://dezza.dk/aur/bash/
http://dezza.dk/aur/readline/

Thanks in advance ..

Offline

#4 2009-06-30 22:15:36

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: My first PKGBUILD: feedback?

dezza, bash and readline are in [testing]. You can compare that PKGBUILDs with yours. If you do not want info files, you can use the !docs flag in the options-line. Arch normally adds info files.

majiq, the build fails for me. Do you have -fPIC under CXXFLAGS in your makepkg.conf? If so, the PKGBUILD should work, but you cannot rely on that. So adding

  export CFLAGS="$CFLAGS -fPIC"
  export CXXFLAGS="$CXXFLAGS -fPIC"

before the cmake step may be required (not sure about the first line).

Offline

#5 2009-06-30 22:24:53

dezza
Member
From: Denmark
Registered: 2007-04-05
Posts: 126

Re: My first PKGBUILD: feedback?

Stefan Husmann wrote:

dezza, bash and readline are in [testing].

I just found out lol.

Handy.

Offline

#6 2009-07-01 04:06:35

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: My first PKGBUILD: feedback?

The build did not fail for me, except for in that I found out that the developers created a glmovie executable, of which I already have one in my /usr/bin, so I need to maybe patch that (I'll probably do a sed).

Edit: A dev says that he fixed this in the trunk, so it shouldn't need a patch anymore.

What do the export lines do? Rather, what does -fPIC do as an argument? Also, wouldn't I just need to add that as a cmake argument? I do not have it in my makepkg.conf. Where/how exactly does it fail? Can you post some output? No, I don't expect you to compile it again, I know it's a pain, but I think it'd help to know and maybe send that in to the devs if necessary.

Last edited by majiq (2009-07-01 04:10:30)

Offline

#7 2009-07-01 04:15:04

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: My first PKGBUILD: feedback?

Stefan Husmann wrote:

I am currently building your package. It takes long, no errors yet. I try on x86_64, so you can add that architecture to th arch array.

If everything works, you should remove lines containing sad) from your PKGBUILD.

The license is stated in vxl_copyright.h, so you should copy that file using

install -Dm644 $srcdir/vxl-build/core/vxl_copyright.h $pkgdir/usr/share/licenses/$pkgname/vxl_copyright.h

and replace

license=('BSD')

by

license=('custom:BSD')

or

license=('custom')

Lines containing empty parentheses have been removed.

Thanks for the catch on the copyright. I'll take a note for the future that there may be a specific file for it not in the root of the trunk.

Thanks.

Offline

#8 2009-07-01 13:40:05

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: My first PKGBUILD: feedback?

Hmm...the build is now failing for me, too, but that said, there's been an svn update. I'm going to look into this, and the -fPIC flag.

Offline

Board footer

Powered by FluxBB