You are not logged in.
Pages: 1
Alright, I think I have a functional pkgbuild for driftnet, but want to make sure I am doing it right. Can someone review it and let me know.
pkgname=driftnet
pkgver=0.1.6
pkgrel=1
pkgdesc="Driftnet is a program which listens to network traffic and picks out images from TCP streams it observes. Fun to run on a host which sees lots of web traffic"
url="http://www.ex-parrot.com/~chris/driftnet/"
license=""
depends=('libjpeg', 'libungif', 'gtk', 'libpcap')
makedepends=('imake')
conflicts=()
replaces=()
backup=()
install=()
source=(http://www.ex-parrot.com/~chris/driftnet/$pkgname-$pkgver.tar.gz)
md5sums=('8e11d77770452f97bb3c23f510489815')
build() {
cd $startdir/src/$pkgname-$pkgver
patch < ../../driftnet.patch || return -1
make DESTDIR=$startdir/pkg
install -D -m755 $pkgname $startdir/pkg/usr/bin/$pkgname
}
and for the little patch to actually make it compile...
--- driftnet.c 2006-05-11 18:17:43.000000000 -0400
+++ ../src/driftnet-0.1.6/driftnet.c 2002-07-09 15:26:41.000000000 -0400
@@ -585,7 +585,7 @@
} else {
/* need to make a temporary directory. */
for (;;) {
- tmpdir = strdup(tmpnam(NULL));
+ tmpdir = strdup(mkstemp(NULL));
if (mkdir(tmpdir, 0700) == 0)
break;
free(tmpdir);
Offline
Just one thing wrong - the patch file should be included in the source= array, like this:
source=(http://www.ex-parrot.com/~chris/driftnet/$pkgname-$pkgver.tar.gz driftnet.patch)
with a corresponding entry in the md5sums= array, and path adjustment in the patch command.
Other than that, you can tidy it up a bit by removing fields with no value - conflicts etc.
Offline
hmm.. since nobody seems to be doing anything more i "fixed" it up and sent it to AUR.
thanks for the work copernikus!
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
hmm.. since nobody seems to be doing anything more i "fixed" it up and sent it to AUR.
thanks for the work copernikus!
heh... I've been meaning to put it in AUR, but with haven't had the time... thanks.
-Fran
Offline
How do you apply th patch?
Offline
The patch is applied automatically by the build script in the PKGBUILD when makepkg is run. Look for the line:
patch < ../../driftnet.patch || return -1
Offline
Pages: 1