Make your pinstall.sh script work in all puppies

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

Make your pinstall.sh script work in all puppies

#1 Post by jrb »

A while ago I wanted to make sox-14.3.0-p4.pet work in all the current versions of Puppy: wary, racy, lucid and slacko.

This version of sox was compiled for the puppy4 series (430?) and all its dependencies were included in that series. Howvever when installed in wary, racy, lucid or slacko it was missing the following libs:
libao.so.2
libavcodec.so.51
libavformat.so.51
libavutil.so.49

All the aforenamed puppies have versions of these libs, but not the ones required and they have differing versions among themselves. Easy enough to go in and make the symlinks if you know how, and how to figure out what’s missing, but why have to bother?

Here’s the pinstall.sh script that I came up with to handle the situation:

Code: Select all

#!/bin/sh
cd /usr/lib

#for libao
AO=`ls --file-type libao.so.* | grep -v @`
ln -s $AO -T libao.so.2

#for libavcodec.so
AVC=`ls --file-type libavcodec.so.* | grep -v @`
ln -s $AVC -T libavcodec.so.51

#for libavformat.so
AVF=`ls --file-type libavformat.so.* | grep -v @`
ln -s $AVF -T libavformat.so.51

#for libavutil.so
AVU=`ls --file-type libavutil.so.* | grep -v @`
ln -s $AVU -T libavutil.so.49
Line 1, “cd /usr/lib

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#2 Post by sc0ttman »

Maybe this could be integrated into the petget scripts,
so that when installing a .pet and missing deps are found,
your Puppy will search for other versions, and make symlinks, if possible...
Although in certain cases it is sure to cause 'mares...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#3 Post by jrb »

sc0ttman wrote:Maybe this could be integrated into the petget scripts,
so that when installing a .pet and missing deps are found,
your Puppy will search for other versions, and make symlinks, if possible...
Although in certain cases it is sure to cause 'mares...
Hi sc0ttman,
I'm away from home on holiday right now, the missus wanted to get away from 60cm of snow, so I haven't really got an opportunity to try anything along the lines you suggest.

When I first read your post I agreed with you about the "mares" but then after thinking about it I realized that if the proper lib or link already existed then ln would just come back with an error message saying "File exists". So what else could go wrong? :roll:

I'm not a compiler (not much anyway) so I will probably only use this when adapting older .pets or bins from other distros but you may well be right about it having broader applications.

Cheers from sunny and warm (and windy, and wet) Kauai, J

Pelo

Sox package : perfect

#4 Post by Pelo »

Sox package : perfect. What a chance to find it.
Muchas gracias, senor Jrb.
Links done, imagination opens, and the you can do your job (video editing).
Attachments
puppy4.jpg
(41.58 KiB) Downloaded 592 times

Post Reply