[dev] [mkpkg] a suckless package manager

From: Connor Lane Smith <cls_AT_lubutu.com>
Date: Sat, 14 Aug 2010 01:53:41 +0100

Hey all,

There's already "slpm" by pancake, which consists of 247 lines of
shell script. But I figured I could do it in less. So I wrote mkpkg,
consisting of 8 lines of shell script, which can install a package or
clean the package cache. A package looks like this:

> dwm: dmenu
> hg clone http://hg.suckless.org/dwm
> cd dwm && make install

You may have guessed, it uses makefiles to track dependencies. You
could also define in the same package an uninstallation target, like
"rm.dwm", which would do the reverse. I think it's a pretty neat
solution:

> #!/bin/sh
> mkdir -p /var/cache/mkpkg && cd /var/cache/mkpkg && make -f - "$@" << .
> all:
> @ echo usage: mkpkg [package]
>
> clean:
> @ echo cleaning package cache
> @ rm -fr /var/cache/mkpkg
>
> include /usr/share/mkpkg/*
> .

I've also attached an arball, including mkpkg and 3 packages. It's
pretty dumb, but I thought it deserved a mention.

Thanks,
cls

Received on Sat Aug 14 2010 - 02:53:41 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 14 2010 - 03:00:04 CEST