Your idea is simpler and closer to gnu package system or pkgsrc. But without 
reusing code. Which means that you have to specify the full compilation rules 
for every pkg, this is also an issue if you plan to use other tools like 
wget/ftp/.. And imho keeping track of files and having support to remove 
packages are some basic features of a package manager :)

In fact this week I have been working in slpm a lot. More to add features than 
to keep code clean. So it's full of XXX and TODO atm :) but the result is 
pretty good.

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.

I also added 2 scripts:

genpkg: converts a installed pkg of debian/arch/gentoo into a slpm one.

genimg: generates an ext2 file with a bootable rootfs with the contents of the 
slpm packages installed in _prefix.

I've used this to do some games with kernel and userland via qemu. And resulted 
to be the simplest way for me to setup such environment.

Next weeks I'll probably be cleaning up the code in slpm and fixing some bugs. 
I plan to use slpm to create "extensions" of the OS inside a directory or a 
chroot. I find it useful for testing apps from hg/git/.. Without trashing 
system and keeping track of files.

I use it in the n900 and my archlinux laptop. Next platforms for testing are 
iOS and android.

----- Original message -----
> 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

<Attachment>   mkpkg.a

Reply via email to