it works
This commit is contained in:
parent
eb6e53db77
commit
5a79e109e0
55
Makefile
55
Makefile
@ -1,32 +1,37 @@
|
|||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install --mode=644 etc/X11/* /etc/X11
|
install -d ${DESTDIR}/etc/X11
|
||||||
install etc/init.d/* /etc/init.d
|
install --mode=644 etc/X11/* ${DESTDIR}/etc/X11
|
||||||
install bin/* ${PREFIX}/bin
|
install -d ${DESTDIR}/etc/init.d
|
||||||
install sbin/* ${PREFIX}/sbin
|
install etc/init.d/* ${DESTDIR}/etc/init.d
|
||||||
install lib64/*.so ${PREFIX}/lib64
|
install -d ${DESTDIR}/${PREFIX}/bin
|
||||||
install -d ${PREFIX}/lib64/snail
|
install bin/* ${DESTDIR}/${PREFIX}/bin
|
||||||
ln -sf /usr/lib64/opengl/nvidia/extensions ${PREFIX}/lib64/snail
|
install -d ${DESTDIR}/${PREFIX}/sbin
|
||||||
install -d ${PREFIX}/lib64/snail/modules
|
install sbin/* ${DESTDIR}/${PREFIX}/sbin
|
||||||
ln -sf /usr/lib64/xorg/modules/drivers ${PREFIX}/lib64/snail/modules
|
install -d ${DESTDIR}/${PREFIX}/lib64
|
||||||
ln -sf /usr/lib64/xorg/modules/extensions ${PREFIX}/lib64/snail/modules
|
install lib64/*.so ${DESTDIR}/${PREFIX}/lib64
|
||||||
ln -sf /usr/lib64/xorg/modules/libfb.so ${PREFIX}/lib64/snail/modules
|
install -d ${DESTDIR}/${PREFIX}/lib64/snail
|
||||||
ln -sf /usr/lib64/xorg/modules/libwfb.so ${PREFIX}/lib64/snail/modules
|
ln -sf /usr/lib64/opengl/nvidia/extensions ${DESTDIR}/${PREFIX}/lib64/snail
|
||||||
|
install -d ${DESTDIR}/${PREFIX}/lib64/snail/modules
|
||||||
|
ln -sf /usr/lib64/xorg/modules/drivers ${DESTDIR}/${PREFIX}/lib64/snail/modules
|
||||||
|
ln -sf /usr/lib64/xorg/modules/extensions ${DESTDIR}/${PREFIX}/lib64/snail/modules
|
||||||
|
ln -sf /usr/lib64/xorg/modules/libfb.so ${DESTDIR}/${PREFIX}/lib64/snail/modules
|
||||||
|
ln -sf /usr/lib64/xorg/modules/libwfb.so ${DESTDIR}/${PREFIX}/lib64/snail/modules
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f /etc/X11/xorg.conf.*.snail
|
rm -f ${DESTDIR}/etc/X11/xorg.conf.*.snail
|
||||||
rm -f /etc/init.d/snail-*
|
rm -f ${DESTDIR}/etc/init.d/snail-*
|
||||||
rm -f ${PREFIX}/lib64/libdlfaker.so
|
rm -f ${DESTDIR}/${PREFIX}/lib64/libdlfaker.so
|
||||||
rm -f ${PREFIX}/lib64/libgefaker.so
|
rm -f ${DESTDIR}/${PREFIX}/lib64/libgefaker.so
|
||||||
rm -f ${PREFIX}/lib64/librrfaker.so
|
rm -f ${DESTDIR}/${PREFIX}/lib64/librrfaker.so
|
||||||
rm -rf ${PREFIX}/lib64/snail
|
rm -rf ${DESTDIR}/${PREFIX}/lib64/snail
|
||||||
rm -f ${PREFIX}/bin/nvrun
|
rm -f ${DESTDIR}/${PREFIX}/bin/nvrun
|
||||||
rm -f ${PREFIX}/bin/snail.vglrun
|
rm -f ${DESTDIR}/${PREFIX}/bin/snail.vglrun
|
||||||
rm -f ${PREFIX}/sbin/snail.nv_pwr_off
|
rm -f ${DESTDIR}/${PREFIX}/sbin/snail.nv_pwr_off
|
||||||
rm -f ${PREFIX}/sbin/snail.nv_pwr_on
|
rm -f ${DESTDIR}/${PREFIX}/sbin/snail.nv_pwr_on
|
||||||
rm -f ${PREFIX}/sbin/snail-watcher.sh
|
rm -f ${DESTDIR}/${PREFIX}/sbin/snail-watcher.sh
|
||||||
rm -f ${PREFIX}/sbin/snail.configure
|
rm -f ${DESTDIR}/${PREFIX}/sbin/snail.configure
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
|
|
||||||
DAEMON="/usr/local/sbin/snail-watcher.sh"
|
DAEMON="snail-watcher.sh"
|
||||||
DAEMON_ARGS=""
|
DAEMON_ARGS=""
|
||||||
PIDFILE=/var/run/snail.pid
|
PIDFILE=/var/run/snail.pid
|
||||||
PATH=$PATH:/usr/local/bin
|
PATH=$PATH:/usr/local/bin
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
|
|
||||||
DAEMON=/usr/bin/X
|
DAEMON=/usr/bin/X
|
||||||
DAEMON_ARGS="-ac -config /etc/X11/xorg.conf.nvidia -sharevts -modulepath /usr/local/lib/snail -nolisten tcp -noreset :1 vt9"
|
DAEMON_ARGS="-ac -config /etc/X11/xorg.conf.nvidia -sharevts -modulepath /usr/lib/snail -nolisten tcp -noreset :1 vt9"
|
||||||
PIDFILE=/tmp/.X1-lock
|
PIDFILE=/tmp/.X1-lock
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Test for nVidia driver"
|
||||||
|
lsmod | grep '^nvidia ' &>/dev/null
|
||||||
|
[ 0 -ne $? ] && snail.nv_pwr_on && modprobe nvidia ; snail.nv_pwr_off
|
||||||
|
if [ 0 -eq $? ]; then
|
||||||
|
echo "nVidia driver is OK! ;-)"
|
||||||
|
modprobe -r nvidia
|
||||||
|
else
|
||||||
|
echo "You must install standart nVidia driver first!"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Test for acpi_call module..."
|
echo "Test for acpi_call module..."
|
||||||
lsmod | grep '^acpi_call ' &>/dev/null
|
lsmod | grep '^acpi_call ' &>/dev/null
|
||||||
if [ 0 -eq $? ]; then
|
if [ 0 -eq $? ]; then
|
||||||
@ -82,7 +93,7 @@ if [ "gentoo" == "$DISTRIB_ID" ]; then
|
|||||||
eselect rc delete snail-watcher boot
|
eselect rc delete snail-watcher boot
|
||||||
eselect rc add snail-watcher default
|
eselect rc add snail-watcher default
|
||||||
eselect rc stop snail-xserver
|
eselect rc stop snail-xserver
|
||||||
eselect rc start snail-watcher
|
eselect rc restart snail-watcher
|
||||||
elif [ "fedora" == "$DISTRIB_ID" ]; then
|
elif [ "fedora" == "$DISTRIB_ID" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: $
|
|
||||||
|
|
||||||
EAPI=4
|
|
||||||
inherit eutils
|
|
||||||
|
|
||||||
DESCRIPTION="Snail - nVidia Optimus support in a simple way"
|
|
||||||
|
|
||||||
SRC_URI="ftp://backbone.myftp.org/projects/snail/snail-0.0.1.tar.gz"
|
|
||||||
|
|
||||||
HOMEPAGE="http://backbone.myftp.org/projects/snail"
|
|
||||||
|
|
||||||
KEYWORDS="-* ~x86 ~amd64"
|
|
||||||
|
|
||||||
SLOT="0"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND="x11-drivers/nvidia-drivers"
|
|
||||||
|
|
||||||
RDEPEND="${DEPEND}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
echo "src_prepare=`pwd`" >>/tmp/snail.log
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
echo "src_configure=`pwd`" >>/tmp/snail.log
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
echo "src_compile=`pwd`" >>/tmp/snail.log
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
echo "src_install=`pwd`" >>/tmp/snail.log
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
echo "src_postinst=`pwd`" >>/tmp/snail.log
|
|
||||||
}
|
|
||||||
|
|
34
snail-1.0.0.ebuild
Normal file
34
snail-1.0.0.ebuild
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI=4
|
||||||
|
inherit eutils
|
||||||
|
|
||||||
|
DESCRIPTION="Snail - nVidia Optimus support"
|
||||||
|
|
||||||
|
SRC_URI="ftp://backbone.ws/projects/snail/snail-1.0.0.tar.bz2"
|
||||||
|
|
||||||
|
HOMEPAGE="https://chili.backbone.ws/projects/snail"
|
||||||
|
|
||||||
|
KEYWORDS="-* ~x86 ~amd64"
|
||||||
|
|
||||||
|
SLOT="0"
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
DEPEND="x11-drivers/nvidia-drivers"
|
||||||
|
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
echo "src_install=`pwd`" >>/tmp/snail.log
|
||||||
|
emake install DESTDIR="${D}" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
snail.configure
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user