xref: /haiku/headers/os/package/hpkg/PackageAttributes.h (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
1 /*
2  * Copyright 2009-2013, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 // This file defines the HPKG file attributes with all their properties in one
8 // place. Includers of the file need to define the macro
9 // B_DEFINE_HPKG_ATTRIBUTE(id, type, name, constant) so that it evaluates to
10 // whatever is desired in their context.
11 
12 
13 B_DEFINE_HPKG_ATTRIBUTE( 0, STRING,	"dir:entry",			DIRECTORY_ENTRY)
14 B_DEFINE_HPKG_ATTRIBUTE( 1, UINT,	"file:type",			FILE_TYPE)
15 B_DEFINE_HPKG_ATTRIBUTE( 2, UINT,	"file:permissions",		FILE_PERMISSIONS)
16 B_DEFINE_HPKG_ATTRIBUTE( 3, STRING,	"file:user",			FILE_USER)
17 B_DEFINE_HPKG_ATTRIBUTE( 4, STRING,	"file:group",			FILE_GROUP)
18 B_DEFINE_HPKG_ATTRIBUTE( 5, UINT,	"file:atime",			FILE_ATIME)
19 B_DEFINE_HPKG_ATTRIBUTE( 6, UINT,	"file:mtime",			FILE_MTIME)
20 B_DEFINE_HPKG_ATTRIBUTE( 7, UINT,	"file:crtime",			FILE_CRTIME)
21 B_DEFINE_HPKG_ATTRIBUTE( 8, UINT,	"file:atime:nanos",		FILE_ATIME_NANOS)
22 B_DEFINE_HPKG_ATTRIBUTE( 9, UINT,	"file:mtime:nanos",		FILE_MTIME_NANOS)
23 B_DEFINE_HPKG_ATTRIBUTE(10, UINT,	"file:crtime:nanos",	FILE_CRTIM_NANOS)
24 B_DEFINE_HPKG_ATTRIBUTE(11, STRING,	"file:attribute",		FILE_ATTRIBUTE)
25 B_DEFINE_HPKG_ATTRIBUTE(12, UINT,	"file:attribute:type",	FILE_ATTRIBUTE_TYPE)
26 B_DEFINE_HPKG_ATTRIBUTE(13, RAW,	"data",					DATA)
27 B_DEFINE_HPKG_ATTRIBUTE(14, STRING,	"symlink:path",			SYMLINK_PATH)
28 B_DEFINE_HPKG_ATTRIBUTE(15, STRING,	"package:name",			PACKAGE_NAME)
29 B_DEFINE_HPKG_ATTRIBUTE(16, STRING,	"package:summary",		PACKAGE_SUMMARY)
30 B_DEFINE_HPKG_ATTRIBUTE(17, STRING,	"package:description",	PACKAGE_DESCRIPTION)
31 B_DEFINE_HPKG_ATTRIBUTE(18, STRING,	"package:vendor",		PACKAGE_VENDOR)
32 B_DEFINE_HPKG_ATTRIBUTE(19, STRING,	"package:packager",		PACKAGE_PACKAGER)
33 B_DEFINE_HPKG_ATTRIBUTE(20, UINT,	"package:flags",		PACKAGE_FLAGS)
34 B_DEFINE_HPKG_ATTRIBUTE(21, UINT,	"package:architecture",
35 	PACKAGE_ARCHITECTURE)
36 B_DEFINE_HPKG_ATTRIBUTE(22, STRING,	"package:version.major",
37 	PACKAGE_VERSION_MAJOR)
38 B_DEFINE_HPKG_ATTRIBUTE(23, STRING,	"package:version.minor",
39 	PACKAGE_VERSION_MINOR)
40 B_DEFINE_HPKG_ATTRIBUTE(24, STRING,	"package:version.micro",
41 	PACKAGE_VERSION_MICRO)
42 B_DEFINE_HPKG_ATTRIBUTE(25, UINT,	"package:version.revision",
43 	PACKAGE_VERSION_REVISION)
44 B_DEFINE_HPKG_ATTRIBUTE(26, STRING,	"package:copyright",	PACKAGE_COPYRIGHT)
45 B_DEFINE_HPKG_ATTRIBUTE(27, STRING,	"package:license",		PACKAGE_LICENSE)
46 B_DEFINE_HPKG_ATTRIBUTE(28, STRING,	"package:provides",		PACKAGE_PROVIDES)
47 B_DEFINE_HPKG_ATTRIBUTE(29, STRING,	"package:requires",		PACKAGE_REQUIRES)
48 B_DEFINE_HPKG_ATTRIBUTE(30, STRING,	"package:supplements",	PACKAGE_SUPPLEMENTS)
49 B_DEFINE_HPKG_ATTRIBUTE(31, STRING,	"package:conflicts",	PACKAGE_CONFLICTS)
50 B_DEFINE_HPKG_ATTRIBUTE(32, STRING,	"package:freshens",		PACKAGE_FRESHENS)
51 B_DEFINE_HPKG_ATTRIBUTE(33, STRING,	"package:replaces",		PACKAGE_REPLACES)
52 B_DEFINE_HPKG_ATTRIBUTE(34, UINT,	"package:resolvable.operator",
53 	PACKAGE_RESOLVABLE_OPERATOR)
54 B_DEFINE_HPKG_ATTRIBUTE(35, STRING,	"package:checksum",		PACKAGE_CHECKSUM)
55 B_DEFINE_HPKG_ATTRIBUTE(36, STRING,	"package:version.prerelease",
56 	PACKAGE_VERSION_PRE_RELEASE)
57 B_DEFINE_HPKG_ATTRIBUTE(37, STRING,	"package:provides.compatible",
58 	PACKAGE_PROVIDES_COMPATIBLE)
59 B_DEFINE_HPKG_ATTRIBUTE(38, STRING,	"package:url",			PACKAGE_URL)
60 B_DEFINE_HPKG_ATTRIBUTE(39, STRING,	"package:source-url",	PACKAGE_SOURCE_URL)
61 B_DEFINE_HPKG_ATTRIBUTE(40, STRING,	"package:install-path",
62 	PACKAGE_INSTALL_PATH)
63 B_DEFINE_HPKG_ATTRIBUTE(41, STRING,	"package:base-package",
64 	PACKAGE_BASE_PACKAGE)
65 B_DEFINE_HPKG_ATTRIBUTE(42, STRING,	"package:global-writable-file",
66 	PACKAGE_GLOBAL_WRITABLE_FILE)
67 B_DEFINE_HPKG_ATTRIBUTE(43, STRING,	"package:user-settings-file",
68 	PACKAGE_USER_SETTINGS_FILE)
69 B_DEFINE_HPKG_ATTRIBUTE(44, UINT,	"package:writable-file-update-type",
70 	PACKAGE_WRITABLE_FILE_UPDATE_TYPE)
71 B_DEFINE_HPKG_ATTRIBUTE(45, STRING,	"package:settings-file-template",
72 	PACKAGE_SETTINGS_FILE_TEMPLATE)
73 B_DEFINE_HPKG_ATTRIBUTE(46, STRING,	"package:user",			PACKAGE_USER)
74 B_DEFINE_HPKG_ATTRIBUTE(47, STRING,	"package:user.real-name",
75 	PACKAGE_USER_REAL_NAME)
76 B_DEFINE_HPKG_ATTRIBUTE(48, STRING,	"package:user.home",	PACKAGE_USER_HOME)
77 B_DEFINE_HPKG_ATTRIBUTE(49, STRING,	"package:user.shell",	PACKAGE_USER_SHELL)
78 B_DEFINE_HPKG_ATTRIBUTE(50, STRING,	"package:user.group",	PACKAGE_USER_GROUP)
79 B_DEFINE_HPKG_ATTRIBUTE(51, STRING,	"package:group",		PACKAGE_GROUP)
80 B_DEFINE_HPKG_ATTRIBUTE(52, STRING,	"package:post-install-script",
81 	PACKAGE_POST_INSTALL_SCRIPT)
82 B_DEFINE_HPKG_ATTRIBUTE(53, UINT,	"package:is-writable-directory",
83 	PACKAGE_IS_WRITABLE_DIRECTORY)
84 B_DEFINE_HPKG_ATTRIBUTE(54, STRING,	"package",				PACKAGE)
85 B_DEFINE_HPKG_ATTRIBUTE(55, STRING,	"package:pre-uninstall-script",
86 	PACKAGE_PRE_UNINSTALL_SCRIPT)
87 // Note: add new entries at the end to avoid breaking index numbers, which are
88 // in previously built .hpkg files the build process downloads from elsewhere.
89 // Also remember to bump B_HPKG_MINOR_VERSION and B_HPKG_REPO_MINOR_VERSION.
90 // And yes, the build (on Haiku) runs packaging tools compiled using your code,
91 // which makes it extra fun to debug :-)
92