View Single Post
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#42
It should be possible to repackage it to use /opt more. I may take a stab at that in a few days (newyear's eve holiday).

I unpack and repack on my Linux desktop computer, which is Debian-based and thus has all the required tools.

The important ones are 'fakeroot' and 'dpkg-deb'. The latter is available also on the N900 itself, but the former is not. It may be possible to avoid needing it by actually being root while repackaging, but I haven't tried this. In any case, if you try this on the N900 itself (e.g. because of lack of a Debian Linux desktop/laptop environment) then you should do this on an ext3 partition, not vfat, otherwise the package will not be repackaged correctly. Oh, and remotely logging in to the N900 with a proper keyboard and screen would make it easier.

Anyway, I do this on a desktop computer.

I list the content of the original .deb with
dpkg-deb -c filename.deb

I unpack the content of the original .deb with
dpkg-deb -x filename.deb tmp

I unpack the control files of the original .deb with
dpkg-deb -e filename.deb tmp/DEBIAN

I edit the stuff in tmp/DEBIAN/control (and postinstall and md5sums, as needed). E.g. version number.

I move around stuff in tmp/usr and etc as needed.

Then I repack with
fakeroot dpkg-deb -b tmp filename.deb
where filename.deb is the full filename of the package, with correction version number etc. etc.

I inspect the result with
dpkg-deb -c filename.deb

Then I copy to the N900 and install with dpkg -i filename.deb

However, there may be a much easier shortcut for pseudo-optifying this particular package:

1: Remove the installation: dpkg --remove maemotex
2: Make sure there's nothing left in /usr/local
3: Remove the original, leftover /usr/local: rmdir /usr/local
(NB: dpkg --remove may have removed it already.)
4: Make a symlink into /opt, like so:
Code:
mkdir /opt/local
cd /usr
ln -s local /opt/local
5: Re-install maemotex.

Now it'll still unpack and install in /usr/local, but that just happens to really be /opt/local.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following 2 Users Say Thank You to TA-t3 For This Useful Post: