guillaumezin / nvidiabl

/!\ Please note that I don't maintain this repository anymore, please have a look at forked projects. /!\
82 stars 82 forks source link

Can You Please Change The Source/Makefile? #87

Open ghost opened 10 years ago

ghost commented 10 years ago

Hi guillaumezin,

I just noticed Makefile doesn't allow me to make a build script to compile from and work with 'make install DESTDIR=$PKG' instead everything gets dumped into the system rather then getting put into a package, but I've not been able to quite get to the completed package part the compile also fails on me.

https://github.com/guillaumezin/nvidiabl/issues/82

This is the problem I'm having it still errors;

DKMS make.log for nvidiabl-0.86 for kernel 3.10.34 (x86_64) Thu Mar 27 18:20:13 HST 2014 make: Entering directory `/usr/src/linux-3.10.34' CC [M] /var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.o /var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.c:37:3: warning: #warning USE_BACKLIGHT_SUSPEND [-Wcpp]

warning USE_BACKLIGHT_SUSPEND

^ /var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.c: In function 'nvidiabl_init': /var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.c:297:49: error: 'FB_BACKLIGHT_LEVELS' undeclared (first use in this function) nvidiabl_device->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; ^ /var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.c:297:49: note: each undeclared identifier is reported only once for each function it appears in make[1]: [/var/lib/dkms/nvidiabl/0.86/build/nvidiabl-module.o] Error 1 make: [module/var/lib/dkms/nvidiabl/0.86/build] Error 2 make: Leaving directory`/usr/src/linux-3.10.34'

This is my build script and I've always used a script like this in Slackware to compile and package from

!/bin/sh

Slackware build script for nvidiabl

PRGNAM=nvidiabl VERSION=0.86 BUILD=${BUILD:-1} TAG=${TAG:-_sar}

Automatically determine the architecture we're building on:

if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;;

Unless $ARCH is already set, use uname -m for all other archs:

   *) ARCH=$( uname -m ) ;;

esac fi

CWD=$(pwd) TMP=${TMP:-/tmp/sar} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi

set -e

rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ ( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 ) \ -exec chmod 755 {} \; -o \ ( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 ) \ -exec chmod 644 {} \;

make make install DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a README \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

ghost commented 10 years ago

I've tried compiling this several ways, nothing works, I also tried what the README says;

make dkms-install

I really need help with this, I use my laptop for work, not just pleasure.

THANKS

guillaumezin commented 10 years ago

Hi,

It means that CONFIG_FB_BACKLIGHT is not defined in your kernel. Maybe I can try to force it in the Makefile.

guillaumezin commented 10 years ago

Please try out version 0.87

ghost commented 10 years ago

Hi guillaumezin,

It looked like it worked, can you PLEASE tell me if the /paths all look ok?

Creating Slackware package: /tmp/nvidiabl-0.87-x86_64-1_sar.tgz

./ etc/ etc/udev/ etc/udev/rules.d/ etc/udev/rules.d/97-nvidia-brightness.rules lib/ lib/modules/ lib/modules/3.13.9/ lib/modules/3.13.9/kernel/ lib/modules/3.13.9/kernel/drivers/ lib/modules/3.13.9/kernel/drivers/video/ lib/modules/3.13.9/kernel/drivers/video/backlight/ lib/modules/3.13.9/kernel/drivers/video/backlight/nvidiabl.ko install/ install/slack-desc usr/ usr/doc/ usr/doc/nvidiabl-0.87/ usr/doc/nvidiabl-0.87/nvidiabl.SlackBuild usr/doc/nvidiabl-0.87/README usr/doc/nvidiabl-0.87/scripts/ usr/doc/nvidiabl-0.87/scripts/etc/ usr/doc/nvidiabl-0.87/scripts/etc/acpi/ usr/doc/nvidiabl-0.87/scripts/etc/acpi/nvidia_backlight_down.sh usr/doc/nvidiabl-0.87/scripts/etc/acpi/events/ usr/doc/nvidiabl-0.87/scripts/etc/acpi/events/sony-brightness-down usr/doc/nvidiabl-0.87/scripts/etc/acpi/events/sony-brightness-up usr/doc/nvidiabl-0.87/scripts/etc/acpi/nvidia_backlight_up.sh usr/doc/nvidiabl-0.87/scripts/usr/ usr/doc/nvidiabl-0.87/scripts/usr/local/ usr/doc/nvidiabl-0.87/scripts/usr/local/sbin/ usr/doc/nvidiabl-0.87/scripts/usr/local/sbin/nvidiablctl

Slackware package /tmp/nvidiabl-0.87-x86_64-1_sar.tgz created.

By the way when I untar the tar; nvidiabl-0.87.tar.gz everything looks the same in the parent directory and the source tarball that's included in it;

cd /home/foo/Build/nvidiabl/nvidiabl-0.87

ls Makefile dkms.conf nvidiabl-gpu.h nvidiabl-laptops.h nvidiabl-models.h nvidiabl-types.h README install nvidiabl-ignore.h nvidiabl-models.c nvidiabl-module.c scripts

So why are there these other tars, because when I open one it looks the same;

cd /home/sar/Build/nvidiabl/nvidiabl-0.87/install/tarball/dkms_source_tree

ls Makefile README dkms.conf install nvidiabl-gpu.h nvidiabl-ignore.h nvidiabl-laptops.h nvidiabl-models.c nvidiabl-models.h nvidiabl-module.c nvidiabl-types.h

Everything looks the same excpet there is no /scripts directory so I don't understand why you have all these extra tars in this? nvidiabl-0.87-source-only.dkms.tar.gz

Thank you...

guillaumezin commented 10 years ago

You're right for the tars, there are too many of them, it is corrected in the Makefile I just pushed on github. Your package seems right to me, but I'm neither a package specialist, nor a Slackware user...

ghost commented 10 years ago

Hi guillaumezin,

Sorry my bad, actually I should of just asked if in

/lib/modules/3.13.9/kernel/drivers/video/backlight/nvidiabl.ko

this is all I'm suppose to have, just the nvidiabl.ko when I'm done compiling this?

On the tar I don't understand you said there are to many but corrected in the Makefile, what corrected? I was saying that the contents of the tar is to much, it appears as though everything under the /install directory with all the tars is just a repeat of everything in the main parent directory...

thanks