Skip to content

Commit

Permalink
Our buildsystem macros are just examples, don't actually ship them
Browse files Browse the repository at this point in the history
Split the examples into a separate macro file only used by the
test-suite.
  • Loading branch information
pmatilai committed Jan 11, 2024
1 parent 8fed2b5 commit 82bab4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions macros.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
#*/

9 changes: 9 additions & 0 deletions tests/data/macros.buildsystem
Original file line number Diff line number Diff line change
@@ -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} %*
2 changes: 2 additions & 0 deletions tests/rpmbuild.at
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 82bab4a

Please sign in to comment.