|
| 1 | +# Creating fake Debian Packages |
| 2 | + |
| 3 | +When developing pdf2htmlEX on a platform such as Ubuntu which has |
| 4 | +*older* versions of poppler than the one you are developing |
| 5 | +pdf2htmlEX to match... you sometimes need to fake things! |
| 6 | + |
| 7 | +You can do this by using the |
| 8 | +[Debian equivs](https://salsa.debian.org/perl-team/modules/packages/equivs) |
| 9 | +package. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +To build a fake dpkg to assert that some real package has been |
| 14 | +installed locally from source you type: |
| 15 | + |
| 16 | + sudo apt install equivs |
| 17 | + |
| 18 | +This will install all of the required commands. |
| 19 | + |
| 20 | +Then type: |
| 21 | + |
| 22 | + equivs-control <<nameOfPackage>>-fake |
| 23 | + |
| 24 | +This will create a template debian package manager file for use in the |
| 25 | +following two steps. |
| 26 | + |
| 27 | +Then edit the `<<nameOfPackage>>-fake` control file by typing: |
| 28 | + |
| 29 | + nano <<nameOfPackage>>-fake |
| 30 | + |
| 31 | +Edit the `<<nameOfPackage>>-fake` file to provide correct debian package |
| 32 | +details. The most important two lines are the "Package" name (which |
| 33 | +should be `<<nameOfPackage>>-fake`) and "Provides" (which should be the |
| 34 | +name(s) of the packages which this fake package is asserting are |
| 35 | +already provided on this local system). |
| 36 | + |
| 37 | +Once you have finished your edits, type: |
| 38 | + |
| 39 | + equivs-build <<nameOfPackage>>-fake |
| 40 | + |
| 41 | +This will build the fake debian package. |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +The above has been adapted from the article: |
| 46 | +[Debian Package Management, Part 2: A Developer's Guide](http://www.linuxjournal.com/article/4610) |
| 47 | +or from the section 15.2.1. "Meta-Packages or Fake Packages" of the |
| 48 | +[Debian handbook guide](http://debian-handbook.info/browse/stable/sect.building-first-package.html#idp19964272). |
0 commit comments