meta_schema.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. {
  2. "$schema": "http://json-schema.org/draft/2020-12/schema",
  3. "title": "Package Meta",
  4. "description": "meta information of a package",
  5. "type": "object",
  6. "properties": {
  7. "id": {
  8. "description": "unix name of the package",
  9. "type": "string",
  10. "minLength": 3,
  11. "maxLength": 63,
  12. "pattern": "^[a-zA-Z_][a-zA-Z0-9_\\-\\.]+"
  13. },
  14. "description": {
  15. "description": "translated names and descriptions of the package",
  16. "type": "array",
  17. "minItems": 1,
  18. "uniqueItems": true,
  19. "items": {
  20. "type": "object",
  21. "properties": {
  22. "0": {
  23. "description": "language code of the record",
  24. "type": "string",
  25. "minLength": 2,
  26. "maxLength": 5,
  27. "pattern": "^[a-z][a-z][_]?[A-Z]?[A-Z]?$"
  28. },
  29. "1": {
  30. "description": "translated name of your package",
  31. "type": "string",
  32. "minLength": 1,
  33. "maxLength": 63
  34. },
  35. "2": {
  36. "description": "translated description of your package",
  37. "type": "string",
  38. "minLength": 1,
  39. "maxLength": 511
  40. }
  41. }
  42. }
  43. },
  44. "version": {
  45. "description": "canonical version",
  46. "type": "string",
  47. "minLength": 5,
  48. "maxLength": 15,
  49. "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
  50. },
  51. "release": {
  52. "description": "free form textual version",
  53. "type": "string",
  54. "minLength": 0,
  55. "maxLength": 31
  56. },
  57. "url": {
  58. "description": "download URL mask with $VERSION, $RELEASE and $ARCH",
  59. "type": "string",
  60. "minLength": 12,
  61. "maxLength": 255,
  62. "pattern": "^https://.*",
  63. "contentMediaType": "application/zip"
  64. },
  65. "category": {
  66. "description": "unix category name where the package belongs",
  67. "type": "string",
  68. "minLength": 1,
  69. "maxLength": 255,
  70. "pattern": "[a-zA-Z0-9_]"
  71. },
  72. "depends": {
  73. "description": "mandatory dependencies of the package",
  74. "type": "array",
  75. "uniqueItems": true,
  76. "items": {
  77. "type": "string",
  78. "minLength": 3,
  79. "maxLength": 79,
  80. "pattern": "^[a-zA-Z0-9_\\-\\.]+[\\ ]?[0-9]*[\\.]?[0-9]*[\\.]?[0-9]*$"
  81. }
  82. },
  83. "suggests": {
  84. "description": "optional dependencies of the package",
  85. "type": "array",
  86. "uniqueItems": true,
  87. "items": {
  88. "type": "string",
  89. "minLength": 3,
  90. "maxLength": 79,
  91. "pattern": "^[a-zA-Z0-9_\\-\\.]+[\\ ]?[0-9]*[\\.]?[0-9]*[\\.]?[0-9]*$"
  92. }
  93. },
  94. "conflicts": {
  95. "description": "packages that this package conflicts with",
  96. "type": "array",
  97. "uniqueItems": true,
  98. "items": {
  99. "type": "string",
  100. "minLength": 3,
  101. "maxLength": 79,
  102. "pattern": "^[a-zA-Z0-9_\\-\\.]+[\\ ]?[0-9]*[\\.]?[0-9]*[\\.]?[0-9]*$"
  103. }
  104. },
  105. "license": {
  106. "description": "package's license",
  107. "type": "string",
  108. "minLength": 2,
  109. "maxLength": 15,
  110. "pattern": "^[A-Z][A-Z0-9_\\-]+"
  111. },
  112. "eula": {
  113. "description": "URL of the End User License Agreement",
  114. "type": "string",
  115. "minLength": 0,
  116. "maxLength": 255,
  117. "pattern": "^https://.*",
  118. "contentMediaType": "text/plain"
  119. },
  120. "homepage": {
  121. "description": "URL to the package software's homepage",
  122. "type": "string",
  123. "minLength": 0,
  124. "maxLength": 255,
  125. "pattern": "^https://.*",
  126. "contentMediaType": "text/html"
  127. },
  128. "bugtracker": {
  129. "description": "URL to the package software's issue tracker",
  130. "type": "string",
  131. "minLength": 0,
  132. "maxLength": 255,
  133. "pattern": "^https://.*",
  134. "contentMediaType": "text/html"
  135. },
  136. "screenshots": {
  137. "description": "URLs to screenshot PNG files",
  138. "type": "array",
  139. "uniqueItems": true,
  140. "items": {
  141. "type": "string",
  142. "minLength": 0,
  143. "maxLength": 255,
  144. "pattern": "^https://.*\\.",
  145. "contentMediaType": "image/png"
  146. }
  147. },
  148. "override": {
  149. "description": "override category directories in payloads",
  150. "type": "object",
  151. "properties": {
  152. "bin": { "type": "string" },
  153. "inc": { "type": "string" },
  154. "lib": { "type": "string" },
  155. "etc": { "type": "string" },
  156. "src": { "type": "string" },
  157. "shr": { "type": "string" },
  158. "man": { "type": "string" },
  159. "var": { "type": "string" }
  160. }
  161. },
  162. "postinst": {
  163. "type": "object",
  164. "properties": {
  165. "env": {
  166. "description": "configuration form specification for environment variables",
  167. "type": "array",
  168. "maxItems": 15,
  169. "uniqueItems": true,
  170. "items": {
  171. "type": "object",
  172. "properties": {
  173. "name": {
  174. "description": "name of the variable",
  175. "type": "string",
  176. "minLength": 0,
  177. "maxLength": 15
  178. },
  179. "type": {
  180. "description": "type of the variable",
  181. "type": "string",
  182. "minLength": 0,
  183. "maxLength": 255
  184. },
  185. "desc": {
  186. "description": "translated names and descriptions of the variables",
  187. "type": "array",
  188. "minItems": 1,
  189. "uniqueItems": true,
  190. "items": {
  191. "type": "object",
  192. "properties": {
  193. "0": {
  194. "description": "language code of the record",
  195. "type": "string",
  196. "minLength": 2,
  197. "maxLength": 5,
  198. "pattern": "^[a-z][a-z][_]?[A-Z]?[A-Z]?$"
  199. },
  200. "1": {
  201. "description": "translated name of the label",
  202. "type": "string",
  203. "minLength": 1,
  204. "maxLength": 31
  205. },
  206. "2": {
  207. "description": "translated description of the label",
  208. "type": "string",
  209. "minLength": 1,
  210. "maxLength": 255
  211. }
  212. }
  213. }
  214. }
  215. }
  216. }
  217. },
  218. "commands": {
  219. "description": "commands to be executed after installation",
  220. "type": "array",
  221. "maxItems": 7,
  222. "items": {
  223. "type": "string",
  224. "minLength": 0,
  225. "maxLength": 255
  226. }
  227. }
  228. }
  229. },
  230. "payloads": {
  231. "description": "payload descriptions",
  232. "type": "array",
  233. "minItems": 1,
  234. "uniqueItems": true,
  235. "items": {
  236. "type": "object",
  237. "properties": {
  238. "0": {
  239. "description": "architecture or 'any'",
  240. "type": "string",
  241. "minLength": 1,
  242. "maxLength": 15
  243. },
  244. "1": {
  245. "description": "compressed payload size",
  246. "type": "number",
  247. "minimum": 0,
  248. "maximum": 9223372036854775807
  249. },
  250. "2": {
  251. "description": "uncompressed payload size",
  252. "type": "number",
  253. "minimum": 0,
  254. "maximum": 9223372036854775807
  255. },
  256. "3": {
  257. "description": "SHA checksum of the payload",
  258. "type": "string",
  259. "minLength": 64,
  260. "maxLength": 64,
  261. "pattern": "[0-9a-f]"
  262. }
  263. }
  264. }
  265. },
  266. "files": {
  267. "description": "list of files in payloads",
  268. "type": "array",
  269. "uniqueItems": true,
  270. "items": {
  271. "type": "object",
  272. "properties": {
  273. "0": {
  274. "description": "uncompressed file size",
  275. "type": "number",
  276. "minimum": 0,
  277. "maximum": 9223372036854775807
  278. },
  279. "1": {
  280. "description": "file name",
  281. "type": "string",
  282. "minLength": 1,
  283. "maxLength": 4084
  284. }
  285. }
  286. }
  287. }
  288. },
  289. "required": [ "id", "description", "version", "category" ]
  290. }