aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in25
1 files changed, 13 insertions, 12 deletions
diff --git a/build.macros.in b/build.macros.in
index 1036db5..04000ea 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -511,22 +511,23 @@ sed -i -e 's/`git ls-files`/`find -type f`/' \\\
%gem_install(d) \
%{_bindir}/gem install %{__ruby_module_name}-%{version}.gem --local \\\
- --env-shebang --rdoc --ri --force --ignore-dependencies \\\
- --install-dir %{buildroot}%{ruby_gemdir} \\\
- --bindir %{buildroot}%{_bindir} \
+ --env-shebang --rdoc --ri --force --ignore-dependencies \\\
+ --install-dir %{buildroot}%{ruby_gemdir} \\\
+ --bindir %{buildroot}%{_bindir} \
+ EXTPATH=$(ruby -e "puts Gem::Specification.new('%{__ruby_module_name}.gemspec').require_paths.join(' ')") \
%{-d: \
- (cd %{buildroot}%{gem_instdir}; \\\
- for f in $(find -name *.h); do \\\
- mkdir -p %{buildroot}%{gem_extdir_mri}/$(dirname $f); \\\
- mv $f %{buildroot}%{gem_extdir_mri}/$f; \\\
- done ) \
+ (cd %{buildroot}%{gem_instdir}; \\\
+ for f in $(find $EXTPATH -name *.h); do \\\
+ mkdir -p %{buildroot}%{gem_extdir_mri}/$(dirname $f); \\\
+ mv $f %{buildroot}%{gem_extdir_mri}/$f; \\\
+ done ) \
} \
(cd %{buildroot}%{gem_instdir}; \\\
- for f in $(find -name '*.so'); do \\\
- mkdir -p %{buildroot}%{gem_extdir_mri}/$(dirname $f); \\\
- mv $f %{buildroot}%{gem_extdir_mri}/$f; done ) \
+ for f in $(find $EXTPATH -name '*.so'); do \\\
+ mkdir -p %{buildroot}%{gem_extdir_mri}/$(dirname $f); \\\
+ mv $f %{buildroot}%{gem_extdir_mri}/$f; done ) \
rm -fr %{buildroot}%{ruby_gemdir}/{cache,gems/%{__ruby_module_name}-%{version}/ext,gems/%{__ruby_module_name}-%{version}/%{__ruby_module_name}.gemspec} \
- find %{buildroot}%{gem_instdir} -maxdepth 1 -type f -delete \
+ find %{buildroot}%{gem_instdir} -maxdepth 1 -type f -delete
#------------------------------------------------------------------------------
# Systemd and general service related macros