Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
slackbuilds [2015/05/15 05:17]
slackermedia
slackbuilds [2021/06/03 19:48] (current)
Line 1: Line 1:
-[[{arrowp.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​left:​0;​}pkg|]] 
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​margin-left:​2.5em;​}dep|]] 
  
  
Line 30: Line 28:
   -Run the SlackBuild, as root: ''​su -c "​./​foo.SlackBuild"​ ''​   -Run the SlackBuild, as root: ''​su -c "​./​foo.SlackBuild"​ ''​
   -Install the resulting package: ''​su -c "​installpkg /​tmp/​foo_sbo.tgz"​ ''​   -Install the resulting package: ''​su -c "​installpkg /​tmp/​foo_sbo.tgz"​ ''​
 +
 +
 +
 +====Common SlackBuild Mods====
 +
 +The great thing about a SlackBuild script is that it can be modified by you, the user. SlackBuilds have several properties that are set by the script'​s author to default values, but which can be over-ridden by the user.
 +
 +It is a convention is SlackBuild scripts from SlackBuilds.org that any value that can be defined by the user is written in CAPS. In theory, you can see most of these values in a script use ''​egrep'':​
 +
 +<​code>​
 +$ egrep '​[A-Z]+='​ audacity.SlackBuild
 +</​code>​
 +
 +In practise, there are certain strings that you will modify more often than others.
 +
 +{{anchor:​versionmod}}
 +**VERSION**
 +
 +<WRAP indent>
 +If a site offers a SlackBuild for ''​foo-1.0''​ but you know that ''​foo-2.0''​ has just been released, update the VERSION string:
 +
 +<​code>​
 +$ VERSION=2.0 ./​foo.SlackBuild
 +</​code>​
 +
 +</​WRAP>​
 +
 +
 +{{anchor:​optionmod}}
 +**Options**
 +
 +<WRAP indent>
 +Sometimes a SlackBuild author offers the user a choice in what should or should not be included in a build. For example, if a plugin is offered as both an LV2 and a VST, the author might provide the option to build both by default, with manual over-rides to drop one or the other. This is usually communicated to you in the README file.
 +
 +<​code>​
 +$ VST=no ./​foo.SlackBuild
 +</​code>​
 +</​WRAP>​
 +
  
  
Line 121: Line 158:
 To load and process a queue file, launch ''​sbopkg''​ and select ''​Queue''​. The ''​Queue''​ menu contains items to view the current queue, where you can modify a queue, load an existing queue, save a queue, rename or delete existing queues, add all installed packages to the queue (for creating package templates to enable restoration of the current package list or to transfer to another machine), and to process the current queue. To load and process a queue file, launch ''​sbopkg''​ and select ''​Queue''​. The ''​Queue''​ menu contains items to view the current queue, where you can modify a queue, load an existing queue, save a queue, rename or delete existing queues, add all installed packages to the queue (for creating package templates to enable restoration of the current package list or to transfer to another machine), and to process the current queue.
  
-A queue is created from the sbopkg GUI by finding a package via either Browse +A queue is created from the sbopkg GUI by finding a package via either Browse or Search and selecting Add to Queue. This adds the package to a temporary
-or Search and selecting Add to Queue. This adds the package to a temporary+
 session-only queue file. session-only queue file.
  
Line 143: Line 179:
 To run a queue file, select ''​Process Queue''​ from the ''​Queue''​ menu. To run a queue file, select ''​Process Queue''​ from the ''​Queue''​ menu.
  
-<WRAP tip> 
 For example, if you have downloaded a queue file from Slackermedia,​ then to load it into ''​sbopkg'',​ you can invoke ''​sbopkg''​ as ''​QUEUEDIR=/​path/​to/​dir/​containing_the_queuefile sbopkg''​ and it will appear in the ''​Load''​ list. The queue file would then be loaded into ''​sbopkg''​ and you can view it, modify it, remove or reorder applications,​ and finally process it. For example, if you have downloaded a queue file from Slackermedia,​ then to load it into ''​sbopkg'',​ you can invoke ''​sbopkg''​ as ''​QUEUEDIR=/​path/​to/​dir/​containing_the_queuefile sbopkg''​ and it will appear in the ''​Load''​ list. The queue file would then be loaded into ''​sbopkg''​ and you can view it, modify it, remove or reorder applications,​ and finally process it.
