You are not logged in.

#1 2007-02-04 14:34:42

unixlust
Member
From: Sebes, Romania
Registered: 2007-01-12
Posts: 31

htb-tools. my first PKGBUILD. needs adjusting.

Okay. This is my first try at a PKGBUILD.

pkgname=HTB-tools
pkgver=0.2.7a
pkgrel=1
pkgdesc="a tool to help simplify the difficult process of bandwidth allocation"
arch=(i686 x86_64)
url="http://htb-tools.arny.ro"
depends=()
makedepends=('flex')
conflicts=()
replaces=()
backup=()
install=
source=(http://htb-tools.arny.ro/$pkgname-current/archives/$pkgname-$pkgver.tar.gz http://unixlust.yeahost.com/others/bitops.h
md5sums=('4d827f15f79b8df645435b930e91dda0'\
         '962daca65477787ec8fd8c805aca0c70')

build() {
  cd $startdir/src/$pkgname-$pkgver
  cp -v $startdir/src/bitops.h /usr/include/asm/bitops.h
  make || return 1
  make prefix=$startdir/pkg/ install
}

It errors out. What I need it to do is copy that bitops.h in /usr/include/asm before starting compilation, because it won't compile without it. Can someone please help me sort this thing out ?

http://pastebin.ca/340043

PS: The bitops.h file is taken from a Debian install, because it is just missing in Arch (very strange). In my opinion the devs should include it in /usr/include/asm , because some progs just won't compile without it.

Last edited by unixlust (2007-02-04 14:44:32)

Offline

#2 2007-02-04 14:59:09

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: htb-tools. my first PKGBUILD. needs adjusting.

This is not a correct way to do things. You need to do another PKGBUILD with bitops.h and list this package in makedepends. In the build function, you should not install anything outside $startdir/pkg and $startdir/src.

However, the error you received is unrelated and depends from the fact that you are installing everything directly in /sbin, which is also mistaken and dangerous. The fact is that the Makefile for this app does not use the prefix variable, but OUT_DIR to define the directory where the executables are installed. Thus, you have to replace 'prefix=$startdir/pkg' with 'OUT_DIR=$startdir/pkg/sbin'.


Mortuus in anima, curam gero cutis

Offline

#3 2007-02-04 15:29:28

unixlust
Member
From: Sebes, Romania
Registered: 2007-01-12
Posts: 31

Re: htb-tools. my first PKGBUILD. needs adjusting.

patroclo7, thank you very much for your suggestion. It works now smile  Well it looks to me like a not-so-beautiful-method, that of making a separate PKGBUILD for a header file that should already exist in Arch. Anyway, I will remove the header file from the PKGBUILD once it will be present by default in Arch's kernel, as it is in all distros I tried. Thanks again !

Last edited by unixlust (2007-02-04 15:29:49)

Offline

#4 2007-02-04 15:45:44

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: htb-tools. my first PKGBUILD. needs adjusting.

I have no clear insight about that header, but if you think it should be included you are welcome to submit a bug for the kernel-headers package.


Mortuus in anima, curam gero cutis

Offline

#5 2007-02-05 20:06:27

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: htb-tools. my first PKGBUILD. needs adjusting.

Actually that file is already present in 3 locations (although not in /usr/include ) :

/usr/src/linux-26.19-ARCH/include/bitops.h
/usr/src/linux-26.19-ARCH/include/asm-generic/bitops.h
/usr/src/linux-26.19-ARCH/include/asm-i386/bitops.h

the make command probably looks in the wrong place .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2007-02-05 21:55:26

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: htb-tools. my first PKGBUILD. needs adjusting.

Lone_Wolf wrote:

Actually that file is already present in 3 locations (although not in /usr/include ) :

/usr/src/linux-26.19-ARCH/include/bitops.h
/usr/src/linux-26.19-ARCH/include/asm-generic/bitops.h
/usr/src/linux-26.19-ARCH/include/asm-i386/bitops.h

the make command probably looks in the wrong place .

The kernel headers in /usr/src/ shouldn't be used to compile other apps than the kernel and its drivers. That's why there is a kernel-headers package to provide standardized versions of these headers. If it hasn't been done, follow patroclo7's advice to submit a bug report. Probably that include file has been created recently.

Offline

Board footer

Powered by FluxBB