File: rules

package info (click to toggle)
libnet-netrc-ruby 0.2.1-1.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 124 kB
  • ctags: 228
  • sloc: ruby: 1,420; makefile: 22
file content (31 lines) | stat: -rwxr-xr-x 901 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
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk

CUR_RUBYVER=$(lastword $(subst -ruby, ,$(cdbs_curpkg)))
RBCONFIG = ruby -rrbconfig -e 'print RbConfig::CONFIG[ARGV[0]]'
SETUP_SCRIPT=setup.rb

$(patsubst %,makebuilddir/%,$(DEB_ALL_PACKAGES))::
	mkdir -p build-$(cdbs_curpkg)
	cp -a *.rb test lib build-$(cdbs_curpkg)

$(patsubst %,configure/%,$(DEB_ALL_PACKAGES))::
	cd build-$(cdbs_curpkg) && \
		ruby$(CUR_RUBYVER) $(SETUP_SCRIPT) config --installdirs=std

$(patsubst %,build/%,$(DEB_ALL_PACKAGES))::
	cd build-$(cdbs_curpkg) && \
		ruby$(CUR_RUBYVER) $(SETUP_SCRIPT) setup
	cd build-$(cdbs_curpkg) && \
		ruby$(CUR_RUBYVER) test/test_netrc.rb


$(patsubst %,install/%,$(DEB_ALL_PACKAGES))::
	cd build-$(cdbs_curpkg) && \
		ruby$(CUR_RUBYVER) $(SETUP_SCRIPT) install \
		--prefix="$(CURDIR)/debian/$(cdbs_curpkg)"

clean::
	rm -fr build-*