You are not logged in.
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
If you're going to use the "unrar" command in the build block, you should add
makedepends=('unrar')
Offline
Ok, added. Nothing about library build?
Offline
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
Last edited by Dirhael (2008-04-11 10:34:06)
Offline
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
Last edited by brebs (2008-04-11 13:00:07)
Offline
You should also use install rather than cp as much as possible.
Offline
Thanks to all people replied. I've added this package to aur. Here it is.
Offline
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
Offline