LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackbuild (http://www.linuxquestions.org/questions/slackware-14/slackbuild-4175443141/)

tuxbg 12-27-2012 12:00 PM

Slackbuild
 
Hello Slackware friends,i have a question for you.
I want to create a Slackbuild script ,that compile packages that is on one directory.
For example packages exo and leafpad are in one directory,i want to compile them from slackbuild script.Like this one http://taper.alienbase.nl/mirrors/al...KDE.SlackBuild. but i dont know how to do this .
I hope you can understand my question

ponce 12-28-2012 04:59 AM

I just used a script like this, copied and run from the folder in question
Code:

TAG=${TAG:-custom}
PKGTYPE=${PKGTYPE:-txz}
MAKEFLAGS=${MAKEFLAGS:--j7} # Use 7 jobs for building

TMP=${TMP:-/tmp/SBo}
OUTPUT=${OUTPUT:-/tmp}

CWD=$(pwd)

set -e

for PRGNAM in \
  pkg1 \
  pkg2 \
  pkg3 \
  etc \
; do

  echo "* * * * * *"
  echo "* building $PRGNAM"
  echo "* * * * * *"

  cd $CWD/$PRGNAM
  rm -f $OUTPUT/$PRGNAM*.$PKGTYPE
  MAKEFLAGS=$MAKEFLAGS PKGTYPE=$PKGTYPE TAG=$TAG TMP=$TMP OUTPUT=$OUTPUT \
    sh $PRGNAM.SlackBuild
  upgradepkg --install-new --reinstall $OUTPUT/$PRGNAM*.$PKGTYPE
done

obviously the slackbuilds must support those variables (the ones coming from slackbuilds.org do).

tuxbg 12-28-2012 05:56 AM

Did that work with 30 packages in one dir?

ponce 12-28-2012 06:00 AM

why not?

if their slackbuilds are all compatible, you list them all in the script, build them in the correct order (needed if some are dependencies of others), you can build how much you like.

but, if you hadn't make any local changes and you simply want to build the stuff from slackbuilds.org, sbopkg is a smarter solution.

tuxbg 12-28-2012 06:07 AM

You can't understand me correctly, ,or i can't understand what you telling me i want to put source packages in one directory,one configure file for all packages in other one directory and build all packages with one slackbuild script like this one http://slackware.osuosl.org/slackwar.../source/x/x11/

ponce 12-28-2012 06:13 AM

I never have gone that route, but obviously you can take those slackbuilds as a base.

I'm just thinkinking that can be useful for self-contained projects, like X11 or KDE, but for already existing build script like, for example, the one of slackbuilds.org that get updated autonomously, it gets difficult to sync etherogeneous upstream changes with the build scripts (that must support all possible cases)...

tuxbg 12-28-2012 06:18 AM

Yes but i don't know how to edit x11-Slackbuild script
Sorry about Kde script

ponce 12-28-2012 06:25 AM

if you don't have any experience with bash scripting you will have a real hard time editing a complex bash script like that: the only solution I see if you really want to do this is to learn bash scripting, there's no easy way out

http://tldp.org/LDP/abs/html/

tuxbg 12-28-2012 06:30 AM

Ok thank you

kikinovak 12-28-2012 12:32 PM

Quote:

Originally Posted by tuxbg (Post 4858348)
You can't understand me correctly, ,or i can't understand what you telling me i want to put source packages in one directory,one configure file for all packages in other one directory and build all packages with one slackbuild script like this one http://slackware.osuosl.org/slackwar.../source/x/x11/

This sounds a bit like "I want to put vegetables, meat and spices in one kitchen and I want them to become food".

My suggestion: learn to cook. Buy a book or two about Bash scripting and/or work through the Advanced Bash Scripting Guide on the Internet. Read through existing SlackBuilds (official and third-party) to check out what they actually do and how they work. And then start slowly building your own stuff.

Take your time for this task. And most importantly: have fun.

Cheers,

Niki

PS: I think what you want to do looks a bit like this: http://www.microlinux.fr/slackware/14.0/

Ratmonkey 12-28-2012 03:11 PM

Mmm! I've got that in the crockpot right now... No really, I do! =)

I do have to say that I love slackbuilds, I know I wouldn't be able to effectively use Slackware without them.


All times are GMT -5. The time now is 05:58 PM.