mkpk.8 (4013B)
1 .Dd April 22, 2023 2 .Dt MKPK 8 SMM 3 .Os Galeb 2.2 4 .Sh NAME 5 .Nm mkpk 6 .Nd packaging system using Plan9 mk 7 .Sh SYNOPSIS 8 .Nm 9 .Op Ar operation 10 .Op Ar package 11 .Sh DESCRIPTION 12 .Nm 13 is a helper tool passing specific mkfiles to 14 .Xr mk 1 15 to manage packages. 16 .Ar operation 17 can be one of the following: 18 . 19 .Bl -tag -width ".Nm install" -offset indent 20 .It Nm Cm build Ar package 21 Builds the most recent version of a 22 .Ar package 23 tarball and puts it into 24 .Ev PKGDIR . 25 . 26 .It Nm Cm fetch Ar package 27 Downloads the necessary sources to build 28 .Ar package 29 to the directory 30 .Ev SRCBASEDIR . 31 . 32 .It Nm Cm info Ar package 33 Shows information about the installed tarball of a 34 .Ar package . 35 . 36 .It Nm Cm install Ar package 37 Installs the files from a built tarball of a 38 .Ar package 39 having the most recent version. 40 . 41 .It Nm Cm list Ar package 42 Lists files from the installed tarball of a 43 .Ar package . 44 . 45 .It Nm Cm uninstall Ar package 46 Uninstalls the installed 47 .Ar package 48 by unlinking files from the filelist of its tarball. 49 . 50 .It Nm Cm update 51 Updates the mkfiles repository. 52 . 53 .It Nm Cm upgrade Ar package 54 Upgrades the existing 55 .Ar package , 56 as if the following was executed, in order: 57 .Bd -literal 58 $ mkpk fetch package 59 $ mkpk build package 60 $ mkpk uninstall package 61 $ mkpk install package 62 .Ed 63 .El 64 .Sh ENVIRONMENT 65 You can see the full list of relevant environment variables used by 66 .Nm 67 in the file 68 .Pa /lib/mkpk/defaults.mk 69 (default location). 70 .Bl -tag -width ".Ev SRCMKFILES" 71 .It Ev mkpklib 72 Directory holding the library mkfiles. 73 By default, 74 .Pa /lib/mkpk . 75 . 76 .It Ev BINDDIRS 77 Passed to PRoot as an argument. 78 Defaults to 79 .Fl "b /etc" , 80 which bind-mounts 81 .Pa /etc 82 when creating a package. 83 . 84 .It Ev MKFILESREPO 85 URL of the repository with the mkfiles with information on how to build 86 individual packages. 87 Defaults to galeb-mkfiles repository. 88 . 89 .It Ev NOBINDDIRS 90 If set to 1, no directories will be bind-mounted by PRoot when creating a 91 package. 92 . 93 .It Ev PKG 94 Full name of a package, including the full version. 95 For example, 96 .Dq gcc-12.1.0-2 97 or 98 .Dq vim-9.0.135 . 99 . 100 .It Ev PKGBASE 101 Base name of a package. 102 For example, 103 .Dq gcc 104 or 105 .Dq vim . 106 . 107 .It Ev PKGDB 108 Package database; TSV file holding the names, versions and installation 109 timestamps of all installed packages. 110 By default, 111 .Pa /pkg/pkgdb.tsv . 112 . 113 .It Ev SKIPCLEAN 114 If set to 1, 115 .Pa pkgroot 116 won't be deleted after creating a package. 117 . 118 .It Ev SRCBASEDIR 119 Base directory for source code. 120 Defaults to 121 .Pa /src . 122 . 123 .It Ev SRCDIRS 124 Space-separated list of directories which are created by extracting archives. 125 . 126 .It Ev SRCCRDIRS 127 Space-separated list of directories to be 128 .Sm off 129 .Sy cr No eated , 130 .Sm on 131 to which the archives are to be extracted. 132 Useful when a source archive doesn't have a root directory like it should. 133 . 134 .It Ev SRCEXDIRS 135 Space-separated list of directories to which the archive will be 136 .Sm off 137 .Sy ex No tracted . 138 .Sm on 139 An alternative to 140 .Ev SRCCRDIRS , 141 when the directories already exist. 142 . 143 .It Ev SRCTODIRS 144 Space-separated list of directories 145 .Sy to 146 which the directories from 147 .Ev SRCDIRS 148 will be renamed after extracting source archives. 149 . 150 .It Ev SRCTOTARBALLS 151 Space-separated list of tarball names to which the tarballs will be saved. 152 Useful eg. for Github tarballs which have only version in their name. 153 . 154 .It Ev SRCMKFILES 155 Directory containing mkfiles. 156 By default, 157 .Pa /src/mkfiles . 158 .El 159 .Sh FILES 160 .Bl -tag -width ".Pa /pkg/pkgdb.tsv" 161 .It Pa /pkg/*.tar.xz 162 Tarballs containing built binaries, ready to be extracted to 163 .Pa / . 164 . 165 .It Pa /pkg/pkgdb.tsv 166 Package database; TSV file holding the names, versions and installation 167 timestamps of all installed packages. 168 . 169 .It Pa /lib/mkpk/*.mk 170 Mkfiles to be included into individual package's mkfiles or called by the 171 .Nm 172 helper. 173 . 174 .It Pa /src/[package]-[version] 175 Main source directory for a 176 .Ar package . 177 . 178 .It Pa /src/mkfiles/[package] 179 Mkfiles with instructions on how to build each individual package. 180 Copied to 181 .Pa /src/[package]-[version] . 182 .El 183 .Sh "SEE ALSO" 184 .Xr mk 1 185 .Sh AUTHORS 186 .An "Strahinya Radich" Aq contact@strahinja.org , 187 2022-2023.