LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-27-2012, 12:00 PM   #1
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 248

Rep: Reputation: Disabled
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
 
Old 12-28-2012, 04:59 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,403

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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).
 
Old 12-28-2012, 05:56 AM   #3
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 248

Original Poster
Rep: Reputation: Disabled
Did that work with 30 packages in one dir?
 
Old 12-28-2012, 06:00 AM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,403

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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.

Last edited by ponce; 12-28-2012 at 06:03 AM.
 
Old 12-28-2012, 06:07 AM   #5
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 248

Original Poster
Rep: Reputation: Disabled
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/

Last edited by tuxbg; 12-28-2012 at 06:09 AM.
 
Old 12-28-2012, 06:13 AM   #6
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,403

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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)...

Last edited by ponce; 12-28-2012 at 06:38 AM. Reason: spelling fix
 
Old 12-28-2012, 06:18 AM   #7
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 248

Original Poster
Rep: Reputation: Disabled
Yes but i don't know how to edit x11-Slackbuild script
Sorry about Kde script
 
Old 12-28-2012, 06:25 AM   #8
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,403

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
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/
 
Old 12-28-2012, 06:30 AM   #9
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 248

Original Poster
Rep: Reputation: Disabled
Ok thank you
 
Old 12-28-2012, 12:32 PM   #10
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,498

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by tuxbg View Post
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/

Last edited by kikinovak; 12-28-2012 at 12:34 PM.
 
Old 12-28-2012, 03:11 PM   #11
Ratmonkey
Member
 
Registered: Jul 2012
Location: Notre Dame, Indiana
Distribution: Slackware
Posts: 57

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackbuild for rstudio BroX Slackware 26 10-06-2013 07:01 AM
[SOLVED] on SlackBuild scripting tramni1980 Slackware 7 05-01-2012 09:18 AM
*.SlackBuild SolitudeSensus Programming 3 07-17-2009 11:50 PM
OO 3.01 slackbuild ? brodo Slackware 4 02-01-2009 04:06 PM
SlackBuild CrEsPo Slackware 2 03-19-2006 01:58 PM


All times are GMT -5. The time now is 11:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration