# Gives an example of most of the commands to better explain the working.

$ asbt
Usage: asbt <option> [package]
Options-
	[search,-s]	[query,-q]	[find,-f]
	[info,-i]	[readme,-r]	[desc,-d]
	[view,-v]	[goto,-g]	[list,-l]
	[track,-t]	[longlist,-L]	[enlist,-e]
	[get,-G]	[build,-B]	[install,-I]
	[upgrade,-U]	[remove,-R]	[process,-P]
	[--update,-u]	[--check,-c]	[--all,-a]	
	[--help,-h]	[--setup,-S]	[--changelog,-C]
	[--version,-V]

Using repository: /home/aaditya/slackbuilds
For more info, see the man page and/or the README.


1) Search in repository

$ asbt -s dosbox
system/dosbox

$ asbt -s kabutar
(No output if no package found)


2-a) Query installed package

$ asbt -q dosbox
dosbox-0.74-x86_64-2_SBo

2-b) Query all SBo packages

$ asbt -q --sbo
pangomm-2.34.0-x86_64-1_SBo
libgtop-2.28.5-x86_64-1_SBo
volumeicon-0.5.0-x86_64-1_SBo
cairomm-1.10.0-x86_64-1_SBo
...
...
galculator-2.1.2-x86_64-1_SBo
driconf-0.9.1-x86_64-1_SBo
screenfetch-3.2.2-noarch-1_SBo

Total: 89

2-c) Query all installed packages

$ asbt -q --all
ConsoleKit-0.4.5-x86_64-1
GConf-3.2.6-x86_64-1
M2Crypto-0.21.1-x86_64-2
MPlayer-1.1_20130819-x86_64-2
...
...
zlib-1.2.8-x86_64-1
zoo-2.10_22-x86_64-1
zsh-5.0.2-x86_64-1

Total: 1042


3) Find (search + query)

$ asbt -f dosbox
Present in slackbuilds repository:
system/dosbox(0.74)

Installed:
dosbox-0.74-x86_64-2_SBo


4) View .info file

$ asbt -i dosbox
PRGNAM="dosbox"
VERSION="0.74"
HOMEPAGE="http://dosbox.sourceforge.net"
DOWNLOAD="http://downloads.sourceforge.net/dosbox/dosbox-0.74.tar.gz"
MD5SUM="b9b240fa87104421962d14eee71351e8"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Michiel van Wessem"
EMAIL="michiel@slackbuilds.org"


5) View the Readme

$ asbt -r dosbox
DOSbox is a DOS emulator/virtual machine for X11 and Unix.
It allows you to play many of the old games you grew up loving,
as well as many apps designed to run on DOS.

SDL_sound is an optional dependency.


6) View the slack-desc file

$ asbt -d dosbox
 DOSbox (DOS emulator/virtual machine for X11 and Unix)

 It allows you to play many of the old games you grew up loving, as
 well as many apps designed to run on DOS.


7) View and edit the slackbuild

$ asbt -v dosbox
(The slackbuild is viewed in your preferred editor specified in the config file)


8) Goto package directory

$ asbt -g dosbox
(A new terminal is opened in the directory of the specified package)


9) List the files in the slackbuild package folder

$ asbt -l dosbox
README	   dosbox-0.74-gcc46.patch  dosbox.desktop  slack-desc
doinst.sh  dosbox.SlackBuild	    dosbox.info


10) Detailed list (Longlist)

$ asbt -L dosbox
total 28
-rw-r--r-- 1 root root  206 Apr 23 17:34 README
-rw-r--r-- 1 root root  114 Apr 23 17:34 doinst.sh
-rw-r--r-- 1 root root  274 Apr 23 17:34 dosbox-0.74-gcc46.patch
-rw-r--r-- 1 root root 3439 Apr 23 17:34 dosbox.SlackBuild
-rw-r--r-- 1 root root  197 Apr 23 17:34 dosbox.desktop
-rw-r--r-- 1 root root  296 Apr 23 17:34 dosbox.info
-rw-r--r-- 1 root root  739 Apr 23 17:34 slack-desc


