PDA

View Full Version : build dependencies automatically


rosenth
June 23rd, 2009, 07:35 AM
hi
here (http://ubuntuforums.org/showthread.php?t=51003) is a script:
strace -f -o /tmp/log ./configure
# or make instead of ./configure, if the package doesn't use autoconf
for x in `dpkg -S $(grep open /tmp/log|\
perl -pe 's!.* open\(\"([^\"]*).*!$1!' |\
grep "^/"| sort | uniq|\
grep -v "^\(/tmp\|/dev\|/proc\)" ) 2>/dev/null|\
cut -f1 -d":"| sort | uniq`; \
do \
echo -n "$x (>=" `dpkg -s $x|grep ^Version|cut -f2 -d":"` "), "; \
done
that shows dependecies needed to compile source code. is there a more convinent way to feed output of this script directly into
sudo apt-get install
command. and install them automatically

regala
June 23rd, 2009, 08:49 AM
hi
here (http://ubuntuforums.org/showthread.php?t=51003) is a script:
strace -f -o /tmp/log ./configure
# or make instead of ./configure, if the package doesn't use autoconf
for x in `dpkg -S $(grep open /tmp/log|\
perl -pe 's!.* open\(\"([^\"]*).*!$1!' |\
grep "^/"| sort | uniq|\
grep -v "^\(/tmp\|/dev\|/proc\)" ) 2>/dev/null|\
cut -f1 -d":"| sort | uniq`; \
do \
echo -n "$x (>=" `dpkg -s $x|grep ^Version|cut -f2 -d":"` "), "; \
done
that shows dependecies needed to compile source code. is there a more convinent way to feed output of this script directly into
sudo apt-get install
command. and install them automatically

sudo apt-get build-dep <package-name>

it looks in the debian/control file and install all Build-Depends: packages.

rosenth
June 23rd, 2009, 11:01 AM
but its not a package. its a source code that i need to satisfy its dependencies while running ./configure

blackxored
June 23rd, 2009, 03:56 PM
I don't know if its your script what I've ran in the past. But I'll answer anyway: this script won't show you all dependencies, right? It will stop after first configure error?

rosenth
June 24th, 2009, 12:07 PM
yes. it stop for first error.
but what u suggest? how can i extract dependency checks from configure file?