diff --git a/modules/ROOT/pages/_partials/proc_rpm_creating_an_rpm.adoc b/modules/ROOT/pages/_partials/proc_rpm_creating_an_rpm.adoc index 77d37c1..3438238 100644 --- a/modules/ROOT/pages/_partials/proc_rpm_creating_an_rpm.adoc +++ b/modules/ROOT/pages/_partials/proc_rpm_creating_an_rpm.adoc @@ -61,8 +61,8 @@ A simple program to greet the user, Texas style. + [source] ---- -mkdir -p %{buildroot}/%{_bindir} -install -p -m 755 %{SOURCE0} %{buildroot}/%{_bindir} +mkdir -p %{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[]. diff --git a/modules/ROOT/pages/create-hello-world-rpm.adoc b/modules/ROOT/pages/create-hello-world-rpm.adoc index 077cd9e..9964072 100644 --- a/modules/ROOT/pages/create-hello-world-rpm.adoc +++ b/modules/ROOT/pages/create-hello-world-rpm.adoc @@ -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`: ---- -$ rm -f %{buildroot}/%{_infodir}/dir +$ rm -f %{buildroot}%{_infodir}/dir ---- * `Requires(post): info` and `Requires(preun): info` @@ -202,7 +202,7 @@ make %{?_smp_mflags} %install %make_install %find_lang %{name} -rm -f %{buildroot}/%{_infodir}/dir +rm -f %{buildroot}%{_infodir}/dir %post /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :