Previous: Complex packages, Up: Getting started [Contents]
GSRC provides build recipes for several hundred packages. So, how can
you find or discover a package relevant to your needs? Fortunately,
the build recipes are described by metadata, which can help you in
searching. For example, you can use standard GNU tools such as
grep
to search the text of the build recipes for key words.
A template script is installed, called gsrc, that provides a simple means for searching for packages via keywords, printing information about a package, and printing its location. Since gsrc is installed to the same location as executables installed by GSRC, if you have set up your environment to use GSRC packages (see Setting your environment), you can use the gsrc script to access GSRC from outside the GSRC directory.
For example, here we search for an editor, discover the program moe, read information about it, and then install it.
$ gsrc search editor gnu/denemo 1.0.0 A music notation editor gnu/ed 1.7 An implementation of the standard Unix editor gnu/emacs 24.3 The extensible, customizable text editor gnu/global 6.2.8 A source code tag system gnu/gnusound 0.7.5 A multitrack sound editor gnu/leg Libraries for game engines and game development gnu/less 451 A pager gnu/mc 4.6.1 A two-paned file manager gnu/mit-scheme 9.1.1 An implementation of the Scheme programming language gnu/moe 1.5 A simple-to-use text editor gnu/nano 2.3.2 A simple text editor gnu/sed 4.2.2 A text stream editor $ gsrc info moe Name: Moe Version: 1.5 URL: http://www.gnu.org/software/moe Description: GNU Moe is a powerful-but-simple-to-use text editor. It works in a modeless manner, and features an intuitive set of key-bindings that assign a degree of "severity" to each key; for example key combinations with the Alt key are for harmless commands like cursor movements while combinations with the Control key are for commands that will modify the text. Moe features multiple windows, unlimited undo/redo, unlimited line length, global search and replace, and more. Status: not installed $ make -C $(gsrc path moe) install
If you view the gsrc script’s code, you will find that it is very simple and, indeed, can be used as a template to be expanded to include the functionality that you desire.
More robust searching can be performed with the file
MANIFEST.rec. If you have acquired GSRC by downloading it as a
tar.gz archive, this file should be present in the package’s
root directory. If you have acquired GSRC by cloning its code
repository, you will have to generate this file. Simply navigate to
the package’s root directory and enter make manifest
; you will
want to run this every time you pull updates to the repository. The
resulting file is a recfile, which can be queried as a database
using GNU Recutils, which must be installed (see recsel in Recutils).
Previous: Complex packages, Up: Getting started [Contents]