xref: /netbsd-src/external/bsd/pkg_install/dist/create/create.h (revision f46918ca2125b9b1e7ca5a22c07d1414c618e467)
1 /* $NetBSD: create.h,v 1.3 2021/04/10 19:49:59 nia Exp $ */
2 
3 /* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
4 
5 /*
6  * FreeBSD install - a package for the installation and maintainance
7  * of non-core utilities.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  *
18  * Jordan K. Hubbard
19  * 18 July 1993
20  *
21  * Include and define various things wanted by the create command.
22  *
23  */
24 
25 #ifndef _INST_CREATE_H_INCLUDE
26 #define _INST_CREATE_H_INCLUDE
27 
28 struct memory_file {
29 	struct stat st;
30 	const char *name;
31 	const char *owner;
32 	const char *group;
33 	mode_t mode;
34 
35 	char *data;
36 	size_t len;
37 };
38 
39 extern char *Prefix;
40 extern char *Comment;
41 extern char *Desc;
42 extern char *Display;
43 extern char *Install;
44 extern char *DeInstall;
45 extern char *Contents;
46 extern char *Pkgdeps;
47 extern char *BuildPkgdeps;
48 extern char *Pkgcfl;
49 extern char *BuildVersion;
50 extern char *BuildInfo;
51 extern char *SizePkg;
52 extern char *SizeAll;
53 extern char *Preserve;
54 extern char *realprefix;
55 extern char *DefaultOwner;
56 extern char *DefaultGroup;
57 extern const char *CompressionType;
58 extern int PlistOnly;
59 extern int RelativeLinks;
60 
61 void    check_list(package_t *, const char *);
62 void    copy_plist(char *, package_t *);
63 
64 struct memory_file
65 	*load_memory_file(const char *, const char *,
66 			  const char *, const char *, mode_t);
67 struct memory_file
68 	*make_memory_file(const char *, void *, size_t,
69 			  const char *, const char *, mode_t);
70 void	free_memory_file(struct memory_file *);
71 
72 int	pkg_perform(const char *);
73 int	pkg_build(const char *, const char *, const char *, package_t *plist);
74 
75 #endif				/* _INST_CREATE_H_INCLUDE */
76