Created
May 30, 2011 22:15
-
-
Save fapestniegd/999561 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get install -y cvs build-essential dialog automake libtool help2man \ | |
| libx11-dev expect | |
| ################################################################################ | |
| # getting the sources | |
| TEMPDIR=$(mktemp -d /var/tmp/lirc-redrat.XXXX) | |
| # effin' automating cvs logins is a bitch | |
| (cd ${TEMPDIR}; | |
| cat<<EOF | /usr/bin/expect | |
| spawn /usr/bin/cvs -d:pserver:[email protected]:/cvsroot/lirc login | |
| expect "assword" | |
| send "\r" | |
| EOF | |
| ) | |
| (cd ${TEMPDIR}; /usr/bin/cvs -z8 -d:pserver:[email protected]:/cvsroot/lirc co lirc) | |
| ################################################################################ | |
| # patching the sources | |
| (cd ${TEMPDIR};wget http://www.redrat.co.uk/software/linux/lirc-rr3-0.4.tar.gz ) | |
| (cd ${TEMPDIR}; tar xvzf lirc-rr3-0.4.tar.gz ) | |
| # The config.ac file provided by the tarball is actually a tarball of the others | |
| rm ${TEMPDIR}/configure.ac | |
| wget -O ${TEMPDIR}/configure.ac \ | |
| "http://lircredrat3.svn.sourceforge.net/viewvc/lircredrat3/lirc/configure.ac?revision=28" | |
| mv ${TEMPDIR}/configure.ac ${TEMPDIR}/lirc/configure.ac | |
| mv ${TEMPDIR}/setup.data ${TEMPDIR}/lirc/setup.data | |
| mv ${TEMPDIR}/Makefile.am ${TEMPDIR}/lirc/drivers/lirc_redrat3/Makefile.am | |
| mv ${TEMPDIR}/lirc_redrat3.mod.c \ | |
| ${TEMPDIR}/lirc/drivers/lirc_redrat3/lirc_redrat3.mod.c | |
| #mv ${TEMPDIR}/lirc_redrat3.c \ | |
| # ${TEMPDIR}/lirc/drivers/lirc_redrat3/lirc_redrat3.c | |
| # linux/autoconf.h is generated/autoconf.h in 2.6.36 | |
| sed -e 's/#include <linux\/autoconf.h>/#include <generated\/autoconf.h>/' \ | |
| ${TEMPDIR}/lirc_redrat3.c > \ | |
| ${TEMPDIR}/lirc/drivers/lirc_redrat3/lirc_redrat3.c | |
| ################################################################################ | |
| # lirc configuration and compiling part | |
| (cd ${TEMPDIR}/lirc; ./autogen.sh) | |
| # Replace manual bullshit with a here statement... | |
| # (cd ${TEMPDIR}/lirc; ./setup.sh) | |
| # # 1) Driver Configuration-> | |
| # # +-> 8) USB Devices | |
| # # +-> t) RedRat3 IR Sender/Receiver | |
| # # Save configuration and Exit | |
| cat<<EOF > ${TEMPDIR}/lirc/configure.sh | |
| #! /bin/sh | |
| ./configure \ | |
| --with-moduledir=/lib/modules/$(uname -r)/misc \ | |
| --with-x \ | |
| --with-driver=redrat3 \ | |
| --with-major=61 \ | |
| --with-port=none \ | |
| --with-irq=none \ | |
| "\$@" | |
| EOF | |
| chmod 755 ${TEMPDIR}/lirc/configure.sh | |
| (cd ${TEMPDIR}/lirc; ./configure.sh) | |
| (cd ${TEMPDIR}/lirc ;make) | tee make.out 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment