{
    "content": [
        {
            "type": "text",
            "text": "# dpkg-gencontrol(1) (man)\n\n**Summary:** dpkg-gencontrol - generate Debian control files\n\n**Synopsis:** dpkg-gencontrol [option...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -v | — | — | Sets the version number of the binary package which will be generated. |\n| -V | — | — | Set an output substitution variable. See deb-substvars(5) for discussion of output substitution. |\n| -T | — | — | Read substitution variables in substvars-file; the default is debian/substvars. This option can be used multiple times t |\n| -D | — | — | Override or add an output control file field. |\n| -U | — | — | Remove an output control file field. |\n| -c | — | — | Specifies the main source control file to read information from. The default is debian/control. |\n| -l | — | — | Specifies the changelog file to read information from. The default is debian/changelog. |\n| -f | — | — | Read or write the list of files to be uploaded here, rather than using debian/files. |\n| -F | — | — | Specifies the format of the changelog. See dpkg-parsechangelog(1) for information about alternative formats. |\n| -p | — | — | Generate information for the binary package package. If the source control file lists only one binary package then this  |\n| -n | — | — | Assume the filename of the package will be filename instead of the normal packageversionarch.deb filename. |\n| — | — | — | These options are ignored for compatibility with older versions of the dpkg build scripts but are now deprecated. Previo |\n| -P | — | — | Scan package-build-dir instead of debian/tmp. This value is used to find the default value of the Installed-Size substit |\n| -O | — | — | Print the control file to standard output (or filename if specified, since dpkg 1.17.2), rather than to debian/tmp/DEBIA |\n| — | --version | — | Show the version and exit. |\n\n## See Also\n\n- deb-substvars(5)\n- deb-src-control(5)\n- deb-changelog(5)\n- deb-control(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (19 lines)\n- **OPTIONS** (1 lines) — 15 subsections\n  - -v (2 lines)\n  - -V (3 lines)\n  - -T (4 lines)\n  - -D (2 lines)\n  - -U (2 lines)\n  - -c (3 lines)\n  - -l (2 lines)\n  - -f (2 lines)\n  - -F (3 lines)\n  - -p (4 lines)\n  - -n (3 lines)\n  - -is -ip -isp (6 lines)\n  - -P (4 lines)\n  - -O (7 lines)\n  - --version (2 lines)\n- **ENVIRONMENT** (9 lines)\n- **FILES** (1 lines) — 2 subsections\n  - debian/control (3 lines)\n  - debian/files (3 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\ndpkg-gencontrol - generate Debian control files\n\n### SYNOPSIS\n\ndpkg-gencontrol [option...]\n\n### DESCRIPTION\n\ndpkg-gencontrol reads information from an unpacked Debian source tree and generates a binary\npackage control file (which defaults to debian/tmp/DEBIAN/control); during this process it\nwill simplify the relation fields.\n\nThus Pre-Depends, Depends, Recommends and Suggests are simplified in this order by removing\ndependencies which are known to be true according to the stronger dependencies already\nparsed. It will also remove any self-dependency (in fact it will remove any dependency which\nevaluates to true given the current version of the package as installed). Logically it keeps\nthe intersection of multiple dependencies on the same package. The order of dependencies is\npreserved as best as possible: if any dependency must be discarded due to another dependency\nappearing further in the field, the superseding dependency will take the place of the\ndiscarded one.\n\nThe other relation fields (Enhances, Conflicts, Breaks, Replaces and Provides) are also\nsimplified individually by computing the union of the various dependencies when a package is\nlisted multiple times in the field.\n\ndpkg-gencontrol also adds an entry for the binary package to debian/files.\n\n### OPTIONS\n\n#### -v\n\nSets the version number of the binary package which will be generated.\n\n#### -V\n\nSet an output substitution variable. See deb-substvars(5) for discussion of output\nsubstitution.\n\n#### -T\n\nRead substitution variables in substvars-file; the default is debian/substvars.  This\noption can be used multiple times to read substitution variables from multiple files\n(since dpkg 1.15.6).\n\n#### -D\n\nOverride or add an output control file field.\n\n#### -U\n\nRemove an output control file field.\n\n#### -c\n\nSpecifies the main source control file to read information from. The default is\ndebian/control.\n\n#### -l\n\nSpecifies the changelog file to read information from. The default is debian/changelog.\n\n#### -f\n\nRead or write the list of files to be uploaded here, rather than using debian/files.\n\n#### -F\n\nSpecifies the format of the changelog. See dpkg-parsechangelog(1) for information about\nalternative formats.\n\n#### -p\n\nGenerate information for the binary package package.  If the source control file lists\nonly one binary package then this option may be omitted; otherwise it is essential to\nselect which binary package's information to generate.\n\n#### -n\n\nAssume the filename of the package will be filename instead of the normal\npackageversionarch.deb filename.\n\n#### -is -ip -isp\n\nThese options are ignored for compatibility with older versions of the dpkg build scripts\nbut are now deprecated. Previously they were used to tell dpkg-gencontrol to include the\nSection and Priority fields in the control file. This is now the default behaviour. If\nyou want to get the old behaviour you can use the -U option to delete the fields from the\ncontrol file.\n\n#### -P\n\nScan package-build-dir instead of debian/tmp.  This value is used to find the default\nvalue of the Installed-Size substitution variable and control file field, and for the\ndefault location of the output file.\n\n#### -O\n\nPrint the control file to standard output (or filename if specified, since dpkg 1.17.2),\nrather than to debian/tmp/DEBIAN/control (or package-build-dir/DEBIAN/control if -P was\nused).\n\n-?, --help\nShow the usage message and exit.\n\n#### --version\n\nShow the version and exit.\n\n### ENVIRONMENT\n\nDPKGCOLORS\nSets the color mode (since dpkg 1.18.5).  The currently accepted values are: auto\n(default), always and never.\n\nDPKGNLS\nIf set, it will be used to decide whether to activate Native Language Support, also known\nas internationalization (or i18n) support (since dpkg 1.19.0).  The accepted values are:\n0 and 1 (default).\n\n### FILES\n\n#### debian/control\n\nThe main source control information file, giving version-independent information about\nthe source package and the binary packages it can produce.\n\n#### debian/files\n\nThe list of generated files which are part of the upload being prepared.  dpkg-gencontrol\nadds the presumed filenames of binary packages whose control files it generates here.\n\n### SEE ALSO\n\ndeb-substvars(5), deb-src-control(5), deb-changelog(5), deb-control(5).\n\n\n\n1.21.1                                       2025-09-09                           dpkg-gencontrol(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "dpkg-gencontrol",
        "section": "1",
        "mode": "man",
        "summary": "dpkg-gencontrol - generate Debian control files",
        "synopsis": "dpkg-gencontrol [option...]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "Sets the version number of the binary package which will be generated."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": "Set an output substitution variable. See deb-substvars(5) for discussion of output substitution."
            },
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": "Read substitution variables in substvars-file; the default is debian/substvars. This option can be used multiple times to read substitution variables from multiple files (since dpkg 1.15.6)."
            },
            {
                "flag": "-D",
                "long": null,
                "arg": null,
                "description": "Override or add an output control file field."
            },
            {
                "flag": "-U",
                "long": null,
                "arg": null,
                "description": "Remove an output control file field."
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "Specifies the main source control file to read information from. The default is debian/control."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "Specifies the changelog file to read information from. The default is debian/changelog."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Read or write the list of files to be uploaded here, rather than using debian/files."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": "Specifies the format of the changelog. See dpkg-parsechangelog(1) for information about alternative formats."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "Generate information for the binary package package. If the source control file lists only one binary package then this option may be omitted; otherwise it is essential to select which binary package's information to generate."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "Assume the filename of the package will be filename instead of the normal packageversionarch.deb filename."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "These options are ignored for compatibility with older versions of the dpkg build scripts but are now deprecated. Previously they were used to tell dpkg-gencontrol to include the Section and Priority fields in the control file. This is now the default behaviour. If you want to get the old behaviour you can use the -U option to delete the fields from the control file."
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "Scan package-build-dir instead of debian/tmp. This value is used to find the default value of the Installed-Size substitution variable and control file field, and for the default location of the output file."
            },
            {
                "flag": "-O",
                "long": null,
                "arg": null,
                "description": "Print the control file to standard output (or filename if specified, since dpkg 1.17.2), rather than to debian/tmp/DEBIAN/control (or package-build-dir/DEBIAN/control if -P was used). -?, --help Show the usage message and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Show the version and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "deb-substvars",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-substvars/5/json"
            },
            {
                "name": "deb-src-control",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-src-control/5/json"
            },
            {
                "name": "deb-changelog",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-changelog/5/json"
            },
            {
                "name": "deb-control",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/deb-control/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-v",
                        "lines": 2,
                        "flag": "-v"
                    },
                    {
                        "name": "-V",
                        "lines": 3,
                        "flag": "-V"
                    },
                    {
                        "name": "-T",
                        "lines": 4,
                        "flag": "-T"
                    },
                    {
                        "name": "-D",
                        "lines": 2,
                        "flag": "-D"
                    },
                    {
                        "name": "-U",
                        "lines": 2,
                        "flag": "-U"
                    },
                    {
                        "name": "-c",
                        "lines": 3,
                        "flag": "-c"
                    },
                    {
                        "name": "-l",
                        "lines": 2,
                        "flag": "-l"
                    },
                    {
                        "name": "-f",
                        "lines": 2,
                        "flag": "-f"
                    },
                    {
                        "name": "-F",
                        "lines": 3,
                        "flag": "-F"
                    },
                    {
                        "name": "-p",
                        "lines": 4,
                        "flag": "-p"
                    },
                    {
                        "name": "-n",
                        "lines": 3,
                        "flag": "-n"
                    },
                    {
                        "name": "-is -ip -isp",
                        "lines": 6
                    },
                    {
                        "name": "-P",
                        "lines": 4,
                        "flag": "-P"
                    },
                    {
                        "name": "-O",
                        "lines": 7,
                        "flag": "-O"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "debian/control",
                        "lines": 3
                    },
                    {
                        "name": "debian/files",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}