Re: [dev] [mkpkg] a suckless package manager

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Sat, 14 Aug 2010 12:17:07 +0100

(Sorry if this appears to be a separate thread. I can't actually
recieve email right now.)

> Which means that you have to specify the full compilation rules for every pkg

If by "full compilation rules" you mean "cd $dir && make install". I'm
sure maintainers will cope. The slpm equivalent package:

> URL=http://hg.suckless.org/dwm
> TYPE=hg
> DESC="dynamic window manager"

The only thing different is that instead of using two lines to specify
the url and type, mkpkg just says "hg clone ...". A bit simpler, I
think. And makefiles are a standard, whereas slpm packages are not.

> this is also an issue if you plan to use other tools like wget/ftp/..

I'm not sure how this is an issue. Each package states what command to
use to get the source. If you want to specify a specific method, add a
new target (this can be in the same file as "dwm", or a separate one,
it doesn't matter):

> http.dwm: http.dmenu
> test -d dwm || wget -O- http://hg.suckless.org/dwm/archive/tip.tar.gz | tar -xz
> cd dwm && make install

> And imho keeping track of files and having support to remove packages are some basic features of a package manager :)

Like I said, you can add support to uninstall a package:

> rm.dwm:
> cd dwm && make uninstall
> rm -fr dwm

Now "mkpkg rm.dwm" uninstalls the package.

> Now its about 500LOC and supports checksumming of files, dependencies, many more packages, creation of chroot environments by detecting missing libs and supports binary and src packages.

Mine is 8, supports checksumming with hg(1), wget(1), etc, and
creation of chroot environments with chroot(8). It supports binary and
source packages, since you can define any target and any commands
whatsoever (again, same file or not):

> bin.dwm
> wget <url of binary>

Why does slpm have to be such an "all-in-one" solution? We already
have a system for detecting dependencies, tools to fetch any given
url, and a tool to build and install a given program. We don't need to
reinvent wheels. The great thing about Unix is we can just glue these
parts together.

cls
Received on Sat Aug 14 2010 - 13:17:07 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 14 2010 - 13:24:02 CEST