build: missing pkg.m4
[project/opkg-lede.git] / libopkg / pkg_parse.h
1 /* pkg_parse.h - the opkg package management system
2
3 Steven M. Ayer
4
5 Copyright (C) 2002 Compaq Computer Corporation
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2, or (at
10 your option) any later version.
11
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16 */
17
18 #ifndef PKG_PARSE_H
19 #define PKG_PARSE_H
20
21 int parse_version(pkg_t *pkg, const char *raw);
22 int pkg_parse_from_stream(pkg_t *pkg, FILE *fp, uint mask);
23 int pkg_parse_from_stream_nomalloc(pkg_t *pkg, FILE *fp, uint mask,
24 char **buf0, size_t buf0len);
25
26 #define EXCESSIVE_LINE_LEN (4096 << 8)
27
28 /* package field mask */
29 #define PFM_ARCHITECTURE (1 << 1)
30 #define PFM_AUTO_INSTALLED (1 << 2)
31 #define PFM_CONFFILES (1 << 3)
32 #define PFM_CONFLICTS (1 << 4)
33 #define PFM_DESCRIPTION (1 << 5)
34 #define PFM_DEPENDS (1 << 6)
35 #define PFM_ESSENTIAL (1 << 7)
36 #define PFM_FILENAME (1 << 8)
37 #define PFM_INSTALLED_SIZE (1 << 9)
38 #define PFM_INSTALLED_TIME (1 << 10)
39 #define PFM_MD5SUM (1 << 11)
40 #define PFM_MAINTAINER (1 << 12)
41 #define PFM_PACKAGE (1 << 13)
42 #define PFM_PRIORITY (1 << 14)
43 #define PFM_PROVIDES (1 << 15)
44 #define PFM_PRE_DEPENDS (1 << 16)
45 #define PFM_RECOMMENDS (1 << 17)
46 #define PFM_REPLACES (1 << 18)
47 #define PFM_SECTION (1 << 19)
48 #define PFM_SHA256SUM (1 << 20)
49 #define PFM_SIZE (1 << 21)
50 #define PFM_SOURCE (1 << 22)
51 #define PFM_STATUS (1 << 23)
52 #define PFM_SUGGESTS (1 << 24)
53 #define PFM_TAGS (1 << 25)
54 #define PFM_VERSION (1 << 26)
55
56 #define PFM_ALL (~(uint)0)
57
58 #endif