mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-28 14:56:35 +00:00
Remove slashes after %{buildroot}
%{_bindir} etc. already starts with a slash. There is no need to put a slash after %{buildroot}. (Except when pointing to the literal root of the buildroot and using just "%{buildroot}/".)
This commit is contained in:
parent
832249462d
commit
42424954aa
2 changed files with 4 additions and 4 deletions
|
@ -61,8 +61,8 @@ A simple program to greet the user, Texas style.
|
||||||
+
|
+
|
||||||
[source]
|
[source]
|
||||||
----
|
----
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
install -p -m 755 %{SOURCE0} %{buildroot}/%{_bindir}
|
install -p -m 755 %{SOURCE0} %{buildroot}%{_bindir}
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
NOTE: In this example, we use the following three macros: `%\{buildroot}`, `%\{_bindir}`, and `%\{SOURCE0}`. This method ignores the origin of the files and directories and focuses on the destination of the files. Without `%\{buildroot}` the files might install directly onto your development machine. This is not recommended, especially if you run as root. For more information on macros and `.spec` file entries, see xref:con_rpm_spec_file_overview[].
|
NOTE: In this example, we use the following three macros: `%\{buildroot}`, `%\{_bindir}`, and `%\{SOURCE0}`. This method ignores the origin of the files and directories and focuses on the destination of the files. Without `%\{buildroot}` the files might install directly onto your development machine. This is not recommended, especially if you run as root. For more information on macros and `.spec` file entries, see xref:con_rpm_spec_file_overview[].
|
||||||
|
|
|
@ -147,7 +147,7 @@ If the program uses GNU `info` files, you need to make sure the installation and
|
||||||
* delete the `dir` file in `%install`:
|
* delete the `dir` file in `%install`:
|
||||||
|
|
||||||
----
|
----
|
||||||
$ rm -f %{buildroot}/%{_infodir}/dir
|
$ rm -f %{buildroot}%{_infodir}/dir
|
||||||
----
|
----
|
||||||
|
|
||||||
* `Requires(post): info` and `Requires(preun): info`
|
* `Requires(post): info` and `Requires(preun): info`
|
||||||
|
@ -202,7 +202,7 @@ make %{?_smp_mflags}
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
rm -f %{buildroot}/%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
||||||
|
|
Loading…
Reference in a new issue