diff --git a/macros.in b/macros.in index 7f3b06d1db..040a1c23df 100644 --- a/macros.in +++ b/macros.in @@ -1356,16 +1356,6 @@ end %buildsystem_default_prep() %autosetup -p1 %* %buildsystem_default_clean() %{__rm} -rf %{buildroot} -# Example buildsystem for autotools -%buildsystem_autotools_conf() %configure %* -%buildsystem_autotools_build() %make_build %* -%buildsystem_autotools_install() %make_install %* - -# Example buildsystem for cmake -%buildsystem_cmake_conf() cmake %* -B __rpmbuild -S . -%buildsystem_cmake_build() cmake --build __rpmbuild %{?smp_mflags} %{?verbose:-v} -- %* -%buildsystem_cmake_install() DESTDIR=${RPM_BUILD_ROOT} cmake --install __rpmbuild %{?verbose:-v} %* - # \endverbatim #*/ diff --git a/tests/data/macros.buildsystem b/tests/data/macros.buildsystem new file mode 100644 index 0000000000..03fe4cfccb --- /dev/null +++ b/tests/data/macros.buildsystem @@ -0,0 +1,9 @@ +# Example buildsystem for autotools +%buildsystem_autotools_conf() %configure %* +%buildsystem_autotools_build() %make_build %* +%buildsystem_autotools_install() %make_install %* + +# Example buildsystem for cmake +%buildsystem_cmake_conf() cmake %* -B __rpmbuild -S . +%buildsystem_cmake_build() cmake --build __rpmbuild %{?smp_mflags} %{?verbose:-v} -- %* +%buildsystem_cmake_install() DESTDIR=${RPM_BUILD_ROOT} cmake --install __rpmbuild %{?verbose:-v} %* diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at index 8eed49e0d3..0a3a00eb72 100644 --- a/tests/rpmbuild.at +++ b/tests/rpmbuild.at @@ -48,6 +48,8 @@ AT_SETUP([rpmbuild -b buildsystem]) AT_KEYWORDS([build]) RPMDB_INIT +cp "${RPMTEST}/data/macros.buildsystem" "${RPMTEST}/${RPM_CONFIGDIR_PATH}/macros.d/" + RPMTEST_CHECK([ runroot rpmbuild -bb \ --define "_prefix /usr" \