File: ruby-extconf-rb.mk

package info (click to toggle)
ruby-pkg-tools 0.14
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 108 kB
  • ctags: 51
  • sloc: ruby: 253; perl: 15; sh: 5; makefile: 1
file content (51 lines) | stat: -rw-r--r-- 1,451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2006 Thierry Reding <thierry@doppeltgemoppelt.de>
# Description:
#

ifndef _cdbs_bootstrap
	_cdbs_scripts_path ?= /usr/lib/cdbs
	_cdbs_rules_path ?= /usr/share/cdbs/1/rules
	_cdbs_class_path ?= /usr/share/cdbs/1/class
endif

ifndef _cdbs_class_ruby-extconf-rb
_cdbs_class_ruby-extconf-rb := 1

include /usr/share/ruby-pkg-tools/1/class/ruby-common.mk

DEB_RUBY_SETUP_CMD = extconf.rb
DEB_RUBY_SETUP_ARGS =

cdbs_pkgdir = $(CURDIR)/debian/$(cdbs_curpkg)
cdbs_ruby_libdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_LIBDIR)
cdbs_ruby_archdir_ver = $(cdbs_pkgdir)$(DEB_RUBY_ARCHDIR)

DEB_RUBY_INSTALL_ARGS = DESTDIR=$(cdbs_pkgdir) \
	sitelibdir=$(cdbs_ruby_libdir_ver) \
        sitearchdir=$(cdbs_ruby_archdir_ver)

# Build simple packages.
$(patsubst %,build/%,$(DEB_RUBY_SIMPLE_PACKAGES)) :: build/% :
	cd $(DEB_SRCDIR)
	/usr/bin/ruby $(DEB_RUBY_SETUP_RUBY_ARGS) $(DEB_RUBY_SETUP_CMD) $(DEB_RUBY_SETUP_ARGS)
	$(MAKE)

# Install simple packages.
$(patsubst %,install/%,$(DEB_RUBY_SIMPLE_PACKAGES)) :: install/% :
	cd $(DEB_SRCDIR)
	$(MAKE) install $(DEB_RUBY_INSTALL_ARGS)

# Install regular library packages.
$(patsubst %,install/%,$(DEB_RUBY_REAL_LIB_PACKAGES)) :: install/% :
	cd $(DEB_SRCDIR) 
	-$(MAKE) distclean
	/usr/bin/ruby$(cdbs_ruby_ver) $(DEB_RUBY_SETUP_RUBY_ARGS) $(DEB_RUBY_SETUP_CMD) $(DEB_RUBY_SETUP_ARGS)
	$(MAKE)
	$(MAKE) install $(DEB_RUBY_INSTALL_ARGS)

clean::
	-$(MAKE) distclean

endif