You are not logged in.

#1 2008-06-03 23:27:39

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

I've adopted the oss2jack and fusd-kor packages, but need help

Some people are still using this software (and I'm eyeing it) and I felt I should do them a favor. Problem is, I'll need some help.

For fusd-kor, the PKGBUILD looks like this:

# Contributor:  nut543 <kfs1@online.no>
# Contributor: Shadowhand <woody.gilk@gmail.com>
pkgname=fusd-kor
pkgver=1.10.12
_realver=konstruktiv.org_hack
pkgrel=1
pkgdesc="FUSD hack developed for the oss2jack project and 2.6.x > udev kernels."
arch=(i686)
url="http://hg.konstruktiv.org/fusd/"
license=('GPL')
depends=()
makedepends=('mercurial')
source=(fusd.install fusd.rules)
md5sums=('982f0b5b6c7af5fe7f4b9e3134c5f1fb' 'dd880fac320283c9c134f8efa0b5bb84')
install=fusd.install

build() {
  cd $startdir/src
  msg "Connecting to mercurial server...."
  hg clone http://hg.konstruktiv.org/fusd
  cd fusd
  sed -i 's|local/||' Makefile
  sed -i 's|-O2 -g|-O2 -fomit-frame-pointer -march=i686|g' make.include
  sed -i 's|-Werror||g' make.include
  msg "Starting make..."
  make || return 1
  cp Makefile Makefile.save
  cp kfusd/Makefile kfusd/Makefile.save
  sed -i "s|/usr/|$startdir/pkg/usr/|g" Makefile
  sed -i "s|/lib/|$startdir/pkg/lib/|g" Makefile
  sed -i "s|\(/lib/modules/\$(shell uname -r)/misc\)|${startdir}/pkg\1|g" kfusd/Makefile
  mkdir -p $startdir/pkg/lib/modules/$(uname -r)/misc
  mkdir -p $startdir/pkg/usr/{lib,include}
  sed -i 's|/sbin/depmod -a||' Makefile
  make install || return 1 
  # Restore original Makefiles
  rm {Makefile,kfusd/Makefile} 
  cp Makefile.save Makefile
  cp kfusd/Makefile.save kfusd/Makefile
  cd $startdir/src
  install -D -m 644 fusd.rules $startdir/pkg/etc/udev/rules.d/30-fusd.rules
  msg "If you saw an error about not finding the kfusd.ko module, do the following:"
  msg "as root: cd /usr/src/linux-$(uname -r) && make"
}

First off, it seems to me like sticking in optimizations as is done here is a bad idea.

Second - there's still a version of fusd-kor available on the oss2jack homepage, shouldn't that be used? The homepage for the one above seems to be dead anyway, although it claims to be a later version.

I might be asking further questions too, as I've never maintained a kernel module PKGBUILD before.

Also, here's the install file:

# This is a default template for a post-install scriptlet.  You can
# remove any functions you don't need (and this header).

# arg 1:  the new package version
pre_install() {
rm -f /etc/udev/permissions.d/fusd.permissions
rm -f /etc/udev/rules.d/??-fusd.rules
  /bin/true
}

# arg 1:  the new package version
post_install() {

depmod -ae
sleep 1
echo "Modprobe'ing kfusd"
modprobe kfusd && echo sucess\! || echo failure to modprobe kfusd\, try to \-f\(force\) it
echo 'add kfusd to your /etc/rc.conf MODULES array to have it load at startup.'
  /bin/true
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
  /bin/true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  /bin/true
}

# arg 1:  the old package version
pre_remove() {
  /bin/true
}

# arg 1:  the old package version
post_remove() {
rm -f /etc/udev/permissions.d/fusd.permissions
rm -f /etc/udev/rules.d/??-fusd.rules
  /bin/true
}

op=$1
shift
$op $*

Is there anything in there that should be modified?

And now, oss2jack:

# Contributor: nut543 <kfs1@online.no>
pkgname=oss2jack
pkgver=0.25
arch=('i686')
pkgrel=7
pkgdesc="Routes /dev/dsp to Jack enabling TeamSpeak and other OSS-only mmap apps to work."
depends=(jack-audio-connection-kit libsamplerate fusd-kor)
source=(http://fort.xdas.com/~kor/oss2jack/$pkgname-$pkgver.tar.gz \
oss2jack)
url="http://fort.xdas.com/~kor/oss2jack/"
license=('GPL')
md5sums=(7fd10dd2391cbef147fa36563969e3e2\
 596661877446a02c7e9497178db60af7)
install=oss2jack.install
build() {
mkdir -p $startdir/pkg/etc/rc.d
install -g root -o root -m 755 $startdir/oss2jack $startdir/pkg/etc/rc.d/oss2jack
cd $startdir/src/$pkgname-$pkgver
./configure --with-fusd=/usr --prefix=/usr
make || return 1
make DESTDIR=$startdir/pkg install

And the install file:

# This is a default template for a post-install scriptlet.  You can
# remove any functions you don't need (and this header).

# arg 1:  the new package version
pre_install() {
echo 'see http://wiki.archlinux.org/index.php/Allow_multiple_programs_to_play_sound_at_once#ALSA_with_oss2jack for help starting up oss2jack'
  /bin/true
}

# arg 1:  the new package version
post_install() {
  /bin/true
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {

  /bin/true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  /bin/true
}

# arg 1:  the old package version
pre_remove() {
  /bin/true
}

# arg 1:  the old package version
post_remove() {
  /bin/true
}

op=$1
shift
$op $*

The PKGBUILD looks fine to me. Not so sure about the install file, it looks a little... redundant? But if you guys notice anything gravely wrong with these, please post it, okay?

Edit: And sorry for the long post... wow.

Last edited by Gullible Jones (2008-06-04 01:29:55)

Offline

#2 2008-06-04 01:29:27

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: I've adopted the oss2jack and fusd-kor packages, but need help

Okay, I modified the PKGBUILD for fusd-kor, but I get this when I try to compile...

make[2]: Entering directory `/usr/src/linux-2.6.25-ARCH'
  CC [M]  /home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.o
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:60:26: error: linux/config.h: No such file or directory
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:70:35: error: linux/devfs_fs_kernel.h: No such file or directory
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:181: error: expected ')' before string constant
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c: In function 'fusd_register_device':
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2036: warning: label 'register_failed2' defined but not used
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c: At top level:
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2517: error: unknown field 'writev' specified in initializer
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2517: warning: initialization from incompatible pointer type
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c: In function 'init_fusd':
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2941: warning: label 'fail2' defined but not used
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2929: warning: label 'fail7' defined but not used
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c: In function 'cleanup_fusd':
/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.c:2960: error: implicit declaration of function 'devfs_remove'
make[3]: *** [/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd/kfusd.o] Error 1
make[2]: *** [_module_/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.25-ARCH'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/proteus/Packages/fusd-kor/src/fusd-kor-1.10-11/kfusd'
make: *** [obj.i686-linux/kfusd.ko] Error 2
==> ERROR: Build Failed.
    Aborting...

What's going on?

Offline

Board footer

Powered by FluxBB