You are not logged in.

#1 2015-04-16 12:15:20

x11tete11x
Member
Registered: 2015-03-08
Posts: 3

Troubles with own netkit pkgbuild

Hi guys, i have a trouble doing my own pkgbuild for netkit (i need it for one subject big_smile) look, this is my pkgbuild:

# Contributor: Claudio Pisa <clauz@ninux.org>
# Contributor: Tete Plaza <11tete11@gmail.com>
pkgname=netkit
pkgver=2.8
pkgrel=8
pkgdesc="A network emulator"
arch=('i686' 'x86_64')
url="http://www.netkit.org"
license=('GPL')
depends=('glibc' 'gawk' 'coreutils' 'findutils' 'util-linux' 'grep' 'procps' 'lsof')
backup=('opt/netkit/netkit.conf')
install='netkit.install'
source=("http://www.netkit.org/download/netkit/$pkgname-$pkgver.tar.bz2" "http://www.netkit.org/download/netkit-filesystem/netkit-filesystem-i386-F5.2.tar.bz2" "http://www.netkit.org/download/netkit-kernel/netkit-kernel-i386-K2.8.tar.bz2")
md5sums=('bdfbd6554ef5ff4b95eead24898340cf' '6421d699bdc5a8aba0681a78becd393f' '1b4297abd1c29e6c4563be70f7480562')

package() {
	mkdir -p $pkgdir/opt/netkit/{bin,check_configuration.d,fs,kernel,man}
	cp -rf $srcdir/netkit $pkgdir/opt/
	mkdir -p $pkgdir/etc/profile.d
	echo '#!/bin/bash' > $pkgdir/etc/profile.d/netkit.sh 
	echo 'export NETKIT_HOME=/opt/netkit' >> $pkgdir/etc/profile.d/netkit.sh
	echo 'export MANPATH=$MANPATH:$NETKIT_HOME/man' >> $pkgdir/etc/profile.d/netkit.sh
	echo 'export PATH=$NETKIT_HOME/bin:$PATH' >> $pkgdir/etc/profile.d/netkit.sh
	chmod 755 $pkgdir/etc/profile.d/netkit.sh
}

here the .install:

post_install() {
		. /etc/profile.d/netkit.sh
		cd /opt/netkit
		./check_configuration.sh
		echo "source /etc/profile in your shell's configuration file."
		echo "If you are a bash user add \". $NETKIT_HOME/bin/netkit_bash_completion\" to the end of your .bashrc"
		#/bin/true
}

post_upgrade() {
		. /etc/profile.d/netkit.sh
		cd /opt/netkit
		./check_configuration.sh
		echo "source /etc/profile in your shell's configuration file."
		echo "If you are a bash user add \". $NETKIT_HOME/bin/netkit_bash_completion\" to the end of your .bashrc"
		#/bin/true
}

pre_remove() {
		/bin/true
}

op=$1
shift

$op "$@"

the problem it's that makepkg for some reason skip some files on the .pkg.tar.xz created package neutral , but in the generated files ($srcdir and $pkgdir) they exist! :S so i dont know what is happening, can you give me a hand? big_smile

here is a shot of what have the .pkg.tar.xz in /opt/netkit/bin (left picture) and what should have on there ($pkgdir/opt/netkit/bin) (right picture)

tx0IXDm.png

Last edited by x11tete11x (2015-04-16 12:50:23)

Offline

Board footer

Powered by FluxBB