-</​WRAP>​+
  
 ==== Advanced Uses of sbopkg ==== ==== Advanced Uses of sbopkg ====
Line 159: Line 194:
 This searches for an application or queue file called "​foo"​ and install it (if it is an application) or the programmes listed in it (if it is a queue file). This searches for an application or queue file called "​foo"​ and install it (if it is an application) or the programmes listed in it (if it is a queue file).
  
-If both a program ​and a queue file exists with the same name, you'll be prompted to specify which you meant. If a queue file is intended, using and specifying the ''​.sqf''​ extension to avoid the prompt.+If both an application ​and a queue file exists with the same name, you'll be prompted to specify which you meant. If a queue file is intended, using and specifying the ''​.sqf''​ extension to avoid the prompt.
  
 If you know the name of an application and feel confident that you you have met all its dependencies (or can meet them all within the same command), using ''​sbopkg''​ as a command is the easier and simpler than loading the graphical environment. If you know the name of an application and feel confident that you you have met all its dependencies (or can meet them all within the same command), using ''​sbopkg''​ as a command is the easier and simpler than loading the graphical environment.
Line 177: Line 212:
  
 ''​Sport'',​ the "​Slackware Port" system, is Slackermedia'​s shell frontend to [[http://​slackbuilds.org]]. It is meant to be simpler and less interactive than ''​sbopkg'',​ ''​Sport'',​ the "​Slackware Port" system, is Slackermedia'​s shell frontend to [[http://​slackbuilds.org]]. It is meant to be simpler and less interactive than ''​sbopkg'',​
-and it instead emulates the *BSDports system, or the ''​emerge''​ system from *Gentoo*.+and it instead emulates the BSD ports system, or the ''​emerge''​ system from Gentoo. 
 + 
 +[{{ sport.png |The sport interface.}}]
  
 Like other Slackware package installation applications,​ ''​sport''​ is not a package manager as you would find in [[http://​debian.org|Debian]] or [[http://​redhat.com|Red Hat]]. However, it does help you search through your collection of SlackBuilds,​ read relevant files about each SlackBuild, and then execute the build and install processes. Like other Slackware package installation applications,​ ''​sport''​ is not a package manager as you would find in [[http://​debian.org|Debian]] or [[http://​redhat.com|Red Hat]]. However, it does help you search through your collection of SlackBuilds,​ read relevant files about each SlackBuild, and then execute the build and install processes.
  
-<​WRAP ​info>+<​WRAP ​tip>
 Since the most prolific and uniform collection of SlackBuilds is [[http://​slackbuilds.org]],​ and since Slackermedia is so heavily reliant upon SlackBuilds.org,​ ''​sport''​ is largely modeled after the structure of SBo, although it is not restricted to it and technically will work with any collection of builds (such as your own personal collection of modified builds, or those of trusted associates). Since the most prolific and uniform collection of SlackBuilds is [[http://​slackbuilds.org]],​ and since Slackermedia is so heavily reliant upon SlackBuilds.org,​ ''​sport''​ is largely modeled after the structure of SBo, although it is not restricted to it and technically will work with any collection of builds (such as your own personal collection of modified builds, or those of trusted associates).
 </​WRAP>​ </​WRAP>​
  
-To install ''​sport'',​ download its source code and use ''​sport''​ to install ''​sport''​ (yes, +To install ''​sport'',​ download its source code and use ''​sport''​ to install ''​sport''​ (yes, you use ''​sport''​ to install itself):
-you use ''​sport''​ to install itself):+
  
 <​code>​ <​code>​
 $ git clone https://​gitlab.com/​slackport/​sport.git sport.git $ git clone https://​gitlab.com/​slackport/​sport.git sport.git
 $ cd sport.git $ cd sport.git
-$ su -lc "./sport install ."+$ su -lc './sport install .'
 </​code>​ </​code>​
  
Line 200: Line 236:
 <​code>​ <​code>​
 $ su -c 'mkdir -p /​usr/​ports'​ $ su -c 'mkdir -p /​usr/​ports'​
-$ su -c 'rsync -av rsync://​slackbuilds.org/​slackbuilds/​$(awk '​{print $2}' /​etc/​slackware-version)/​ /​usr/​ports/'​+$ su -c 'rsync -av rsync://​slackbuilds.org /​slackbuilds/​$(awk '​{print $2}' /​etc/​slackware-version)/​ /​usr/​ports/'​
 </​code>​ </​code>​
  
Line 210: Line 246:
 </​code>​ </​code>​
  
-Before you can use ''​sport'',​ verify the location of your local SlackBuild +Before you can use ''​sport'',​ verify the location of your local SlackBuild repository. Open ''/​etc/​sport.conf''​ and edit the ''​SBOPATH''​ and ''​MASTER''​ variables. For example, assuming ''​xx.x''​ is your version of Slackware:
-repository. Open ''/​etc/​sport.conf''​ and edit the ''​SBOPATH''​ and ''​MASTER''​ variables. For +
-example, assuming ''​xx.x''​ is your version of Slackware:+
  
 <​code> ​ <​code> ​
Line 229: Line 263:
  
  
-These tasks are each individual commands within the ''​sport''​ toolset. For each +These tasks are each individual commands within the ''​sport''​ toolset. For each flag, you can use every common convention for switches. For example, these all do the same thing:
-flag, you can use every common convention for switches. For example, these all do the same thing:+
  
   *''​sport --search foo''​   *''​sport --search foo''​
Line 240: Line 273:
 ==== Sport Walkthrough ==== ==== Sport Walkthrough ====
  
-The first step in the workflow is to find what you want to install. If you only +The first step in the workflow is to find what you want to install. If you only have an idea of what you want, then you'll want to search for matches to some keyword:
-have an idea of what you want, then you'll want to search for matches to some +
-keyword:+
  
 <​code>​ <​code>​
 # sport search foo # sport search foo
-network/​emacs-foo.tar.gz ... emacs-foo (simple Emacs interface of foo+network/​emacs-foo.tar.gz ... emacs-foo (imaginary emacs mode
-network/​foo.tar.gz ... foo (text based web browser and pager)+network/​foo.tar.gz ... foo (fake network tool) 
 +audio/​kfooplayer.tar.gz ... kfooplayer (fake audio tool)
 </​code>​ </​code>​
  
-The search function of sport performs a fuzzy search on any term you provide. A +The search function of ''​sport'' ​performs a fuzzy search on any term you provide. A search for "​foo"​ therefore returns the category and packages names for both the stand-alone ​''​foo'' ​and, in this example, ​the ''​emacs-foo''​. It also returns a string in which "​foo"​ appears; as in ''​kfooplayer''​.
-search for "​foo"​ therefore returns the category and packages names for both the +
-stand-alone foo and the Emacs foo mode.+
  
-Note+<WRAP tip> 
 +If you only want to browse through your SlackBuilds tree without having to think up search terms, cd into ''/​usr/​ports''​ (or whatever you have set ''​SBOPATH''​ to) and browse its contents. 
 +</​WRAP>​
  
-If you only want to browse through your SlackBuilds tree without having to +From this point on''​sport''​ interaction is //not// fuzzy as the ''​search''​ is; use the proper name of the application from here on:
-think up search termscd into /usr/ports (or whatever you have set SBOPATH to) +
-and browse its contents.+
  
-If you find something of interest but want to see if you already have it +If you find something of interest but want to see if you already have it installed, use ''​sport check''​:
-installed, use sport check:+
  
-  ​# sport check foo+<​code>​ 
 +# sport check foo 
 +</​code>​
  
 If nothing is returned, then you do not have that application installed. If nothing is returned, then you do not have that application installed.
  
-The next step in the typical workflow is to read about the package you are +The next step in the typical workflow is to read about the package you are about to install, so that you know about any important build configuration 
-about to install, so that you know about any important build configuration +options, or dependencies that you should install first. Use ''​sport cat'' ​to see all relevant notes in a SlackBuild. ​
-options, or dependencies that you should install first. Use sport cat to see +
-all relevant notes in a SlackBuild. ​If the package search returned only one +
-match, then you can use just the packagename,​ but if there were multiple +
-matches then you should provide both the category and package name:+
  
-  ​$ sport c net*/foo+<​code>​ 
 +$ sport c foo 
 +</​code>​
  
-If you have changed directories into your SlackBuild tree and are in the same +If you have changed directories into your SlackBuild tree and are in the same directory as the SlackBuild file, you can cheat and provide the path to the package with a dot-slash:
-directory as the SlackBuild file, you can cheat and provide the path to the +
-package with a dot-slash:+
  
-  ​$ sport cat ./foo+<​code>​ 
 +$ sport cat ./foo 
 +</​code>​
  
 Or if you are in the SlackBuild'​s directory, just use a dot. Or if you are in the SlackBuild'​s directory, just use a dot.
  
-  ​$ sport cat .+<​code>​ 
 +$ sport cat . 
 +</​code>​
  
-This displays the README and the .info files of the package, so that you can +This displays the ''​README'' ​and the .info files of the package, so that you can see what the application claims to do, and what dependencies are recommended and required.
-see what the application claims to do, and what dependencies are recommended +
-and required.+
  
-If the package you want to install has dependencies,​ you should resolve those +If the package you want to install has dependencies,​ you should resolve those dependencies before continuing. Unlike the BSD Ports and Gentoo emerge systems, ​''​sport'' ​does not resolve dependencies for you. That way, if you have already have a package or a SlackBuild for a dependency (or you prefer to compile it yourself), you can use it instead of whatever an automated "​package manager"​
-dependencies before continuing. Unlike the BSD Ports and Gentoo emerge systems, +
-sport does not resolve dependencies for you. That way, if you have already have +
-a package or a SlackBuild for a dependency (or you prefer to compile it +
-yourself), you can use it instead of whatever an automated "​package manager"​+
 happens to find lying around. happens to find lying around.
  
-Note+<WRAP important>​ 
 +//Resolving dependencies//​ may sound mysterious but all it means is that you will have to install some additional system libraries or smaller applications before you install the application you are trying to obtain. To resolve the dependencies of ''​foo'',​ you would take note of the libraries it requires (''​bar''​ and ''​baz''​) and then use ''​sport''​ to install each one before then installing ''​foo''​ itself. 
 +</​WRAP>​
  
-"​Resolving dependencies"​ may sound mysterious but all it means is that you will +Once you have resolved all dependencies, ​you are ready to build the package. There are two commands ​you can use; ''​sport install''​ will build the package and install ​it onto your system ​(leaving a copy of the finished Slack package in the default build location for SBo packages: ''/​tmp''​), while ''​sport install ​--build-only''​ just compiles the code but does //not// install the package.
-have to install some additional system libraries or smaller applications before +
-you install the application ​you are trying ​to obtain. To resolve ​the +
-dependencies of foo, you would take note of the libraries ​it requires ​(bar and  +
-bazand then use sport to install ​each one before then installing foo itself.+
  
-Once you have resolved all dependencies,​ you are ready to build the package. +<​code>​ 
-There are two commands you can use; sport install ​will build the package and +$ su -lc 'sport install ​foo' 
-install it onto your system (leaving a copy of the finished Slack package in +</code>
-the default build location for SBo packages: ​/tmp), while sport install +
---build-only only builds but does not install the package. +
- +
-  # sport install foo+
  
-Again, if you are in the directory containing the SlackBuild you want to +Again, if you are in the directory containing the SlackBuild you want to install, you can cheat and provide the path to the package with a dot, meaning
-install, you can cheat and provide the path to the package with a dot, meaning+
 that the build script is in the current directory: that the build script is in the current directory:
  
-  # sport -i .+<​code>​ 
 +su -lc 'sport -i .
 +</​code>​
  
-If you are fastidious about disk space or keeping a tidy SlackBuilds tree, use  +If you are fastidious about disk space or keeping a tidy SlackBuilds tree, use ''​sport clean foo'' ​to remove the directory containing the source code and 
-sport clean foo to remove the directory containing the source code and +SlackBuild. It of course leaves any compressed copy of your SlackBuild directory (the SlackBuild.org structure).
-SlackBuild. It of course leaves any compressed copy of your SlackBuild +
-directory (the SlackBuild.org structure).+
  
-Warning+<WRAP alert> 
 +If you are //not// using the SlackBuild.org tree, then you should either keep your originals as compressed .tar.gz archives or you should either modify or not use the clean command. 
 +</​WRAP>​
  
-If you are not using the SlackBuild.org tree, then you should either keep your +''​sport''​ may be used from anywhere in your filesystem, or you can use it as you "​crawl"​ through your SlackBuild tree. It's a handy and flexible tool that can help make the potentially repetitious process of downloading,​ compiling, and installing software easier.
-originals as compressed ​.tar.gz archives or you should either modify or not use +
-the clean command.+
  
-As you can see, sport may be used from anywhere in your filesystem, or you can +==== Advanced Sport Usage ====
-use it as you "​crawl"​ through your SlackBuild tree. It's a handy and flexible +
-tool that can help make the potentially repetitious process of downloading,​ +
-compiling, and installing software easier.+
  
-Advanced Sport Usage+Since ''​sport''​ is just a BASH script, you can use the usual BASH conventions to add flexibility to your commands.
  
-Since sport is just a BASH scriptyou can use the usual BASH conventions to +To pass build options through ''​sport''​provide ​the option (usually defined in the ''​README''​ of the SlackBuild).
-add flexibility to your commands.+
  
-To pass build options through ​sport, provide the option (usually defined in the +<​code>​ 
-README of the SlackBuild).+# WIDGETS=yes ​sport install foo 
 +</​code>​
  
-  # WIDGETS=yes ​sport install foo+To pass make flags through ​sport, use ''​MAKEOPTS''​.
  
-To pass make flags through sport, use MAKEOPTS.+<​code>​ 
 +MAKEOPTS='​-j8'​ sport install foo 
 +</​code>​
  
-  # MAKEOPTS='-j8' sport install foo+If you need to do some special kind of install (such as an ''​upgradepkg''​ rather than an ''​installpkg''​) then preface your ''​sport ​-i''​ command with the ''​INSTALLER''​ environment variable:
  
-If you need to do some special kind of install (such as an upgradepkg rather +<​code>​ 
-than an installpkg) then preface your sport -i command with the INSTALLER +# INSTALLER=upgradepkg sport i . 
-environment variable: +</​code>​
- +
-  # INSTALLER=upgradepkg sport i .+
  
 Or something more complex: Or something more complex:
  
-  ​# INSTALLER="​upgradepkg --install-new"​ sport -i multi*/foo  +<​code>​ 
 +# INSTALLER="​upgradepkg --install-new"​ sport -i foo  
 +</​code>​
  
 And so on. And so on.
  
-Queue Files+==== Queue Files ====
  
-Sport supports batch, or queue, files.+''​Sport'' ​supports batch, or queue, files.
  
-For your initial Slackermedia install actions, you will use a Slackermedia +For your initial Slackermedia install actions, you will use a Slackermedia ​[[http://slackermedia.info/​downloads|queue file]] ​but you can also create and 
-queue files (slackermedia-huge.sqf, for example) ​but you can also create and +maintain your own queue files. To create your own queue, just echo the package names into a plain text file, newline delimited, in the order you wish for them to be installed.
-maintain your own queue files. To create your own queue, just echo the package +
-names into a plain text file, newline delimited, in the order you wish for them +
-to be installed.+
  
-Note+<WRAP alert> 
 +In the event of two packages sharing the same name, use both the category and package name. Usually, just the package name will do, as the SlackBuild maintainers try to keep all names unique. 
 +</​WRAP>​
  
-In the event of two packages sharing the same name, use both the category and +Here is an example of a simple queue file for the imaginary package ''​foo''​:
-package name, but usually just the package name will do. +
- +
-Here is an example of a simple queue file for foo:+
  
 +<​code>​
 baz baz
 bar bar
 foo foo
 +</​code>​
  
-Save these three lines as foo.list (or any filename) and then have sport +Save these three lines as ''​foo.list'' ​(or any filename; ''​sport''​ does not require any specific extension as long as the file is plain text) and then have ''​sport'' ​process it using standard BASH re-direction:​
-process it using standard BASH re-direction:​+
  
 +<​code>​
 # sport $( < foo.list) # sport $( < foo.list)
 +</​code>​
  
-For full details on using sport, view the man and info pages bundled with it.+''​Sport''​ is not a complex application,​ but it is quite flexible; for even more details on using ''​sport''​, view the man and info pages bundled with it. 
  
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​float:​right;​}dep|]][[{arrowp.png|border:​0;​background:​none;​width:​0;​float:​right;​}pkg|]]+<WRAP centeralign>​ 
 +<wrap fa>[[pkg|R]]</​wrap>​ <wrap fa>[[start|S]]</​wrap>​ <wrap fa>[[dep|Q]]</​wrap>​ 
 +</​WRAP>​