diff options
author | Michael Hanson <hansonorders@verison.net> | 2010-05-04 00:27:08 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verison.net> | 2010-05-04 00:27:08 (GMT) |
commit | b94d28649509115ec6821da376f88d284fe34e1f (patch) | |
tree | cdf0401200e0c93693237158e4cbc1497187f680 /abs/core-testing | |
parent | 4629a7669ffba21068576ca8aac2c2051d360536 (diff) | |
parent | 53625148909b257564b35ba93ff3f4fd18f983df (diff) | |
download | linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.zip linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.tar.gz linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.tar.bz2 |
Merge branch 'master' of mihanson@knoppmyth.net:LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing')
28 files changed, 216 insertions, 128 deletions
diff --git a/abs/core-testing/LinHES-config/LinHES-release b/abs/core-testing/LinHES-config/LinHES-release index 4f1b8f1..0d24981 100644 --- a/abs/core-testing/LinHES-config/LinHES-release +++ b/abs/core-testing/LinHES-config/LinHES-release @@ -1 +1 @@ -LinHES R6.02.02 (hot nanners) +LinHES R6.02.03 (Neighbors) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 61a9148..4318fd8 100644 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.1 -pkgrel=37 +pkgrel=38 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config ) pkgdesc="Install and configure your system" depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted' @@ -114,7 +114,7 @@ md5sums=('297441b8d85820698c19e7c0ad5a3dfe' '4620f6f498ef4523398635cb0bd59425' '06188493e5ed79cb501d3c5694dee8ca' 'e459ed069317bccb20351f037a9df3d2' - '5115da23daa4d57c2fce89b36e08bd3a' + 'ef8d83ae6a2b60645e034a278855d99e' '6aff504ed5e860adc1b7317cd0780900' '55fccb1da0417a896b724f7cfc32dd5a' 'ab2aa42c2947148c2b1cac0ade6d1d55' diff --git a/abs/core-testing/LinHES-system/LinHES.install b/abs/core-testing/LinHES-system/LinHES.install index 9f6a1c1..0f6689e 100644 --- a/abs/core-testing/LinHES-system/LinHES.install +++ b/abs/core-testing/LinHES-system/LinHES.install @@ -48,7 +48,12 @@ grep -q "pam_limits.so" /etc/pam.d/su fi +# Update mythtv's fluxbox keys files to use the tvterm.sh script to get +# an xterm. Then signal fluxbox to re-read the keys file. +sed -i.orig 's/^Mod1 x :.*xterm.*$/Mod1 x :ExecCommand tvterm.sh/g' \ + ~mythtv/.fluxbox/keys +pkill -HUP fluxbox } diff --git a/abs/core-testing/LinHES-system/PKGBUILD b/abs/core-testing/LinHES-system/PKGBUILD index 316bcba..017984f 100644 --- a/abs/core-testing/LinHES-system/PKGBUILD +++ b/abs/core-testing/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=1.1 -pkgrel=29 +pkgrel=30 arch=('i686') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin @@ -8,7 +8,7 @@ install=LinHES.install pkgdesc="scripts and things related to having a automated system" depends=(linhes-sounds xdotool) backup=(etc/modprobe.d/alsa-base) -binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh myth_mtc.lr smolt.cron mythfrontend-start" +binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh LinHES-run firstboot.sh load-modules-mythvantage.sh unclutter-toggle.sh tvterm.sh myth_mtc.lr smolt.cron mythfrontend-start" source=(LinHES-session LinHES-profile.sh $binfiles alsa-base) @@ -47,6 +47,7 @@ md5sums=('19934a456d0e112298b8aac3279f9a16' '18a884a73344ff6eb74f63b49745e0f5' 'dc3eef2a624754e16805d72bbe488b67' 'dc0be354ce77ba2b89868fc29b942c43' + '542e670e78d117657f93141e9689f54d' 'f1870a9522c79e6b248fcbf81dec3280' 'abe887472a170bd1a8e6da6a7b7e93e4' '752488eb8bfb672ce0e4c924f7faf3d1' diff --git a/abs/core-testing/LinHES-system/tvterm.sh b/abs/core-testing/LinHES-system/tvterm.sh new file mode 100755 index 0000000..dfd116b --- /dev/null +++ b/abs/core-testing/LinHES-system/tvterm.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Create a terminal with a font that mostly fills the width of the screen. + +width=$(echo $(xdpyinfo | grep dimensions:) | cut -d' ' -f2 | cut -dx -f1) + +if [ -z "$width" ] ; then + width=1024 +fi + +if [ $width -ge 1920 ] ; then + fontsize=24 +elif [ $width -ge 1440 ] ; then + fontsize=21 +elif [ $width -ge 1280 ] ; then + fontsize=18 +elif [ $width -ge 1024 ] ; then + fontsize=14 +elif [ $width -ge 800 ] ; then + fontsize=11 +elif [ $width -ge 640 ] ; then + fontsize=8 +fi + +xterm -fa 'DejaVu Sans Mono' -fs $fontsize diff --git a/abs/core-testing/atl1e/PKGBUILD b/abs/core-testing/atl1e/PKGBUILD new file mode 100644 index 0000000..64acdfe --- /dev/null +++ b/abs/core-testing/atl1e/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $ +# Maintainer: Cecil Watson<knoppmyth@gmail.com> + +pkgname=atl1e +_kernver=2.6.28-LinHES +pkgver=1 +pkgrel=1 +pkgdesc="AR81 Family Linux wireless drivers" +arch=('i686' 'x86_64') +license=('GPL2') +url="http://partner.atheros.com/Drivers.aspx" +depends=('kernel26') +makedepends=(kernel-headers) +install=atl1e.install +source=('ftp://ftp.knoppmyth.net/R6/sources/AR81Family-Linux-v1.0.1.9.tar.gz') + +build() { + cd $startdir/src/src/ + mkdir -p $pkgdir/lib/modules/$(uname -r)/kernel/drivers/net/atl1e + mkdir -p $pkgdir/usr/man/man/man7 + make KERNDIR=/lib/modules/$_kernver/build \ + INSTDIR=$startdir/pkg KERNELRELEASE=$_kernver || return 1 + make KERNDIR=/lib/modules/$_kernver/build \ + INSTDIR=$startdir/pkg/lib/modules/$(uname -r)/kernel/drivers/net/atl1e KERNELRELEASE=$_kernver install || return 1 + install -D -m 644 atl1e.7.gz $pkgdir/usr/man/man/man7/atl1e.7.gz +} +md5sums=('0d07d98e8941da5232768a154de183fa') diff --git a/abs/core-testing/atl1e/atl1e.install b/abs/core-testing/atl1e/atl1e.install new file mode 100644 index 0000000..7ae7ed0 --- /dev/null +++ b/abs/core-testing/atl1e/atl1e.install @@ -0,0 +1,23 @@ +# arg 1: the new package version +post_install() { + KERNEL_VERSION='2.6.28-LinHES' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + KERNEL_VERSION='2.6.28-LinHES' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 + +} + +# arg 1: the old package version +post_remove() { + KERNEL_VERSION='2.6.28-LinHES' + depmod -ae -v $KERNEL_VERSION > /dev/null 2>&1 +} + +op=$1 +shift +$op $* diff --git a/abs/core-testing/fluxbox/PKGBUILD b/abs/core-testing/fluxbox/PKGBUILD index 9f4a438..3873ff1 100644 --- a/abs/core-testing/fluxbox/PKGBUILD +++ b/abs/core-testing/fluxbox/PKGBUILD @@ -4,7 +4,7 @@ pkgname=fluxbox pkgver=1.1.1 -pkgrel=10 +pkgrel=11 pkgdesc="A lightweight and highly-configurable window manager" arch=('i686' 'x86_64') url="http://www.fluxbox.org" @@ -33,5 +33,5 @@ build() { } md5sums=('fa9fa8fe9a44f86522de5754f8b285ca' 'eeae9c88a2526ac0bd8afcd9ce97f9ed' - 'df8dd2ff7ec582d9a2221279d960750f' + 'bb9f812c559263b4bf1d722628a11ca8' '82dac089f2d42bb9592debc93291846d') diff --git a/abs/core-testing/fluxbox/keys b/abs/core-testing/fluxbox/keys index bf45b79..d0091eb 100644 --- a/abs/core-testing/fluxbox/keys +++ b/abs/core-testing/fluxbox/keys @@ -17,7 +17,7 @@ Mod1 F9 :Workspace 9 Mod1 F10 :Workspace 10 Mod1 F11 :Workspace 11 Mod1 F12 :Workspace 12 -Mod1 x :ExecCommand xterm -fn *18* +Mod1 x :ExecCommand tvterm.sh Mod1 s :ExecCommand sudo taskset -c 0 mythtv-setup #Mod1 m :ExecCommand mythfrontend --logfile /var/log/mythtv/mythfrontend.log Mod1 m :ExecCommand /usr/LH/bin/mythfrontend-start diff --git a/abs/core-testing/mythinstall/PKGBUILD b/abs/core-testing/mythinstall/PKGBUILD index 7a8cccd..1ec14f4 100644 --- a/abs/core-testing/mythinstall/PKGBUILD +++ b/abs/core-testing/mythinstall/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Jams pkgname=mythinstall pkgver=2 -pkgrel=42 +pkgrel=43 pkgdesc="LinHES installer/systemconfig GUI." arch=i686 depends=() diff --git a/abs/core-testing/mythstream/PKGBUILD b/abs/core-testing/mythstream/PKGBUILD index 2ff82ee..8c58fae 100644 --- a/abs/core-testing/mythstream/PKGBUILD +++ b/abs/core-testing/mythstream/PKGBUILD @@ -4,7 +4,7 @@ pkgname=mythstream pkgver=0.18_3 -pkgrel=5 +pkgrel=6 pkgdesc="Unofficial MythTV plugin for Internet audio and video streams." arch=('i686' 'x86_64') url="http://home.kabelfoon.nl/~moongies/streamtuned.html" @@ -31,3 +31,6 @@ build() { make INSTALL_ROOT=$startdir/pkg install cp $srcdir/streams.res $pkgdir/usr/share/mythtv/mythstream } +md5sums=('ba354b83fefe6028c5379fb832a44b6a' + '0131d9e05b55141357bc66e2a88a8132' + 'b7fb47a56b6809938f237632174faeb2') diff --git a/abs/core-testing/mythtv/stable-0.23/morethemes/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/morethemes/PKGBUILD index c8f892e..e745eef 100644 --- a/abs/core-testing/mythtv/stable-0.23/morethemes/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/morethemes/PKGBUILD @@ -1,54 +1,25 @@ -pkgname=morethemes-svn -pkgver=23790 +pkgname=morethemes +pkgver=0.23 pkgrel=1 pkgdesc="Additional themes for MythTV" url="http://www.mythtv.org" license="GPL" arch=('i686' 'x86_64') -depends=('mythtv-svn') -conflicts=('morethemes') -groups=('mythtv-extras-svn') +depends=('mythtv') +groups=('mythtv-extras') patches=() -source=(`echo ${patches[@]:0}`) -_svntrunk=http://cvs.mythtv.org/svn/trunk/themes -_svnmod=themes +source=('ftp://ftp.knoppmyth.net/R6/sources/morethemes-0.23.tar.bz2') +md5sums=('5672c0e8604f7b1610fa9a1c7626423c') build() { - svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod - svn revert -R $_svnmod - - cd $startdir/src/$_svnmod - - echo "--------------------------applying patches----------------------------------------------------" - for i in `echo ${patches[@]:0} ` - do - echo applying $i - echo "-----------------------------" - patch -Np0 -i ${startdir}/src/$i || return 1 - done - echo "--------------------------done applying patches-----------------------------------------------" - - [ "$CARCH" = "i686" ] && ARCH="i686" - [ "$CARCH" = "x86_64" ] && ARCH="x86-64" - - # clean up - make distclean - - # configure -# ./configure --prefix=/usr || return 1 - ./configure --prefix=/usr - - # build and install - . /etc/profile -# make || return 1 -# make INSTALL_ROOT=$startdir/pkg install || return 1 - make - make INSTALL_ROOT=$startdir/pkg install - return 0 -#### THIS PKGBUILD IS HACKED TO BUILD WITH ZERO CONTENT RIGHT NOW #### + cd $startdir/src/ + mkdir -p $pkgdir/usr/share/mythtv + cp -a themes $pkgdir/usr/share/mythtv + } + diff --git a/abs/core-testing/mythtv/stable-0.23/mytharchive/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mytharchive/PKGBUILD index 7c5b99e..cd60597 100644 --- a/abs/core-testing/mythtv/stable-0.23/mytharchive/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mytharchive/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mytharchive pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows." url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythbrowser/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythbrowser/PKGBUILD index c5ae2bb..916cb86 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythbrowser/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythbrowser/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythbrowser pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Mini web browser for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythgallery/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythgallery/PKGBUILD index ecd6676..613c89f 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythgallery/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythgallery/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythgallery pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Image gallery plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythgame/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythgame/PKGBUILD index 04f7c8e..224491e 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythgame/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythgame/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythgame pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Emulation plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythmovies/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythmovies/PKGBUILD index dd8cc34..7e7726f 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythmovies/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythmovies/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythmovies pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Displays information about movies playing in the area." url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythmusic/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythmusic/PKGBUILD index d1df770..3b4daac 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythmusic/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythmusic/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythmusic pkgver=0.23 -pkgrel=2 +pkgrel=5 pkgdesc="Music playing plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythnetvision/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythnetvision/PKGBUILD index 99674d5..de0bc11 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythnetvision/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythnetvision/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythnetvision pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Internet video plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythnews/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythnews/PKGBUILD index f618940..c719323 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythnews/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythnews/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythnews pkgver=0.23 -pkgrel=2 +pkgrel=5 pkgdesc="News checking plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/myththemes/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/myththemes/PKGBUILD index da4c6e8..6ceba8b 100755 --- a/abs/core-testing/mythtv/stable-0.23/myththemes/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/myththemes/PKGBUILD @@ -1,6 +1,6 @@ pkgname=myththemes pkgver=0.23 -pkgrel=3 +pkgrel=4 pkgdesc="Themes for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythtv/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythtv/PKGBUILD index 369b03a..c8eb95f 100755 --- a/abs/core-testing/mythtv/stable-0.23/mythtv/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythtv/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythtv pkgver=0.23 -pkgrel=14 +pkgrel=18 pkgdesc="A personal video recorder for Linux" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythvideo/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythvideo/PKGBUILD index b4a6fe1..abd5fba 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythvideo/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythvideo/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythvideo pkgver=0.23 -pkgrel=2 +pkgrel=5 pkgdesc="Video playback and browsing plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythweather/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythweather/PKGBUILD index cae0c67..de3abaf 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythweather/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythweather/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythweather pkgver=0.23 -pkgrel=2 +pkgrel=5 pkgdesc="Weather checking plugin for MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/mythtv/stable-0.23/mythweb/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythweb/PKGBUILD index cccdd1e..9a15c5f 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythweb/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythweb/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythweb pkgver=0.23 -pkgrel=1 +pkgrel=5 pkgdesc="Web interface for MythTV's backend" url="http://www.mythtv.org" license="GPL" @@ -19,7 +19,7 @@ DOCROOT=/data/srv/httpd/htdocs/mythweb build() { - cd $startdir/src/$_svnmod + cd $startdir/src/mythplugins svn update echo "--------------------------applying patches----------------------------------------------------" diff --git a/abs/core-testing/mythtv/stable-0.23/mythzoneminder/PKGBUILD b/abs/core-testing/mythtv/stable-0.23/mythzoneminder/PKGBUILD index 7512e01..8d4221e 100644 --- a/abs/core-testing/mythtv/stable-0.23/mythzoneminder/PKGBUILD +++ b/abs/core-testing/mythtv/stable-0.23/mythzoneminder/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythzoneminder pkgver=0.23 -pkgrel=1 +pkgrel=4 pkgdesc="Integrates ZoneMinder into MythTV" url="http://www.mythtv.org" license="GPL" diff --git a/abs/core-testing/test-pattern/PKGBUILD b/abs/core-testing/test-pattern/PKGBUILD index db15a0d..7ac825b 100644 --- a/abs/core-testing/test-pattern/PKGBUILD +++ b/abs/core-testing/test-pattern/PKGBUILD @@ -1,6 +1,6 @@ pkgname=test-pattern pkgver=1.0 -pkgrel=4 +pkgrel=6 arch=('i686') pkgdesc="script to create test pattern videos" depends=(imagemagick) @@ -13,4 +13,4 @@ build() { install -m755 -D test_pattern.bash $startdir/pkg/usr/bin/test_pattern.bash } -md5sums=('fbe06cf5a38090e2242f4c3e42f3fc7a') +md5sums=('3a427a5dee0763c6b0a5938fedbde883') diff --git a/abs/core-testing/test-pattern/test_pattern.bash b/abs/core-testing/test-pattern/test_pattern.bash index 6e7fff9..d220fb0 100755 --- a/abs/core-testing/test-pattern/test_pattern.bash +++ b/abs/core-testing/test-pattern/test_pattern.bash @@ -8,8 +8,10 @@ rate=50 TEMPDIR= unset remove_tempdir interlaced= +aspect_ratio= +bitrate= -while getopts ":w:h:t:r:i" opt; do +while getopts ":w:h:t:r:ia:b:" opt; do case $opt in w) w=$OPTARG @@ -26,8 +28,14 @@ while getopts ":w:h:t:r:i" opt; do i) interlaced=TRUE ;; + a) + aspect_ratio=$OPTARG + ;; + b) + bitrate=$OPTARG + ;; \?) - echo -n"\ + echo -n "\ Error: Invalid option -$OPTARG Usage: @@ -38,14 +46,28 @@ Usage: The height in pixels. -t tempdir Temporary directory for intermediate files. If no directory is specified, one is created and deleted at the end of processing. - -r framerate + -r fieldrate -i Generate an interlaced test pattern + -a n:m + Aspect ratio of generated video. + -b bitrate + Bitrate used for encoding. + +Example: +test_pattern.bash -w 1440 -h 1080 -t temp -r 50 -i -a 16:9 -b 12000k " exit 1 esac done +if [ -z "$aspect_ratio" ] ; then + aspect_ratio="${w}:${h}" +fi + +aspectx=$(echo $aspect_ratio | cut -d: -f1) +aspecty=$(echo $aspect_ratio | cut -d: -f2) + # Calculate some dimensions based on the requested size. barw=$((w/32)) @@ -54,14 +76,18 @@ barstart=$((-barw/barstep-1)) frames=$((w/2)) -unit=$((h*2/27)) -gridlw=$((unit*3/43)) +unity=$((h*2/27)) +unitx=$((unity*aspecty*w/(aspectx*h))) +gridlw=$((unity*3/43)) + +echo unity=$unity +echo unitx=$unitx -nvgrid=$(((h-gridlw)/unit)) -nhgrid=$(((((w-gridlw)/unit)-1)/2*2+1)) +nvgrid=$(((h-gridlw)/unity)) +nhgrid=$(((((w-gridlw)/unitx)-1)/2*2+1)) -gridstartx=$((w/2-(nhgrid*unit+gridlw)/2-1)) -gridstarty=$((h/2-(nvgrid*unit+gridlw)/2-1)) +gridstartx=$((w/2-(nhgrid*unitx+gridlw)/2-1)) +gridstarty=$((h/2-(nvgrid*unity+gridlw)/2-1)) echo nvgrid=$nvgrid echo nhgrid=$nhgrid @@ -86,88 +112,88 @@ checker=( -fill "rgb(192,192,192)" ) for ((g=-9;g<=7;g=g+2)) ; do checker=( "${checker[@]}" -draw - "rectangle $((w/2+g*unit*7/10)),$((gridstarty+unit*3+gridlw)) $((w/2+(g+1)*unit*7/10)),$((gridstarty+unit*4+gridlw))" ) + "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) done checker=( "${checker[@]}" -fill black ) for ((g=-8;g<=8;g=g+2)) ; do checker=( "${checker[@]}" -draw - "rectangle $((w/2+g*unit*7/10)),$((gridstarty+unit*3+gridlw)) $((w/2+(g+1)*unit*7/10)),$((gridstarty+unit*4+gridlw))" ) + "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) done unset stripe stripe=( -fill white ) for ((g=0;g<5;g++)) ; do - startx=$((w/2+(3-g*2)*unit)) - endx=$((startx+2*unit)) + startx=$((w/2+(3-g*2)*unitx)) + endx=$((startx+2*unitx)) for ((x=startx;x<endx;x=x+2*(g+1))) ; do stripe=( "${stripe[@]}" -draw - "rectangle $x,$((gridstarty+unit*7+gridlw)) $((x+g)),$((gridstarty+unit*9+gridlw))" ) + "rectangle $x,$((gridstarty+unity*7+gridlw)) $((x+g)),$((gridstarty+unity*9+gridlw))" ) done done for ((g=0;g<13;g++)) ; do stripe=( "${stripe[@]}" -draw - "rectangle $((gridstartx+(nhgrid/2-6+g)*unit)),$((gridstarty+unit*6+gridlw)) $((gridstartx+(nhgrid/2-6+g)*unit+gridlw)),$((gridstarty+unit*7+gridlw-1))" ) + "rectangle $((gridstartx+(nhgrid/2-6+g)*unitx)),$((gridstarty+unity*6+gridlw)) $((gridstartx+(nhgrid/2-6+g)*unitx+gridlw)),$((gridstarty+unity*7+gridlw-1))" ) done convert -size ${w}x${h} xc:white \ -fill "rgb(204,204,0)" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-4*unit)),$((gridstarty+unit*6+gridlw))" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*11+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*13+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*6+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*11+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*13+gridlw))" \ -fill "rgb(0,204,204)" \ - -draw "rectangle $((w/2-4*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-2*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(0,204,0)" \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-0*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(204,0,204)" \ - -draw "rectangle $((w/2-0*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(204,0,0)" \ - -draw "rectangle $((w/2+2*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+4*unit)),$((gridstarty+unit*6+gridlw))" \ - -draw "rectangle $((w/2-unit/2)),$((gridstarty+unit*11+gridlw)) $((w/2+unit/2)),$((gridstarty+unit*13+gridlw))" \ + -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*6+gridlw))" \ + -draw "rectangle $((w/2-unitx/2)),$((gridstarty+unity*11+gridlw)) $((w/2+unitx/2)),$((gridstarty+unity*13+gridlw))" \ -fill "rgb(0,0,204)" \ - -draw "rectangle $((w/2+4*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*6+gridlw))" \ \ -fill black \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*6+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*9+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*6+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*9+gridlw))" \ "${stripe[@]}" \ -fill black \ - -draw "rectangle $((w/2-(unit-gridlw)/2)),$((gridstarty+unit*5+gridlw)) $((w/2+(unit-gridlw)/2-1)),$((gridstarty+unit*8+gridlw))" \ + -draw "rectangle $((w/2-(unitx-gridlw)/2)),$((gridstarty+unity*5+gridlw)) $((w/2+(unitx-gridlw)/2-1)),$((gridstarty+unity*8+gridlw))" \ -fill white \ - -draw "rectangle $((w/2-6*unit)),$((h/2-gridlw/2)) $((w/2+6*unit)),$((h/2-gridlw/2+gridlw))" \ - -draw "rectangle $((w/2-gridlw/2)),$((gridstarty+unit*5+gridlw)) $((w/2-gridlw/2+gridlw)),$((gridstarty+unit*8+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((h/2-gridlw/2)) $((w/2+6*unitx)),$((h/2-gridlw/2+gridlw))" \ + -draw "rectangle $((w/2-gridlw/2)),$((gridstarty+unity*5+gridlw)) $((w/2-gridlw/2+gridlw)),$((gridstarty+unity*8+gridlw))" \ \ -fill "rgb(0,0,0)" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-4*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(51,51,51)" \ - -draw "rectangle $((w/2-4*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-2*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(102,102,102)" \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-0*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(153,153,153)" \ - -draw "rectangle $((w/2-0*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(204,204,204)" \ - -draw "rectangle $((w/2+2*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+4*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(255,255,255)" \ - -draw "rectangle $((w/2+4*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*10+gridlw))" \ \ -fill black \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*1+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*2+gridlw))" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*2+gridlw)) $((w/2-3*unit)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((w/2+6*unit)),$((gridstarty+unit*2+gridlw)) $((w/2+3*unit)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unit)),$((gridstarty+unit*2+gridlw)) $((gridstartx+(nhgrid/2-2)*unit+gridlw)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((w/2-3*unit+1)),$((gridstarty+unit*10+gridlw)) $((w/2+3*unit)),$((gridstarty+unit*11+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*1+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*2+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2-3*unitx)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((w/2+6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*2+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((w/2-3*unitx+1)),$((gridstarty+unity*10+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*11+gridlw))" \ -fill white \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unit)),$((gridstarty+unit*10+gridlw)) $((gridstartx+(nhgrid/2-2)*unit+gridlw)),$((gridstarty+unit*11+gridlw))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*10+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*11+gridlw))" \ "${checker[@]}" \ ${TEMPDIR}/centre.png convert -size ${w}x${h} xc:black \ -fill white \ - -draw "circle $((w/2)),$((h/2)) $((w/2)),$((h/2-6*unit))" \ + -draw "ellipse $((w/2)),$((h/2)) $((6*unitx)),$((6*unity)) 0,360" \ ${TEMPDIR}/circle.png unset drawgrid @@ -175,38 +201,38 @@ drawgrid=( -fill white ) for ((g=0;g<=$nhgrid;g++)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle $((gridstartx+g*unit)),0 $((gridstartx+g*unit+gridlw)),$h" ) + "rectangle $((gridstartx+g*unitx)),0 $((gridstartx+g*unitx+gridlw)),$h" ) done for ((g=0;g<=$nvgrid;g++)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle 0,$((gridstarty+g*unit)) $w,$((gridstarty+g*unit+gridlw))" ) + "rectangle 0,$((gridstarty+g*unity)) $w,$((gridstarty+g*unity+gridlw))" ) done drawgrid=( "${drawgrid[@]}" -draw "rectangle 0,0 $gridstartx,$h" -draw "rectangle 0,0 $w,$gridstarty" - -draw "rectangle $w,$h $((gridstartx+nhgrid*unit)),0" - -draw "rectangle $w,$h 0,$((gridstarty+nvgrid*unit))" + -draw "rectangle $w,$h $((gridstartx+nhgrid*unitx)),0" + -draw "rectangle $w,$h 0,$((gridstarty+nvgrid*unity))" -fill black ) for ((g=0;g<=$nhgrid;g=g+2)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle $((gridstartx+g*unit+gridlw+1)),0 $((gridstartx+(g+1)*unit)),$((gridstarty-1))" + "rectangle $((gridstartx+g*unitx+gridlw+1)),0 $((gridstartx+(g+1)*unitx)),$((gridstarty-1))" -draw - "rectangle $((gridstartx+g*unit+gridlw+1)),$((gridstarty+nvgrid*unit+gridlw+1)) $((gridstartx+(g+1)*unit)),$h" + "rectangle $((gridstartx+g*unitx+gridlw+1)),$((gridstarty+nvgrid*unity+gridlw+1)) $((gridstartx+(g+1)*unitx)),$h" ) done for ((g=0;g<=$nvgrid;g=g+2)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle 0,$((gridstarty+g*unit+gridlw+1)) $((gridstartx-1)),$((gridstarty+(g+1)*unit-1))" + "rectangle 0,$((gridstarty+g*unity+gridlw+1)) $((gridstartx-1)),$((gridstarty+(g+1)*unity-1))" -draw - "rectangle $((gridstartx+nhgrid*unit+gridlw+1)),$((gridstarty+g*unit+gridlw+1)) $w,$((gridstarty+(g+1)*unit-1))" + "rectangle $((gridstartx+nhgrid*unitx+gridlw+1)),$((gridstarty+g*unity+gridlw+1)) $w,$((gridstarty+(g+1)*unity-1))" ) done @@ -227,21 +253,21 @@ convert -size ${w}x${h} xc:grey50 \ "${diagonals[@]}" \ "${drawgrid[@]}" \ -fill "rgb(51,153,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2-6)*unit-1)),$((h/2))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((h/2))" \ -fill "rgb(204,102,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unit+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2-6)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unit)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unit-1)),$((gridstarty+unit*3-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*3-1))" \ -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unit)),$((gridstarty+10*unit+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(128,128,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2+8)*unit-1)),$((h/2))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((h/2))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unit+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2+8)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unit+gridlw)),$((gridstarty+unit*3-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*3-1))" \ -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unit+gridlw+1)),$((gridstarty+10*unit+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unit+gridlw)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*12-1))" \ ${TEMPDIR}/grid.png convert -size ${w}x${h} ${TEMPDIR}/grid.png ${TEMPDIR}/centre.png ${TEMPDIR}/circle.png -composite ${TEMPDIR}/background.png @@ -262,10 +288,10 @@ for ((i=0; i < $frames; i++)) ; do -fill black \ -draw "rectangle $(((barstart+i)*barstep)),0 $(((barstart+i)*barstep+barw)),${h}" \ -font Arial-Black-Regular \ - -pointsize $unit \ + -pointsize $unity \ -fill white \ - -stroke black -strokewidth 5 -annotate +$((w-2*i))+$((gridstartx+11*unit)) 'Judder Test' \ - -stroke none -annotate +$((w-2*i))+$((gridstartx+11*unit)) 'Judder Test' \ + -stroke black -strokewidth 5 -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ + -stroke none -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ -depth 8 \ ${image_name} @@ -280,12 +306,19 @@ for ((i=0; i < $frames; i++)) ; do fi done +bitrate_flags= +if [ -n "$bitrate" ] ; then + bitrate_flags="-b $bitrate" +fi + if [ -n "$interlaced" ] ; then ffmpeg -r ${rate} -i ${TEMPDIR}/interlaced%03d.png -r ${rate} \ - -vcodec mpeg2video -flags +ilme+ildct -y test.mpg + -vcodec mpeg2video -flags +ilme+ildct -aspect $aspect_ratio \ + ${bitrate_flags} -y test.mpg else ffmpeg -r ${rate} -i ${TEMPDIR}/test%03d.png -r ${rate} \ - -vcodec mpeg2video -y test.mpg + -vcodec mpeg2video -aspect $aspect_ratio \ + ${bitrate_flags} -y test.mpg fi if [ -n "$remove_tempdir" ] ; then |