[Pkg-ruby-extras-maintainers] r125 - in tools/ruby-pkg-tools/trunk:
1/class debian
Esteban Manchado Velázquez
zoso at costa.debian.org
Wed Nov 9 23:37:34 UTC 2005
Author: zoso
Date: 2005-11-09 23:37:34 +0000 (Wed, 09 Nov 2005)
New Revision: 125
Modified:
tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk
tools/ruby-pkg-tools/trunk/debian/changelog
Log:
- Created two macros, push_cfg_file and pop_cfg_file, to move around .config
files
- Only move .config to .config-<package> if it really exists (for example, when
using install.rb instead of setup.rb, no .config file is generated)
Modified: tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk
===================================================================
--- tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk 2005-11-09 23:33:11 UTC (rev 124)
+++ tools/ruby-pkg-tools/trunk/1/class/ruby-setup-rb.mk 2005-11-09 23:37:34 UTC (rev 125)
@@ -55,11 +55,14 @@
cdbs_ruby_ver = $(filter-out %-,$(subst -ruby,- ,$(cdbs_curpkg)))
+push_cfg_file = if [ -f $(DEB_SRCDIR)/.config ]; then mv $(DEB_SRCDIR)/.config $(DEB_SRCDIR)/.config-$(1); fi
+pop_cfg_file = if [ -f $(DEB_SRCDIR)/.config-$(1) ]; then mv $(DEB_SRCDIR)/.config-$(1) $(DEB_SRCDIR)/.config; fi
+
# common-build-arch common-build-indep:: common-build-impl
# common-build-impl::
$(patsubst %,build/%,$(DEB_RUBY_REAL_LIB_PACKAGES)) :: build/% :
cd $(DEB_SRCDIR) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) setup $(DEB_RUBY_SETUP_ARGS)
- mv $(DEB_SRCDIR)/.config $(DEB_SRCDIR)/.config-$(cdbs_curpkg)
+ $(call push_cfg_file,$(cdbs_curpkg))
clean::
# Ignore errors from this rule. In a tarball build, the file
@@ -70,11 +73,12 @@
# See if this package doesn't appear to need to be compiled by multiple
# Ruby versions.
$(patsubst %,install/%,$(DEB_RUBY_REAL_LIB_PACKAGES)) :: install/% :
- mv $(DEB_SRCDIR)/.config-$(cdbs_curpkg) $(DEB_SRCDIR)/.config
+ $(call pop_cfg_file,$(cdbs_curpkg))
cd $(DEB_SRCDIR) && /usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_CMD) install --prefix=debian/$(cdbs_curpkg) $(DEB_RUBY_INSTALL_ARGS_ALL) $(DEB_RUBY_INSTALL_ARGS_$(cdbs_curpkg))
- mv $(DEB_SRCDIR)/.config $(DEB_SRCDIR)/.config-$(cdbs_curpkg)
+ $(call push_cfg_file,$(cdbs_curpkg))
$(patsubst %,install/%,$(DEB_RUBY_OTHER_PACKAGES)) :: install/% :
- cd $(DEB_SRCDIR) && ruby $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && ruby $(DEB_RUBY_SETUP_CMD) install --prefix="debian/$(cdbs_curpkg)" $(DEB_RUBY_INSTALL_ARGS_ALL) $(DEB_RUBY_INSTALL_ARGS_$(cdbs_curpkg)) && mv .config .config-$(cdbs_curpkg)
+ cd $(DEB_SRCDIR) && ruby $(DEB_RUBY_SETUP_CMD) config $(DEB_RUBY_CONFIG_ARGS) && ruby $(DEB_RUBY_SETUP_CMD) install --prefix="debian/$(cdbs_curpkg)" $(DEB_RUBY_INSTALL_ARGS_ALL) $(DEB_RUBY_INSTALL_ARGS_$(cdbs_curpkg))
+ $(call push_cfg_file,$(cdbs_curpkg))
endif
Modified: tools/ruby-pkg-tools/trunk/debian/changelog
===================================================================
--- tools/ruby-pkg-tools/trunk/debian/changelog 2005-11-09 23:33:11 UTC (rev 124)
+++ tools/ruby-pkg-tools/trunk/debian/changelog 2005-11-09 23:37:34 UTC (rev 125)
@@ -8,6 +8,7 @@
* ruby-setup-rb.mk class cleanup:
- added Ruby version 1.6 support,
- fixed problems with building non-lib packages.
+ * Enhanced ruby-setup-rb.mk compatibility with the install.rb script
[ Paul van Tilburg ]
* Updated the source entry for the Cmd library.
More information about the pkg-ruby-extras-maintainers
mailing list