Skip to content

Commit

Permalink
Merge pull request #49 from packit/nforro-readme
Browse files Browse the repository at this point in the history
Document sources and prep macros

Fixes #45.

Reviewed-by: František Nečas <None>
Reviewed-by: Tomas Tomecek <tomas@tomecek.net>
Reviewed-by: Nikola Forró <None>
  • Loading branch information
softwarefactory-project-zuul[bot] authored Apr 13, 2022
2 parents b81c0e3 + b29a9a5 commit 7d64159
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ Tag represents a single item of metadata of a package. It has a well-defined nam

For the purposes of this library, a tag can have associated comments. These are consecutive comment lines directly above the tag definition in a spec file.

### Source

Source is a source file or a downstream patch defined by a `Source`/`Patch` tag or by an entry in `%sourcelist`/`%patchlist` section.

Source can be local, specified by a filename, or remote, specified by a URL. Local sources should be located in a directory referred to as `sourcedir`. Remote sources should be downloaded to this directory.

Sources defined by tags can be explicitly numbered, e.g. `Source0` or `Patch999`, otherwise implicit numbering takes place and source numbers are auto-assigned in a sequential manner.

### Prep macros

Prep macros are macros that often appear in (and only in, they don't make sense anywhere else) `%prep` section.

4 such macros are recognized by this library, [`%setup`](https://rpm-packaging-guide.github.io/#setup), [`%patch`](http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html#S2-RPM-INSIDE-PATCH-MACRO), [`%autosetup`](https://rpm-software-management.github.io/rpm/manual/autosetup.html#autosetup-description) and [`%autopatch`](https://rpm-software-management.github.io/rpm/manual/autosetup.html#autopatch). A typical spec file uses either `%autosetup` or a combination of `%setup` and `%patch` or `%autopatch`.

## Examples and use cases

The following examples should cover use cases required by [packit](https://github.com/packit/research/blob/main/specfile/README.md).
Expand Down

0 comments on commit 7d64159

Please sign in to comment.