README: explain the 'listfiles' target.
[pkgfs.git] / README
bloba8460ecf69e4dc8cbd6acf2ea4fec4b8630e9d85
1 pkgfs - Build packages from s(cratch|ource)
3 It is a simple package system manager that uses Xstow to allow packages
4 to be available at a master directory.
6 Multiple versions of a package can be installed, because they can be enabled
7 or disabled at the master directory anytime, to e.g allow testing different
8 versions of the same package by "stowning" or "unstowning" them.
10 ------------------------------------------------------------------------------
11  HOW TO USE IT
12 ------------------------------------------------------------------------------
14 Once you download it, you should edit the configuration file located at the
15 pkgfs directory. By default it uses the pkgfs directory in your $HOME.
17 If PKGFS_CONFIG_FILE is not set or specified from the command line with the
18 -c flag, it will first try to use the default location at
19 /usr/local/etc/pkgfs.conf, and as last resort in current directory.
21 Once that you read the "pkgfs.conf" file and configured it, you can start
22 installing packages by using the command:
24         $ pkgfs.sh install glib
26 While installing your first package, if pkgfs couldn't find the Xstow program
27 specified at the configuration file with PKGFS_XSTOW_CMD, the Xstow package
28 will be installed and "stowned".
30 If the package is properly installed, it will be "stowned" automatically.
31 ``stowned´´ means that this package is available in the master directory,
32 on which ``Xstow´´ has created links from DESTDIR/<pkgname>.
34 To remove a currently installed (and stowned) package, you can use:
36         $ pkgfs.sh remove glib
38 Please note that when you remove it, the package will also be removed
39 from PKGFS_DESTDIR and previously "unstowned".
41 pkgfs uses some db(1) btree files, to record what packages are currently
42 "stowned". Once you install successfully or stown a package, the package
43 will be registered in PKGFS_DESTDIR/.pkgfs-registered-pkg.db.
45 While "unstowning" a package, it won't be available anymore in the master
46 directory and therefore it probably won't work if used from
47 PKGFS_DESTDIR/<pkgname>.
49 Summary, to stow an already installed package (into PKGFS_DESTDIR/<pkgname>):
51         $ pkgfs.sh stow glib
53 and to unstow an already installed (stowned) package:
55         $ pkgfs.sh unstow glib
57 You can also print some stuff about any template, e.g:
59         $ pkgfs.sh info glib
61 To list installed (stowned) packages, use this:
63         $ pkgfs.sh list
65 To only extract the distfiles, without configuring/building/installing:
67         $ pkgfs.sh extract foo
69 To not remove the build directory after successful installation:
71         $ pkgfs.sh -C install blah
73 To only fetch the distfile:
75         $ pkgfs.sh fetch blah
77 To only install the package, _without_ stowning it into the master directory:
79         $ pkgfs.sh install-destdir blob
81 To list files installed by a package, note that package must be installed
82 into destination directory first and you must specify package name plus
83 version, i.e: vim-7.2:
85         $ pkgfs.sh listfiles blob-2.4
87 That's all for now folks. I hope you find it useful, as I do.
89 ------------------------------------------------------------------------------
90  PERFORMANCE
91 ------------------------------------------------------------------------------
93 pkgfs is really fast, trust me. That was one of my reasons to make my own
94 pkgsrc/ports alike system.
96 If you want benchmarks, here is one: building libX11 and all its dependencies
97 required (not included building xstow) with pkgfs:
99         251.20s real   121.36s user    53.94s system
101 versus pkgsrc (make install clean clean-depends and digest previously
102 installed):
104         450.41s real   167.58s user    97.31s system
106 That's more or less 40% faster! that's the price you pay for having those
107 wrappers in pkgsrc that aren't very useful on NetBSD :-)
109 ------------------------------------------------------------------------------
110  HOW TO MAKE TEMPLATES
111 ------------------------------------------------------------------------------
113 A template in pkgfs is just a small text file with a few variables that are
114 required to build the package. pkgfs should be easy to work on, and
115 making templates shouldn't be too hard... if you have made any pkgsrc, it
116 should be trivial.
118 The required variables are: pkgname, build_type, extract_sufx, url
119 and checksum. Also there are some optional, like make_cmd, wrksrc,
120 configure_args, configure_env, make_build_args, make_install_args, etc.
122 Please take a look at the example.tmpl file located in the templates/
123 directory.
125 Also to help you creating templates and dependencies, there's a script
126 that will ask you some required information and will create the template
127 file once the distfile is downloaded: mktmpl.sh.
129 Try it and let me know if you have any problem or suggestion.
131 ------------------------------------------------------------------------------
132         Juan Romero Pardines <xtraeme@gmail.com>