Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/packaging/creating-a-new-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ For this example, we need to fix the following:
- Remove `builddeps`. This package has no build dependencies beyond the ones already available for every package (the `system.devel` packages).
- The `setup` step is not required, remove it.
- In the `install` key, we can't use the `%make_install` macro for this package. The files are installed in their correct locations individually.
- The `%install_file` macro installs a file to a target location with the correct permissions.
- The `%install_bin` macro installs the binary to the binary directory with the correct permissions.

After updating the file, it will now look like:

Expand All @@ -116,8 +118,8 @@ description: |
build : |
%make
install : |
install -Dm00664 $workdir/doc/tree.1 $installdir/usr/share/man/man1/tree.1
install -Dm00755 $workdir/tree $installdir/usr/bin/tree
%install_file $workdir/doc/tree.1 $installdir/usr/share/man/man1/tree.1
%install_bin $workdir/tree
```

To read more about finding and including dependencies and other parts of `package.yml` please see [Packaging Practices](packaging-practices.md).
Expand Down
4 changes: 2 additions & 2 deletions docs/packaging/packaging-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@

## Installing extra files

We recommend using patches where possible first, as they ensure correct maintenance and will be updated across package versions. If you must install extra files into the directory, please use the `install` command, ensuring you set the correct permissions. Again, files are accessible from the `./files` directory, relative to `package.yml`.
We recommend using patches where possible first, as they ensure correct maintenance and will be updated across package versions. If you must install extra files into the directory, please use the `%install_file` macro. Again, files are accessible from the `./files` directory, relative to `package.yml`.

This is an example of installing a custom profile file, seen in the `bash` package:

```bash
install -m 0644 $pkgfiles/profile $installdir/etc/profile
%install_file $pkgfiles/profile $installdir/etc/profile
```

## Patterns
Expand Down Expand Up @@ -468,7 +468,7 @@
│   ├── build
│   │   └── nano-9.2
│   │   ├── ABOUT-NLS
│   │   ├── aclocal.m4

Check warning on line 471 in docs/packaging/packaging-practices.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (aclocal)
│   │   ├── AUTHORS
│   │   ├── ChangeLog
│   │   ├── compile
Expand All @@ -483,7 +483,7 @@
│   └── usr
│   ├── bin
│   │   ├── nano
│   │   └── rnano -> nano

Check warning on line 486 in docs/packaging/packaging-practices.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (rnano)
│ ├── {A bunch more installed files}
└── sources
Expand Down