Make a local grimoire directory.
Copy a spell to edit
In this example the old spell for dialog
becomes the new spell for cdk.
Edit the new spell.
Change this:
stable 1.1-20080316 1.1-20071028 1.1-20070930 1.1-20070704 1.1-20070604 require ncurses category utility attribute console solo source ftp://invisible-island.net/dialog/dialog-$VERSION.tgz homepage http://invisible-island.net/dialog/ opts --bindir=/bin estimate 200 desc 'dialog allows shell scripts to provide fancy text dialog with users.'
Into this:
stable 5.0-20060507 require ncurses category development attribute console library source ftp://invisible-island.net/cdk/cdk-$VERSION.tgz homepage http://invisible-island.net/cdk/ estimate 1200 desc 'cdk is a library of curses widgets similar to dialog.' build(){ default_build && make cdkshlib && make installCDKSHLibrary }
Save the modified spell.
Then, merge grimoires.
Finally, cast it.
For many sources, sorcery can detect and apply
the proper method to compile and install.
Consequently, the dialog spell does not require a build function.
However, the cdk spell requires additional steps beyond what is typical.
Therefore, the cdk spell does have a build() function.
Common build methods are stored in /usr/libexec/sorcery/cast.d/
Changes made to files in /usr/libexec/sorcery/cast.d/ are lost when sorcery updates.
Therefore place custom build functions directly into spells.
Alternatively, new build methods can be installed in
/usr/local/libexec/sorcery/cast.d/
Version Information
stable 1.3.9 1.3.8 1.3.7 1.3.6 1.3.5 unstable 1.4svn-r7893 1.4svn-r7844 1.4svn-r7796 secure 1.3.7
Available versions are specified using stable, unstable and secure.
Releases that fix security issues receive secure.
Trial and developmental releases are listed using unstable.
Newer versions are listed to the left of older versions.
At least one stable version must be specified in each spell.
Requirements:
require acl libcap libpng openslp popt tiff
optional Linux-PAM --enable-pam --disable-pam for pluggable authentication support optional dbus --enable-dbus --disable-dbus for dbus support optional heimdal '' '' for kerberos 5 support optional openldap --enable-ldap --disable-ldap for ldap support
switch --enable-visualize '' to enable visualization
Category and Attribute
Spells can be locatd by any combination of
name, description, category and attirbute
Listings can be generated by augur using commands like:
The name of the source file is specified with source.
It should probably also contain the full URL,
where the file can be acquired.
When more than one URL can be used to acquire a file
list the source filename once and last and
list the separate URLs ending with / separated by spaces
source ftp://ftp.cwru.edu/pub/bash/ ftp://ftp.gnu.org/pub/gnu/bash/ bash-${VERSION:0:3}.tar.gz
Contents of a spell not described above are optional
However, a description is recommended.
The estimate value can be provided by augur check
after a source has been compiled and installed.
The best method for creating complex spells
is to find a similar spell then copy and edit.
With over 3000 examples in /root/sorcery/grimoire/
there is sure to be a nearly perfect spell to use as a template.
I copy and edit everytime I write a spell.