~strahinja/mkpk

Packaging system using Plan9 mk

clone

read-only
https://git.sr.ht/~strahinja/mkpk
read/write
git@git.sr.ht:~strahinja/mkpk

You can also use your local clone with git send-email.

mkpk
====

Packaging system using Plan9 mk


Prerequisites
-------------

* PRoot[1]
* sbase tar[2] + -n patch[3]
* xz
* install, sed, sort, uniq, mv
* Plan9 mk, for example from [4]


Installation
------------

# mk install


mkpk helper usage (for admins/users)
------------------------------------

# mkpk update			# Pulls the galeb-mkfiles repository
# mkpk fetch foo		# fetches the sources of foo to SRCBASEDIR
# mkpk build foo 		# builds the foo tarball and puts it into PKGDIR
# mkpk install foo 		# installs the built tarball
# mkpk list foo 		# lists files in the installed tarball
# mkpk info foo			# show information about the installed tarball
# mkpk uninstall foo 		# uninstalls the package using the installed
				# tarball as a filelist

With table[5]:

$ tsvtable /pkg/pkgdb.tsv	# Displays a nicely formatted table of all
				# installed tarballs and their versions


Usage in your projects (for hackers)
------------------------------------

$ cd /path/to/project
$ cat <<! >mkfile
mkpklib=/lib/mkpk
<$mkpklib/defaults.mk

# ...

<$mkpklib/standard.mk		# or add your own rules

# ...

<$mkpklib/package.mk

# ...
!
$ mk package			# creates mypackage-1.2.3.{tar.xz,sha512}
$ doas mk package-install	# installs the above to PKGDIR


[1]: https://proot-me.github.io/
[2]: https://tools.suckless.org/sbase/
[3]: https://git.sr.ht/~strahinja/sbase/tree/master/item/patches/0001-Add-n-equivalent-of-no-recursion.patch
[4]: https://tools.suckless.org/9base/
[5]: https://git.sr.ht/~strahinja/table/