11) Track the source and built packages

$ asbt -t dosbox
Source:
/home/aaditya/src/dosbox-0.74.tar.gz

Built:
/home/aaditya/packages/dosbox-0.74-x86_64-2_SBo.tgz


12) Enlist the packages which have the package name in their info file
    (This option can take some time to complete)

$ asbt -e imlib2
/home/aaditya/git/slackbuilds/network/w3m/w3m.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/audio/Pd-extended/Pd-extended.info:REQUIRES="dssi imlib2 lame libquicktime speex lua"
/home/aaditya/git/slackbuilds/graphics/feh/feh.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/graphics/sxiv/sxiv.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/graphics/qiv/qiv.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/graphics/xfishtank/xfishtank.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/graphics/maim/maim.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/graphics/freewrl/freewrl.info:REQUIRES="imlib2 OpenAL freealut"
/home/aaditya/git/slackbuilds/desktop/buttonmaker/buttonmaker.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/mh5000/mh5000.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/wmalauncher/wmalauncher.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/PyPanel/PyPanel.info:REQUIRES="imlib2 python-xlib"
/home/aaditya/git/slackbuilds/desktop/mhsetroot/mhsetroot.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/wmimagedock/wmimagedock.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/wmslideshow/wmslideshow.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/e16/e16.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/xlunch/xlunch.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/tint2/tint2.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/wbar/wbar.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/XDecorations/XDecorations.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/hsetroot/hsetroot.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/desktop/idesk/idesk.info:REQUIRES="imlib2"
/home/aaditya/git/slackbuilds/system/Eterm/Eterm.info:REQUIRES="imlib2 libast"
/home/aaditya/git/slackbuilds/system/conky/conky.info:REQUIRES="tolua++ imlib2"
/home/aaditya/git/slackbuilds/libraries/giblib/giblib.info:REQUIRES="imlib2"


12-b) Enlist reverse dependencies for a package, ie
      List all installed SBo packages which depend on given package
      (This option can take some time to complete)

$ asbt -e --rev imlib2
(Can be empty if no package found)

12-c) Enlist package details from the Changelog
$ asbt -e --log screenfetch
desktop/screenfetch: Update changelog.
desktop/screenfetch: Add source alternative.
desktop/screenfetch: Updated for version 3.6.5.
desktop/screenfetch: Updated for version 3.5.0.
desktop/screenfetch: Update slack-desc.
desktop/screenfetch: Change source URL.
desktop/screenfetch: Updated for version 3.2.2.


13) Get (download) the source

$ asbt -G dosbox
asbt: /home/aaditya/slackbuilds/system/dosbox/dosbox.info sourced.
Downloading dosbox-0.74.tar.gz
--2014-05-15 18:40:19--  http://downloads.sourceforge.net/dosbox/dosbox-0.74.tar.gz
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz [following]
--2014-05-15 18:40:20--  http://downloads.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz
Reusing existing connection to downloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://kaz.dl.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz [following]
--2014-05-15 18:40:20--  http://kaz.dl.sourceforge.net/project/dosbox/dosbox/0.74/dosbox-0.74.tar.gz
Resolving kaz.dl.sourceforge.net (kaz.dl.sourceforge.net)... 88.204.157.163
Connecting to kaz.dl.sourceforge.net (kaz.dl.sourceforge.net)|88.204.157.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1265711 (1.2M) [application/x-gzip]
Saving to: ‘/home/aaditya/src/dosbox-0.74.tar.gz’

100%[=============================================================================================>] 1,265,711   30.4KB/s   in 41s    

2014-05-15 18:41:03 (30.1 KB/s) - ‘/home/aaditya/src/dosbox-0.74.tar.gz’ saved [1265711/1265711]


$ asbt -G dosbox
asbt: /home/aaditya/slackbuilds/system/dosbox/dosbox.info sourced.
asbt: md5sum matched.
Source: dosbox-0.74.tar.gz present.
Re-download? [y/N]: 


