I've seen a bunch of topics on the matter but they all seem fairly complicated, long and for what?
rednoah already provides a noarch package, only noarch is not recognized by dpkg as a valid architecture when running armhf.
However, the package is nearly valid if not for this.
So, for those of you who want to set it up quickly and painlessly, I've adapted the ipk to support a Raspbian-like architecture.
Simply run:
Code: Select all
sudo dpkg -i filebot_4.7_armhf.deb
I repeat, the portable version is actually a better solution but for those of you who want to understand how it could be done, here's the script that will achieve the same result and place the resulting .deb in your home.
Note that this must be run on a raspbian like architecture or a system with the necessary fakeroot and dpkg-deb utilities and will take around 5 minutes when run on the RaspberryPi.
If you need mediainfo support or pcalc support, please install libmediainfo0 or libchromaprint-tools respectively.
Code: Select all
#!/bin/sh
if [ ${#} -lt 1 ]; then
echo 'This scripts needs you to provide the noarch ipk as its first argument'
exit
fi
old_pwd="${PWD}"
new_pwd="/tmp/filebot-ipk2deb-$(date +%s)"
mkdir -p ${new_pwd}
ar x "${1}"
mkdir -p ${new_pwd}/DEBIAN
tar xvf control.tar.gz -C ${new_pwd}/DEBIAN
tar xvf data.tar.gz -C ${new_pwd}
rm control.tar.gz
rm debian-binary
rm data.tar.gz
cd ${new_pwd}
# Set the proper architecture for RaspberryPi
sed -i -e 's:noarch:armhf:' DEBIAN/control
# Remove existing dependencies or recommendations
# This may be improved to only extend them but I don't feel like automating that in simple shell script
sed -i -e '/^Depends.*/d' DEBIAN/control
sed -i -e '/^Recommends.*/d' DEBIAN/control
# Add Java as a dependency
# Add mediainfo and fpcalc (provided by libchromaprint-tools) as recommendations
echo 'Depends: java-runtime | java-runtime-headless' >> DEBIAN/control
echo 'Recommends: libmediainfo0, libchromaprint-tools' >> DEBIAN/control
# Replace /opt/bin with /usr/bin which lies in the standard PATH
sed -i -e 's:opt/bin:usr/bin:' DEBIAN/prerm
sed -i -e 's:opt/bin:usr/bin:' DEBIAN/postinst
# Don't set LD_LIBRARY_PATH to use default system lookup
# Move user data in user files to avoid needing sudo to run
sed -i -e '/# add APP_ROOT to LD_LIBRARY_PATH/,/fi/d' opt/share/filebot/bin/filebot.sh
sed -i -e 's:APP_DATA=.*:unset LD_LIBRARY_PATH\nAPP_DATA="${HOME}/.config/filebot"\nmkdir -p ${APP_DATA}:' opt/share/filebot/bin/filebot.sh
md5sum opt/share/filebot/FileBot.jar opt/share/filebot/bin/filebot.sh > DEBIAN/md5sums
fakeroot dpkg-deb --build . ~
cd "${old_pwd}"
rm -rf ${new_pwd}