1 /* $NetBSD: main.c,v 1.1.1.7 2010/01/30 21:33:31 joerg Exp $ */
10 __RCSID("$NetBSD: main.c,v 1.1.1.7 2010/01/30 21:33:31 joerg Exp $");
13 * FreeBSD install - a package for the installation and maintainance
14 * of non-core utilities.
19 * This is the create module.
29 static const char Options
[] = "B:C:D:EF:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v";
36 char *DeInstall
= NULL
;
37 char *Contents
= NULL
;
39 char *BuildPkgdeps
= NULL
;
41 char *BuildVersion
= NULL
;
42 char *BuildInfo
= NULL
;
45 char *Preserve
= NULL
;
46 char *DefaultOwner
= NULL
;
47 char *DefaultGroup
= NULL
;
48 char *realprefix
= NULL
;
49 const char *CompressionType
= NULL
;
53 int RelativeLinks
= 0;
54 Boolean File2Pkg
= FALSE
;
60 "usage: pkg_create [-ElOUVv] [-B build-info-file] [-b build-version-file]\n"
61 " [-C cpkgs] [-D displayfile] [-F compression] \n"
62 " [-I realprefix] [-i iscript]\n"
63 " [-K pkg_dbdir] [-k dscript]\n"
64 " [-n preserve-file] [-P dpkgs] [-p prefix] [-r rscript]\n"
65 " [-S size-all-file] [-s size-pkg-file]\n"
66 " [-T buildpkgs] [-u owner] [-g group]\n"
67 " -c comment -d description -f packlist\n"
73 main(int argc
, char **argv
)
78 while ((ch
= getopt(argc
, argv
, Options
)) != -1)
89 CompressionType
= optarg
;
129 DefaultGroup
= optarg
;
137 pkgdb_set_dir(optarg
, 3);
149 warnx("Obsolete -L option ignored");
153 DefaultOwner
= optarg
;
169 BuildPkgdeps
= optarg
;
177 BuildVersion
= optarg
;
197 pkg_install_config();
200 warnx("missing package name");
204 warnx("only one package name allowed");
208 if (pkg_perform(*argv
))
212 warnx("package registration failed");
214 warnx("package creation failed");