wiki:usbir/CompileLIRC

Compile LIRC with support for Iguanaworks USB IR Transciever

Most Linux distro’s include binaries of LIRC, but those binaries are compiled without support for the IguanaIR driver. So, to use our device under LIRC, you need to compile LIRC with support for our driver. Below are instructions for Fedora (RPM) and Ubuntu (DEB) based distros.

Compiling under Fedora (RPM)

  1. Install our driver (goto downloads section)
  2. Download the LIRC source for your version of Fedora by running the top line:
    $ yumdownloader –source lirc
    lirc-0.9.0-8.fc17.src.rpm
    
  3. Rebuild the RPM (do not run as root) by running the top line:
    $ rpmbuild –rebuild lirc-0.9.0-8.fc17.src.rpm
    Installing lirc-0.9.0-8.fc17.src.rpm
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    error: Failed build dependencies:
    libtool is needed by lirc-0.9.0-8.fc17.x86_64
    libirman-devel is needed by lirc-0.9.0-8.fc17.x86_64
    libftdi-devel is needed by lirc-0.9.0-8.fc17.x86_64
    alsa-lib-devel is needed by lirc-0.9.0-8.fc17.x86_64
    portaudio-devel >= 19 is needed by lirc-0.9.0-8.fc17.x86_64
    
  4. This step will probably fail. That’s ok — install any missing -devel packages listed from the previous step by running:
    $ sudo yum install libtool libirman-devel libftdi-devel alsa-lib-devel portaudio-devel
    
    where libtool, libirman-devel, etc are the missing packages listed in step 3.
  5. Try rebuilding LIRC again (again, do not run as root) by running the top line:
    $ rpmbuild –rebuild lirc-0.9.0-8.fc17.src.rpm
    Installing lirc-0.9.0-8.fc17.src.rpm
    
    Wrote: /home/user/rpmbuild/RPMS/lirc-0.9.0-8.fc17.x86_64.rpm
    Wrote: /home/user/rpmbuild/RPMS/lirc-libs-0.9.0-8.fc17.x86_64.rpm
    Wrote: /home/user/rpmbuild/RPMS/lirc-devel-0.9.0-8.fc17.x86_64.rpm
    Wrote: /home/user/rpmbuild/RPMS/lirc-doc-0.9.0-8.fc17.x86_64.rpm
    Wrote: /home/user/rpmbuild/RPMS/lirc-remotes-0.9.0-8.fc17.x86_64.rpm
    Wrote: /home/user/rpmbuild/RPMS/lirc-debuginfo-0.9.0-8.fc17.x86_64.rpm
    
  6. Install the binary you just created (you do not need to install all the packages you created) with:
    sudo rpm -Uvh –force /home/user/rpmbuild/RPMS/lirc-0.9.0-8.fc17.x86_64.rpm
    
    where the version of LIRC (0.9.0-8 in this example) needs to match what was listed in the previous step.
  7. Optional: Remove files
    rm -rf lirc-0.9.0
    
  8. Finally, confirm newly installed LIRC package has support for iguanaIR driver:
    $ lircd -H ?
    Driver `?’ not supported.
    Supported drivers:
    accent
    alsa_usb
    <...snip...>
    iguanaIR
    <...snip...>
    uirt2_raw
    usb_uirt_raw
    usbx
    

Compiling under Ubuntu (DEB)

  1. Add our debian repository to your /etc/apt/sources.list file
  2. Install our software with
    sudo apt-get install iguanair
    
  3. If not already added, add your distro’s source repository to you /etc/apt/sources.list (often can be done via package manager gui, depending on the distro)
  4. Get necessary packages to compile LIRC by running
    sudo apt-get build-dep lirc
    
  5. Compile LIRC by running
    sudo apt-get -b source lirc
    
  6. The previous command will have created LIRC binaries in the parent directory. You can install that binary with
    sudo dpkg -i lirc-0.*.deb
    
  7. Finally, confirm newly installed LIRC package has support for iguanaIR driver:
    $ lircd -H ?
    Driver `?’ not supported.
    Supported drivers:
    accent
    alsa_usb
    <...snip...>
    iguanaIR
    <...snip...>
    uirt2_raw
    usb_uirt_raw
    usbx
    
Last modified 5 months ago Last modified on 04/20/2014 11:02:37 AM