~strahinja/mkpk

Packaging system using Plan9 mk
lib/install.mk: Add quotes
lib/uninstall.mk: Ignore failed removal of files
lib/info.mk: Add quotes

refs

master
browse  log 
v0.1.17
release notes 

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] + (-T + -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 MKFILESREPO 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			# shows information about the installed tarball
# mkpk uninstall foo 		# uninstalls the package using the installed
				# tarball as a filelist
# mkpk upgrade foo		# upgrades the existing package, by running
				# fetch -> build -> uninstall -> install

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://core.suckless.org/sbase/
[3]: https://git.sr.ht/~strahinja/sbase/tree/master/item/patches/0001-Add-both-T-filelist-and-n-equivalent-of-no-recursion.patch
[4]: https://tools.suckless.org/9base/
[5]: https://git.sr.ht/~strahinja/table/