14) Build a package

$ asbt -B dosbox
Building dosbox
Password:
dosbox-0.74/
dosbox-0.74/acinclude.m4
dosbox-0.74/config.sub
dosbox-0.74/AUTHORS
dosbox-0.74/configure
dosbox-0.74/missing
dosbox-0.74/ChangeLog
dosbox-0.74/visualc_net/
dosbox-0.74/visualc_net/dosbox.sln
dosbox-0.74/visualc_net/dosbox.vcproj
dosbox-0.74/visualc_net/Makefile.am
dosbox-0.74/visualc_net/Makefile.in
dosbox-0.74/README
...
...
...
usr/share/
usr/share/pixmaps/
usr/share/pixmaps/dosbox.ico
usr/share/applications/
usr/share/applications/dosbox.desktop
usr/man/
usr/man/man1/
usr/man/man1/dosbox.1.gz
usr/bin/
usr/bin/dosbox

Slackware package /home/aaditya/packages/dosbox-0.74-x86_64-2_SBo.tgz created.


$ asbt -B dosbox
Package: dosbox(0.74) already built.
Re-building dosbox4
Password:


14-a) Passing options while building:

$ asbt -B volumeicon NOTIFY=yes
Building volumeicon
[sudo] password for aaditya: 

14-b) Specifying path instead of package name:

$ asbt -B ~/builds/thermal_daemon/thermal_daemon-1.1
Building thermal_daemon
[sudo] password for aaditya: 


15) Install the built package 

$ asbt -I screenfetch
Installing screenfetch
Password:
Verifying package screenfetch-3.2.2-noarch-1_SBo.tgz.
Installing package screenfetch-3.2.2-noarch-1_SBo.tgz:
PACKAGE DESCRIPTION:
# The Bash Screenshot Information Tool
# #
# # Screenfetch is a Bash Screenshot Information Tool. This handy
# # Bash script can be used to generate one of those nifty terminal
# # theme information + ASCII distribution logos you see in everyone's
# # screenshots nowadays. It will auto-detect your distribution and
# # display an ASCII version of that distribution's logo and some
# # valuable information to the right.
# #
# # Homepage: http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/
# #
# Package screenfetch-3.2.2-noarch-1_SBo.tgz installed.
#
#


16) Upgrade installed package

$ asbt -U screenfetch
Upgrading screenfetch
Password:

+==============================================================================
| Skipping package screenfetch-3.2.2-noarch-1_SBo (already installed)
+==============================================================================


17) Remove installed package 

$ asbt -R screenfetch
Removing screenfetch
Password:

Removing package /var/log/packages/screenfetch-3.2.2-noarch-1_SBo...
Removing files:
  --> Deleting /usr/bin/screenfetch
  --> Deleting /usr/doc/screenfetch-3.2.2/CHANGELOG
  --> Deleting /usr/doc/screenfetch-3.2.2/COPYING
  --> Deleting /usr/doc/screenfetch-3.2.2/README.mkdn
  --> Deleting /usr/doc/screenfetch-3.2.2/TODO
  --> Deleting empty directory /usr/doc/screenfetch-3.2.2/


18) Process = Get + Build + Install / Upgrade

$ asbt -P dosbox
Processing dosbox...
asbt: /home/aaditya/slackbuilds/system/dosbox/dosbox.info sourced.
asbt: md5sum matched.
Source: dosbox-0.74.tar.gz present.
Package: dosbox(0.74) already built.
Upgrading dosbox
Password:


19) Display details about installed package

