You are not logged in.

#1 2008-04-11 09:07:49

SilentMan
Member
From: Ukraine
Registered: 2007-09-20
Posts: 41

Need library pkgbuld inspection.

This is pkgbuild for OpenPtch library. It comes with source files only, not sure I built it the right way.
I took instructions from this page.
pkgbuild:

# Contributor: Evgeny Grablyk <sm@linuxforum.org.ua>
pkgname=libopenptch
pkgver=1.18\_RC5
pkgrel=1
pkgdesc="An advanced feature-rich binary manipulating library"
arch=(i686)
url="http://sourceforge.net/projects/libopenptch/"
license=('GPL')
source=(http://downloads.sourceforge.net/libopenptch/OpenPtch\_$pkgver.rar)
makedepends=('unrar')
md5sums=('3d01b04b2347d9091e34709baef0f41b')

build() {
        cd $startdir/src/
        unrar x OpenPtch_$pkgver.rar && cd src && rm main.{c,h}
        gcc -fPIC -g -c -Wall *.c
        gcc -shared -Wl -o $pkgname.so *.o -lc
        mkdir -p $startdir/pkg/usr/lib && cp $pkgname.so $startdir/pkg/usr/lib/
        ldconfig -n /usr/lib
        }

Sourceforge page: http://sourceforge.net/projects/libopenptch/

Last edited by SilentMan (2008-04-11 10:29:37)

Offline

#2 2008-04-11 09:44:24

Dirhael
Member
From: /cold/north
Registered: 2008-03-12
Posts: 46

Re: Need library pkgbuld inspection.

If you're going to use the "unrar" command in the build block, you should add

makedepends=('unrar')

Offline

#3 2008-04-11 10:29:19

SilentMan
Member
From: Ukraine
Registered: 2007-09-20
Posts: 41

Re: Need library pkgbuld inspection.

Ok, added. Nothing about library build?

Offline

#4 2008-04-11 10:33:38

Dirhael
Member
From: /cold/north
Registered: 2008-03-12
Posts: 46

Re: Need library pkgbuld inspection.

SilentMan wrote:

Ok, added. Nothing about library build?

I don't really have any experience packaging libraries so I'm afraid I wouldn't be of much help there. My best suggestion would be to just look at one of the officially packaged ones from ABS to get an idea of how the preferred "Arch" way of doing this is smile

Last edited by Dirhael (2008-04-11 10:34:06)

Offline

#5 2008-04-11 12:57:54

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Need library pkgbuld inspection.

ldconfig must be run in a .install file - see examples:

abs
find /var/abs -name \*.install | xargs grep ldconfig

No need for \_, just use _

Use "|| return 1" a heck of a lot more often wink

Last edited by brebs (2008-04-11 13:00:07)

Offline

#6 2008-04-11 13:52:33

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: Need library pkgbuld inspection.

You should also use install rather than cp as much as possible.

Offline

#7 2008-04-11 18:29:44

SilentMan
Member
From: Ukraine
Registered: 2007-09-20
Posts: 41

Re: Need library pkgbuld inspection.

Thanks to all people replied. I've added this package to aur. Here it is. smile

Offline

#8 2008-04-11 19:10:56

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Need library pkgbuld inspection.

Instead of:
  mkdir -p $startdir/pkg/usr/lib
Use:
  install -d $startdir/pkg/usr/lib/

Next, we'll be arguing over whether the trailing slash is recommended smile

Offline

Board footer

Powered by FluxBB