Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 20 Aug 2014, 10:56
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Make your pinstall.sh script work in all puppies
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
jrb


Joined: 11 Dec 2007
Posts: 1030
Location: Smithers, BC, Canada

PostPosted: Sat 11 Feb 2012, 16:29    Post subject:  Make your pinstall.sh script work in all puppies
Subject description: Create links to different versions of libs
 

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:
#!/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” tells bash to work in the /usr/lib directory

Line 4, “AO=`ls --file-type libao.so.* | grep -v @`” sets a variable named AO that will list (ls) all the occurences of libao.so (libao.so*) in /usr/lib. The --file-type parameter tells ls to indicate symlinks with an @ sign. The “| grep -v @” tells bash to leave out the files marked with an @. So all the files listed should be actual files, not symlinks.

Line5, “ln -s $AO -T libao.so.2” makes a symlink from the file found in line4 named “libao.so.2”.

So sox is happy and works in all the puppies and I’m happy that I didn’t have to make all those symlinks by hand. Very Happy

Comments, improvements welcomed.

Cheers, J
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: Mon 20 Feb 2012, 14:56    Post subject:  

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...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
jrb


Joined: 11 Dec 2007
Posts: 1030
Location: Smithers, BC, Canada

PostPosted: Wed 22 Feb 2012, 02:05    Post subject:  

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? Rolling Eyes

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
Back to top
View user's profile Send private message 
Pelo


Joined: 10 Sep 2011
Posts: 3008
Location: Mer méditerrannée (1 kms°)

PostPosted: Wed 28 May 2014, 13:56    Post subject: Sox package : perfect  

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).
puppy4.jpg
 Description   
 Filesize   41.58 KB
 Viewed   101 Time(s)

puppy4.jpg


_________________
Puppy, il ne lui manque que la parole !
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0539s ][ Queries: 13 (0.0052s) ][ GZIP on ]