Added xf86-input-vmmouse-12.5.1 template.
[pkgfs.git] / README
blob4e4f7ab04e6ef5cd84507071b2a9bfac0d8d32e6
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 Please note that it's assumed that PKGFS_TEMPLATESDIR is properly defined
27 and actually contains valid template files.
29 While installing your first package, if pkgfs couldn't find the Xstow program
30 specified at the configuration file with PKGFS_XSTOW_CMD, the Xstow package
31 will be installed and "stowned".
33 If the package is properly installed, it will be "stowned" automatically.
34 ``stowned´´ means that this package is available in the master directory,
35 on which ``Xstow´´ has created links from DESTDIR/<pkgname>.
37 To remove a currently installed (and stowned) package, you can use:
39         $ pkgfs.sh remove glib
41 Please note that when you remove it, the package will also be removed
42 from PKGFS_DESTDIR and previously "unstowned".
44 pkgfs uses some db(1) btree files, to record what packages are currently
45 "stowned". Once you install successfully or stown a package, the package
46 will be registered in PKGFS_DESTDIR/.pkgfs-registered-pkg.db.
48 While "unstowning" a package, it won't be available anymore in the master
49 directory and therefore it probably won't work if used from
50 PKGFS_DESTDIR/<pkgname>.
52 Summary, to stow an already installed package (into PKGFS_DESTDIR/<pkgname>):
54         $ pkgfs.sh stow glib
56 and to unstow an already installed (stowned) package:
58         $ pkgfs.sh unstow glib
60 You can also print some stuff about any template, e.g:
62         $ pkgfs.sh info glib
64 To list installed (stowned) packages, use this:
66         $ pkgfs.sh list
68 To only extract the distfile, without configuring/building/installing:
70         $ pkgfs.sh -i install foo
72 To not remove the build directory after successful installation:
74         $ pkgfs.sh -C install blah
76 To only fetch the distfile:
78         $ pkgfs.sh -e install blah
80 To only install the package, _without_ stowning it into the master directory:
82         $ pkgfs.sh -i install blob
84 That's all for now folks. I hope you find it useful, as I do.
86 ------------------------------------------------------------------------------
87  PERFORMANCE
88 ------------------------------------------------------------------------------
90 pkgfs is really fast, trust me. That was one of my reasons to make my own
91 pkgsrc/ports alike system.
93 If you want benchmarks, here is one: building libX11 and all its dependencies
94 required (not included building xstow) with pkgfs:
96         251.20s real   121.36s user    53.94s system
98 versus pkgsrc (make install clean clean-depends and digest previously
99 installed):
101         450.41s real   167.58s user    97.31s system
103 That's more or less 40% faster! that's the price you pay for having those
104 wrappers in pkgsrc that aren't very useful on NetBSD :-)
106 ------------------------------------------------------------------------------
107  HOW TO MAKE TEMPLATES
108 ------------------------------------------------------------------------------
110 A template in pkgfs is just a small text file with a few variables that are
111 required to build the package. pkgfs should be easy to work on, and
112 making templates shouldn't be too hard... if you have made any pkgsrc, it
113 should be trivial.
115 The required variables are: pkgname, build_type, extract_sufx, url
116 and checksum. Also there are some optional, like make_cmd, wrksrc,
117 configure_args, configure_env, make_build_args, make_install_args, etc.
119 Please take a look at the example.tmpl file located in the templates/
120 directory.
122 Also to help you creating templates and dependencies, there's a script
123 that will ask you some required information and will create the template
124 file once the distfile is downloaded: mktmpl.sh.
126 Try it and let me know if you have any problem or suggestion.
128 ------------------------------------------------------------------------------
129         Juan Romero Pardines <xtraeme@gmail.com>