diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-07-14 02:25:24 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-07-14 02:25:24 (GMT) |
commit | b08d687d99a8df0e2c0be8e1746a8456518edb8e (patch) | |
tree | 840fed35616837616ae0c509bdcc79301840902b /abs/core-testing | |
parent | a6476c77e1cc295d4b8debaea2d0dfbeae0f7b01 (diff) | |
parent | 4c71823825d08c1cc2219d22a6d3fe190e158a09 (diff) | |
download | linhes_pkgbuild-b08d687d99a8df0e2c0be8e1746a8456518edb8e.zip linhes_pkgbuild-b08d687d99a8df0e2c0be8e1746a8456518edb8e.tar.gz linhes_pkgbuild-b08d687d99a8df0e2c0be8e1746a8456518edb8e.tar.bz2 |
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Conflicts:
abs/core-testing/LinHES-config/PKGBUILD
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-x | abs/core-testing/LinHES-config/PKGBUILD | 4 | ||||
-rwxr-xr-x | abs/core-testing/LinHES-config/install_functions.sh | 77 | ||||
-rwxr-xr-x | abs/core-testing/LinHES-system/LinHES-start | 2 | ||||
-rw-r--r-- | abs/core-testing/LinHES-system/PKGBUILD | 2 | ||||
-rw-r--r-- | abs/core-testing/mplayer-wrapper/PKGBUILD | 9 | ||||
-rw-r--r-- | abs/core-testing/mplayer-wrapper/mplayer-wrapper.install | 38 | ||||
-rwxr-xr-x | abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl (renamed from abs/core-testing/mplayer-wrapper/bin/mplayer-wrapper.pl) | 5 | ||||
-rw-r--r-- | abs/core-testing/nvidia/PKGBUILD | 4 | ||||
-rw-r--r-- | abs/core-testing/tweaker/PKGBUILD | 14 | ||||
-rwxr-xr-x | abs/core-testing/tweaker/bin/twk_audio.pl | 12 | ||||
-rwxr-xr-x | abs/core-testing/tweaker/bin/twk_cpu.pl | 31 | ||||
-rwxr-xr-x | abs/core-testing/tweaker/bin/twk_general.pl | 8 | ||||
-rw-r--r-- | abs/core-testing/tweaker/fs/home/mythtv/.config/smplayer/smplayer.ini | 2 |
13 files changed, 172 insertions, 36 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 5ad1a9c..0094f57 100755 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,9 +1,9 @@ pkgname=LinHES-config pkgver=2.0 -pkgrel=53 +pkgrel=58 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" -depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates rsync python-parted ddcxinfo python-pexpect python-netifaces LinHES-timezone) +depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates rsync python-parted ddcxinfo python-pexpect python-netifaces LinHES-timezone python-iplib) arch=('i686') source=(mv_install.py mv_config.py mythinstall.bin myth_user_call file_time_offset.py install-ui.xml install_proxy.sh install_functions.sh systemconfig.sh install_db_chroot.sh restore_default_settings.sh xconfig.sh timezip.py soundconfig.sh LinHES-release issue MythVantage.sh create_master.sh build_diskless.sh networkconfig.sh autocard.py restore_km_db_chroot.sh README mv_advanced.py mv_common.py mv_ir.py mv_misc.py mv_network.py mv_screensaver.py mv_smolt.py mv_software.py mv_webuser.py mv_hostype.py systemconfig.py myth_user_call.py) diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh index 6775337..ea9e61c 100755 --- a/abs/core-testing/LinHES-config/install_functions.sh +++ b/abs/core-testing/LinHES-config/install_functions.sh @@ -11,7 +11,7 @@ CMDLINE=$(cat /proc/cmdline) hostname=`hostname` MYSQLCMD_C="mysql -u$MYTHDBUSER -p$MYTHTVPASSWD mythconverg -B --exec" BASE="" - +found_remote=1 function update_db_settings () { @@ -117,6 +117,7 @@ do esac fi update_db_settings HostReceiverType $FoundReceiverType + found_remote=0 setupremote break fi @@ -125,7 +126,7 @@ done function scan_for_usb_remote () { -found_remote=1 +#found_remote=1 printhl " Scanning for usb receiver/remote" while read line do @@ -149,14 +150,21 @@ if lsusb | grep 04d8:0004 > /dev/null 2>/dev/null then /usr/bin/PyroUsb.py > /dev/null 2>&1 & fi + +if [ $found_remote -eq 1 ] +then +#No remote found_remote + update_db_settings HostRemoteType "no_remote" +fi + } function rest_of_network () { #netmask - echo $CMDLINE | grep -q netmask + echo $CMDLINE | grep -q cnetmask if [ $? -eq 0 ] then - TEMPVAR=${CMDLINE#*netmask=} + TEMPVAR=${CMDLINE#*cnetmask=} NETMASK=${TEMPVAR%% *} /sbin/ifconfig eth0 $IP netmask $NETMASK nm=`/usr/bin/nmconv.py -obits $NETMASK` @@ -167,10 +175,10 @@ function rest_of_network () { printhl " Netmask not found" fi #gateway - echo $CMDLINE | grep -q gateway + echo $CMDLINE | grep -q cgateway if [ $? -eq 0 ] then - TEMPVAR=${CMDLINE#*gateway=} + TEMPVAR=${CMDLINE#*cgateway=} GATEWAY=${TEMPVAR%% *} /sbin/route add default gw $GATEWAY update_db_settings HostGW${MYTHDEFAULT} "$GATEWAY" @@ -179,10 +187,10 @@ function rest_of_network () { fi #dns - echo $CMDLINE | grep -q dns + echo $CMDLINE | grep -q cdns if [ $? -eq 0 ] then - TEMPVAR=${CMDLINE#*dns=} + TEMPVAR=${CMDLINE#*cdns=} DNS=${TEMPVAR%% *} echo "nameserver $DNS" >> /etc/resolv.conf update_db_settings HostDNS${MYTHDEFAULT} "$DNS" @@ -192,10 +200,10 @@ function rest_of_network () { } function init_network { - echo $CMDLINE |grep -q netdev + echo $CMDLINE |grep -q cnetdev if [ $? -eq 0 ] then - TEMPVAR=${CMDLINE#*netdev=} + TEMPVAR=${CMDLINE#*cnetdev=} MYTHDEFAULT=${TEMPVAR%% *} else MYTHDEFAULT="eth0" @@ -211,7 +219,7 @@ function init_network { update_db_settings HostActiveonboot${MYTHDEFAULT} 1 update_db_settings HostNetDevice ${MYTHDEFAULT} - TEMPVAR=${CMDLINE#*ip=} + TEMPVAR=${CMDLINE#*cip=} IP=${TEMPVAR%% *} if [ "$IP" == "dhcp" ] then @@ -224,6 +232,53 @@ function init_network { rest_of_network fi fi + + + + +} + +function dev_up_check(){ + /sbin/ifconfig $1 1>/dev/null 2>/dev/null + status=$? + if [ $status -eq 1 ] + then + return 0 + else + devip=`/sbin/ifconfig | grep -C1 $1| grep inet|grep -v inet6 | cut -d: -f2 | awk '{ print $1}'` + if [ "x$devip" = "x" ] + then + return 1 + else + return 0 + fi + fi +} + +function request_dhcp(){ + for ndev in eth0 eth1 wlan0 wlan1 ath0 + do + dev_up_check $ndev + status=$? + if [ $status -eq 1 ] + then + #interface is down, lets see if dhcp responds + dhcpcd -Td -t2 $ndev > /tmp/dhcpinfo.$ndev + TEMPVAR=`grep IPADDR /tmp/dhcpinfo.$ndev |cut -d\' -f2` + if [ ! x$TEMPVAR = x ] + then + update_db_settings HostIP$ndev "$TEMPVAR" + TEMPVAR=`grep NETMASK /tmp/dhcpinfo.$ndev |cut -d\' -f2` + nm=`/usr/bin/nmconv.py -obits $TEMPVAR` + TEMPVAR="/$nm $TEMPVAR" + update_db_settings HostNETMASK$ndev "$TEMPVAR" + TEMPVAR=`grep GATEWAYS /tmp/dhcpinfo.$ndev |cut -d\' -f2` + update_db_settings HostGW$ndev "$TEMPVAR" + TEMPVAR=`grep DNSSERVERS /tmp/dhcpinfo.$ndev |cut -d\' -f2` + update_db_settings HostDNS$ndev "$TEMPVAR" + fi + fi + done } function init_remote { diff --git a/abs/core-testing/LinHES-system/LinHES-start b/abs/core-testing/LinHES-system/LinHES-start index e638334..3157a2e 100755 --- a/abs/core-testing/LinHES-system/LinHES-start +++ b/abs/core-testing/LinHES-system/LinHES-start @@ -140,7 +140,7 @@ EOF done -xinit $client $clientargs -- $server $display $serverargs +xinit $client $clientargs -- $server $display -logverbose 6 $serverargs if [ x"$removelist" != x ]; then xauth remove $removelist diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD index 0fad05d..2920d11 100644 --- a/abs/core-testing/LinHES-system/PKGBUILD +++ b/abs/core-testing/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=1.0 -pkgrel=55 +pkgrel=56 arch=('i686') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin diff --git a/abs/core-testing/mplayer-wrapper/PKGBUILD b/abs/core-testing/mplayer-wrapper/PKGBUILD index 82f1082..3fb4124 100644 --- a/abs/core-testing/mplayer-wrapper/PKGBUILD +++ b/abs/core-testing/mplayer-wrapper/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mplayer-wrapper -pkgver=1 +pkgver=1 pkgrel=1 pkgdesc="wrapper for mplayer and mplayer derivatives" arch=('i686' 'x86_64') @@ -10,7 +10,12 @@ source=(mplayer-wrapper.pl) license=('GPL2') +install=mplayer-wrapper.install build() { + LH_ROOT=/usr/LH + mkdir -p $startdir/pkg/$LH_ROOT/bin/ + cd $startdir - install -m0777 -D bin/* $startdir/pkg/usr/LH/bin/ + # executables + install -m0755 -D *.pl $startdir/pkg/$LH_ROOT/bin/ } diff --git a/abs/core-testing/mplayer-wrapper/mplayer-wrapper.install b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.install new file mode 100644 index 0000000..18f1b75 --- /dev/null +++ b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.install @@ -0,0 +1,38 @@ +# 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() { +/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 $* diff --git a/abs/core-testing/mplayer-wrapper/bin/mplayer-wrapper.pl b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl index 583786d..9977741 100755 --- a/abs/core-testing/mplayer-wrapper/bin/mplayer-wrapper.pl +++ b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl @@ -66,11 +66,14 @@ sub translate_parameters() { return map(&translate($_), @parameters); } else { + # currently, all other players used by this wrapper work with mplayer parameters return @parameters; } } -# Returns an array of dynamic parameters based in part on the media. +# Returns an array of dynamic parameters based on the media type, +# the presence of special playback decoding hardware, and the +# general capability of the CPU. sub dynamic_parameters () { my($mediafile)=@_; return(); # ??? empty for now; further development required diff --git a/abs/core-testing/nvidia/PKGBUILD b/abs/core-testing/nvidia/PKGBUILD index 2c25610..eccf01f 100644 --- a/abs/core-testing/nvidia/PKGBUILD +++ b/abs/core-testing/nvidia/PKGBUILD @@ -4,13 +4,13 @@ pkgname=nvidia pkgver=185.18.14 _kernver='2.6.28-LinHES' -pkgrel=1 +pkgrel=2 pkgdesc="NVIDIA drivers for kernel26." arch=('i686' 'x86_64') [ "$CARCH" = "i686" ] && ARCH=x86 [ "$CARCH" = "x86_64" ] && ARCH=x86_64 url="http://www.nvidia.com/" -depends=('kernel26>=2.6.28' 'kernel26<2.6.29' 'nvidia-utils') +depends=('kernel26>=2.6.28' 'kernel26<2.6.29' 'nvidia-utils=185.18.14') conflicts=('nvidia-96xx' 'nvidia-71xx' 'nvidia-legacy' 'nvidia-beta') license=('custom') install=nvidia.install diff --git a/abs/core-testing/tweaker/PKGBUILD b/abs/core-testing/tweaker/PKGBUILD index ebd3ed4..b3b4983 100644 --- a/abs/core-testing/tweaker/PKGBUILD +++ b/abs/core-testing/tweaker/PKGBUILD @@ -1,7 +1,7 @@ pkgname=tweaker pkgver=1 -pkgrel=38 -pkgdesc="" +pkgrel=41 +pkgdesc="applies tweaks to the baseline configuration and attempts to optimize settings for the hardware it finds" arch=('i686' 'x86_64') depends=('bash' 'perl' 'perl-dbi' 'perl-exception-class' 'perl-log-log4perl' 'perl-log-dispatch' 'perl-getopt-lucid' 'perl-list-member' 'perl-class-data-inheritable' 'perl-devel-stacktrace' 'perl-xml-twig') @@ -16,19 +16,18 @@ install=tweaker.install build() { TWEAKER_ROOT=usr/LH/tweaker mkdir -p $startdir/pkg/$TWEAKER_ROOT - mkdir -p $startdir/pkg/$TWEAKER_ROOT/{bin,fs,tcf} + mkdir -p $startdir/pkg/$TWEAKER_ROOT/{bin,fs,tcf} mkdir -p $startdir/pkg/etc/profile.d mkdir -p $startdir/pkg/usr/lib/perl5/vendor_perl/Tweaker/ cd $startdir # executables install -m0777 -D bin/* $startdir/pkg/$TWEAKER_ROOT/bin - # parallel root directory structure used for seeding configuration files -# install -m0777 -D fs/ $startdir/pkg/$TWEAKER_ROOT/fs - cp -rp fs $startdir/pkg/$TWEAKER_ROOT/ - chmod -R 0777 $startdir/pkg/$TWEAKER_ROOT/ + # Ensure shell variables are configured at start; ensure $TWEAKER_ROOT/bin is in $PATH + cp -rp fs $startdir/pkg/$TWEAKER_ROOT/ + chmod -R 0777 $startdir/pkg/$TWEAKER_ROOT/ # Tweaker configuration files install -m0555 -D tcf/* $startdir/pkg/$TWEAKER_ROOT/tcf @@ -37,7 +36,6 @@ build() { #install -m0755 log4perl.conf $startdir/pkg/etc/log4perl.conf install -m0755 log4perl.conf $startdir/pkg/$TWEAKER_ROOT - # Ensure shell variables are configured at start; ensure $TWEAKER_ROOT/bin is in $PATH install -m0755 tweaker.sh $startdir/pkg/etc/profile.d/tweaker.sh # Copy our tweaker Perl modules for general use diff --git a/abs/core-testing/tweaker/bin/twk_audio.pl b/abs/core-testing/tweaker/bin/twk_audio.pl index eec7992..47a2415 100755 --- a/abs/core-testing/tweaker/bin/twk_audio.pl +++ b/abs/core-testing/tweaker/bin/twk_audio.pl @@ -110,9 +110,9 @@ sub implement_option { sub edit_mplayer_conf { my($option) = @_; # delete any old entries that Tweaker made, relevant to this particular edit - my $delete_old_tweaker_edits = "[ -e $mplayer_conf ] && sed -i '/^.*a[o,c].*=.*#TWEAKER/d' $mplayer_conf"; + my $delete_old_tweaker_edits = "[ -e $mplayer_conf ] && sed -i '/^.*a[o,c,f].*=.*#TWEAKER/d' $mplayer_conf && sed -i '/^speed.*=.*#TWEAKER/d' $mplayer_conf"; # comment out old entries that some other process may have made - my $comment_out_external_edits = "[ -e $mplayer_conf ] && sed -i 's/^\\(a[o,c].*=.*\\)/#\\1/g' $mplayer_conf"; + my $comment_out_external_edits = "[ -e $mplayer_conf ] && sed -i 's/^\\(a[o,c,f].*=.*\\)/#\\1/g' $mplayer_conf && sed -i 's/^\\(speed.*=.*\\)/#\\1/g' $mplayer_conf"; my $command1; my $command2=""; ($card, $device) = poll_for_digital_output_device; @@ -160,6 +160,14 @@ sub implement_option { } } } + # for all options + $command2 = "echo -e 'af=scaletempo=stride=30:overlap=.50:search=10 #TWEAKER\nspeed=1.0 #TWEAKER' >> $mplayer_conf"; + if (my $error = execute_shell_command($command2)) { + $logger->error("ERROR: $error"); + $logger->error("ERROR: Unable to implement option $option."); + exit(-1); + } + $logger->info("Edited $mplayer_conf for $option audio."); } diff --git a/abs/core-testing/tweaker/bin/twk_cpu.pl b/abs/core-testing/tweaker/bin/twk_cpu.pl index 118bac1..8bddbe3 100755 --- a/abs/core-testing/tweaker/bin/twk_cpu.pl +++ b/abs/core-testing/tweaker/bin/twk_cpu.pl @@ -57,6 +57,36 @@ sub get_HDD_size { # #} +# Edit mplayer.conf to tell mplayer to drop video frames when necessary. This should do no harm +# on systems that don't need the option, and it should make video watchable on those that do. +sub edit_mplayer_conf { + use vars qw($mplayer_conf); + $mplayer_conf = "/etc/mplayer/mplayer.conf"; + + # delete any old entries that Tweaker made, relevant to this particular edit + my $delete_old_tweaker_edits = "[ -e $mplayer_conf ] && sed -i '/^.*hardframedrop.*=.*#TWEAKER/d' $mplayer_conf"; + # comment out old entries that some other process may have made + my $comment_out_external_edits = "[ -e $mplayer_conf ] && sed -i 's/^\\(hardframedrop.*=.*\\)/#\\1/g' $mplayer_conf"; + my $command1; + my $command2=""; + my $logger = get_logger('tweaker.script'); + + if (my $error = execute_shell_command("$delete_old_tweaker_edits && $comment_out_external_edits")) { + $logger->error("ERROR: $error"); + $logger->error("ERROR: Unable to implement option $option."); + exit(-1); + } + + $command2 = "echo -e 'hardframedrop=true #TWEAKER' >> $mplayer_conf"; + if (my $error = execute_shell_command($command2)) { + $logger->error("ERROR: $error"); + $logger->error("ERROR: Unable to implement option $option."); + exit(-1); + } + + $logger->info("Edited $mplayer_conf to drop video frames when CPU is overloaded."); +} + # Try to implement the given option. sub implement_option { my($option) = @_; @@ -106,6 +136,7 @@ sub implement_option { change_or_make_setting('OSDTheme', 'blootube-osd') || exit -1; change_or_make_setting('PlayBoxShading', '0') || exit -1; change_or_make_setting('PlaybackExitPrompt', '2') || exit -1; + edit_mplayer_conf(); } else { exit -1; } diff --git a/abs/core-testing/tweaker/bin/twk_general.pl b/abs/core-testing/tweaker/bin/twk_general.pl index 387920c..3d16f2c 100755 --- a/abs/core-testing/tweaker/bin/twk_general.pl +++ b/abs/core-testing/tweaker/bin/twk_general.pl @@ -87,10 +87,8 @@ sub implement_option { # # better awareness of different video extensions # - change_or_make_entry("videotypes", [["playcommand", "mplayer-resumer.pl -fs -zoom -vc theora,fftheora, -vo xv %s"]], [["extension", "ogg"]]); - change_or_make_entry("videotypes", [["playcommand", "mplayer-resumer.pl -fs -zoom -vc theora,fftheora, -vo xv %s"]], [["extension", "theora"]]); - foreach my $video_ext ("mp2", "tp", "ts", "m2p", "nuv", "mkv") { - change_or_make_entry("videotypes", [["playcommand", "Internal"], ["f_ignore", "0"], ["use_default", "1"]], [["extension", $video_ext]]); + foreach my $video_ext ("mp2", "tp", "ts", "m2p", "nuv", "mkv", "ogg", "theora") { + change_or_make_entry("videotypes", [["playcommand", "Default"], ["f_ignore", "0"], ["use_default", "1"]], [["extension", $video_ext]]); } foreach my $non_video_ext ("jpg", "par2") { change_or_make_entry("videotypes", [["f_ignore", "1"]], [["extension", $non_video_ext]]); @@ -415,7 +413,7 @@ sub implement_option { change_or_make_setting('VCDPlayerCommand', 'mplayer vcd:\/\/ -cdrom-device %d -fs -zoom -vo xv -vf pp=lb'); change_or_make_setting('VideoArtworkDir', "$SQL_DirVideo/.covers"); change_or_make_setting('VideoBrowserNoDB', '1'); - change_or_make_setting('VideoDefaultPlayer', 'mplayer-resumer.pl -fs -zoom -vo xv %s'); + change_or_make_setting('VideoDefaultPlayer', 'mplayer-wrapper.pl -fs -zoom %s'); change_or_make_setting('VideoGalleryNoDB', '1'); change_or_make_setting('VideoStartupDir', $SQL_DirVideo); change_or_make_setting('VideoTreeNoDB', '1'); diff --git a/abs/core-testing/tweaker/fs/home/mythtv/.config/smplayer/smplayer.ini b/abs/core-testing/tweaker/fs/home/mythtv/.config/smplayer/smplayer.ini index 33439a7..9660607 100644 --- a/abs/core-testing/tweaker/fs/home/mythtv/.config/smplayer/smplayer.ini +++ b/abs/core-testing/tweaker/fs/home/mythtv/.config/smplayer/smplayer.ini @@ -330,7 +330,7 @@ reset_zoom=Shift+E auto_zoom=Shift+W zoom_169=Shift+A zoom_235=Shift+S -exit_fullscreen=Esc +exit_fullscreen= next_osd=O dec_contrast=1 inc_contrast=2 |