i have made a tcz extension for hnb which works and i want to submit it, but i get something which seems to me non orthodox. Hnb does not seem to support DESTDIR, so i have used the advices in the wiki and in the forum. Instead of getting one /usr directory in the tcz extension, I get one /usr, one /pkg and one /local -- this seems strange to me.
Here is my script, thanks for help:
#!/bin/bash
tce-load -i /mnt/sda1/tce/optional/ncurses-dev.tcz
tar -xf /mnt/sda1/PackTC/Hbn/hnb_1.9.18.orig.tar.gz
cd hnb-1.9.18
./configure --prefix=/usr/local/
make -j2
touch /tmp/mark
sudo make install DESTDIR=/tmp/hnb
# if DESTDIR fails (here, it does not install into /tmp/hnb, but into /usr/local), then
find /usr/local -newer /tmp/mark -not -type d > /tmp/list
sudo tar -T /tmp/list -czvf /home/tc/hnb.tar.gz
cd /home/tc
tar -xf /home/tc/hnb.tar.gz
cd /home/tc/usr
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null
cd /home/tc
mkdir /home/tc/hnb
sudo cp -R /home/tc/usr /home/tc/hnb
mksquashfs /home/tc/hnb /home/tc/hnb.tcz
sudo mkdir /home/tc/pkg
sudo chmod -R 777 /home/tc/pkg
sudo mount -o loop /home/tc/hnb.tcz /home/tc/pkg
cd /home/tc/pkg
find -not -type d > /home/tc/hnb.tcz.list
cd /home/tc
md5sum hnb.tcz > hnb.tcz.md5.txt
cd
sudo umount /home/tc/pkg