1/* $NetBSD: info.h,v 1.3 2021/04/10 19:49:59 nia Exp $ */ 2 3/* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */ 4 5/*- 6 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>. 7 * All rights reserved. 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 * 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in 17 * the documentation and/or other materials provided with the 18 * distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34/* 35 * FreeBSD install - a package for the installation and maintainance 36 * of non-core utilities. 37 * 38 * Redistribution and use in source and binary forms, with or without 39 * modification, are permitted provided that the following conditions 40 * are met: 41 * 1. Redistributions of source code must retain the above copyright 42 * notice, this list of conditions and the following disclaimer. 43 * 2. Redistributions in binary form must reproduce the above copyright 44 * notice, this list of conditions and the following disclaimer in the 45 * documentation and/or other materials provided with the distribution. 46 * 47 * Jordan K. Hubbard 48 * 23 August 1993 49 * 50 * Include and define various things wanted by the info command. 51 * 52 */ 53 54#ifndef _INST_INFO_H_INCLUDE 55#define _INST_INFO_H_INCLUDE 56 57struct pkg_meta { 58 char *meta_contents; 59 char *meta_comment; 60 char *meta_desc; 61 char *meta_mtree; 62 char *meta_build_version; 63 char *meta_build_info; 64 char *meta_size_pkg; 65 char *meta_size_all; 66 char *meta_required_by; 67 char *meta_display; 68 char *meta_install; 69 char *meta_deinstall; 70 char *meta_preserve; 71 char *meta_installed_info; 72 int is_installed; 73}; 74 75#ifndef MAXINDEXSIZE 76#define MAXINDEXSIZE 60 77#endif 78 79#ifndef MAXNAMESIZE 80#define MAXNAMESIZE 20 81#endif 82 83#define SHOW_COMMENT 0x00001 84#define SHOW_DESC 0x00002 85#define SHOW_PLIST 0x00004 86#define SHOW_INSTALL 0x00008 87#define SHOW_DEINSTALL 0x00010 88#define SHOW_PREFIX 0x00040 89#define SHOW_INDEX 0x00080 90#define SHOW_FILES 0x00100 91#define SHOW_DISPLAY 0x00200 92#define SHOW_REQBY 0x00400 93#define SHOW_MTREE 0x00800 94#define SHOW_BUILD_VERSION 0x01000 95#define SHOW_BUILD_INFO 0x02000 96#define SHOW_DEPENDS 0x04000 97#define SHOW_PKG_SIZE 0x08000 98#define SHOW_ALL_SIZE 0x10000 99#define SHOW_BLD_DEPENDS 0x20000 100#define SHOW_BI_VAR 0x40000 101#define SHOW_SUMMARY 0x80000 102#define SHOW_FULL_REQBY 0x100000 103 104enum which { 105 WHICH_ALL, 106 WHICH_USER, 107 WHICH_LIST 108}; 109 110extern int Flags; 111extern enum which Which; 112extern Boolean File2Pkg; 113extern Boolean Quiet; 114extern const char *InfoPrefix; 115extern const char *BuildInfoVariable; 116extern lpkg_head_t pkgs; 117 118int CheckForPkg(const char *); 119int CheckForBestPkg(const char *); 120 121void show_file(const char *, const char *, Boolean); 122void show_var(const char *, const char *); 123void show_plist(const char *, package_t *, pl_ent_t); 124void show_files(const char *, package_t *); 125void show_depends(const char *, package_t *); 126void show_bld_depends(const char *, package_t *); 127void show_index(const char *, const char *); 128void show_summary(struct pkg_meta *, package_t *, const char *); 129void show_list(lpkg_head_t *, const char *); 130 131int pkg_perform(lpkg_head_t *); 132 133#endif /* _INST_INFO_H_INCLUDE */ 134