$ asbt -D screenfetch
PACKAGE NAME:     screenfetch-3.2.2-noarch-1_SBo
COMPRESSED PACKAGE SIZE:     48K
UNCOMPRESSED PACKAGE SIZE:     190K
PACKAGE LOCATION: /home/aaditya/packages/screenfetch-3.2.2-noarch-1_SBo.tgz
PACKAGE DESCRIPTION:
screenfetch: The Bash Screenshot Information Tool
screenfetch:
screenfetch: Screenfetch is a Bash Screenshot Information Tool. This handy
screenfetch: Bash script can be used to generate one of those nifty terminal
screenfetch: theme information + ASCII distribution logos you see in everyone's
screenfetch: screenshots nowadays. It will auto-detect your distribution and
screenfetch: display an ASCII version of that distribution's logo and some
screenfetch: valuable information to the right.
screenfetch:
screenfetch: Homepage: http://git.silverirc.com/cgit.cgi/screenfetch-dev.git/
screenfetch:
FILE LIST:
./
install/
install/slack-desc
usr/
usr/doc/
usr/doc/screenfetch-3.2.2/
usr/doc/screenfetch-3.2.2/TODO
usr/doc/screenfetch-3.2.2/README.mkdn
usr/doc/screenfetch-3.2.2/COPYING
usr/doc/screenfetch-3.2.2/CHANGELOG
usr/bin/
usr/bin/screenfetch
/var/log/packages/screenfetch-3.2.2-noarch-1_SBo lines 1-29/29 (END)


20) Tidy the source or package directories by removing old items (retains latest 3)

$ asbt -T --dry-run pkg
(No ouput means nothing will be removed)

$ asbt -T --dry-run src
/home/aaditya/src/asbt-0.8.6.tar.gz


21) Update the git repository

$ asbt -u
Performing git stash
No local changes to save
Updating git repo /home/aaditya/git/slackbuilds/.git
From git://slackbuilds.org/slackbuilds
 * branch            master     -> FETCH_HEAD
Already up-to-date.


22-a) Check updates to installed SBo packages

$ asbt -c
asbt:	0.9.8 -> 0.9.7


22-b) Check updates for all packages to packages from SBo

$ asbt -c all
asbt:	0.9.8 -> 0.9.7
ffmpeg:	2.2.1 -> 2.1.5
libva:	1.2.1 -> 0.31.1_1+sds4
openjdk:	7u65_b32 -> 7u60
transmission:	2.82 -> 2.84


23) Display version and date

$ asbt -V
asbt version-0.9.8 (dated: 23 August 2014)


24) Setup the tool or configure its settings

$ asbt -S
Slackbuild repository not present.
Press y to set it up, or n to exit [Y/n]: 
Default Slackbuilds directory: /home/aaditya/slackbuilds
Press y use it, or n to change [Y/n]: 
Slackbuild repository seems to be empty.
Clone the Slackbuild repository from www.slackbuilds.org? [Y/n]: 
Cloning into 'slackbuilds'...
remote: Counting objects: 200422, done.
.
.
.
Enter your password to view and edit the configuration file.
Password:

$ asbt -S
Enter your password to view and edit the configuration file.
Password:


25) View the SlackBuilds Changelog

$ asbt -C
Wed May 14 01:04:28 UTC 2014
audio/eawpats: Add missing package.
audio/qtractor: Updated for version 0.6.1.
desktop/catfish: Updated for version 1.0.2.
desktop/cellwriter: New maintainer.
desktop/homerun: Updated for version 1.2.4.
desktop/spectrwm: Updated for version 2.5.1.
desktop/xfce4-whiskermenu-plugin: Updated for version 1.3.2.
...
...
...


26) View the help

$ asbt -h
Usage: asbt <option> [package]
Options-
	[search,-s]	[query,-q]	[find,-f]
	[info,-i]	[readme,-r]	[desc,-d]
	[view,-v]	[goto,-g]	[list,-l]
	[track,-t]	[longlist,-L]	[enlist,-e]
	[get,-G]	[build,-B]	[install,-I]
	[upgrade,-U]	[remove,-R]	[process,-P]
	[details,-D]	[tidy,-T]	[--update,-u]
	[--check,-c]	[--help,-h]	[--changelog,-C]
	[--version,-V]	[--setup,-S]	
	
Using repository: /home/aaditya/slackbuilds
For more info, see the man page and/or the README.

