File: rules

package info (click to toggle)
jruby 1.5.1-1%2Bdeb6u1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze-lts
  • size: 47,024 kB
  • ctags: 74,144
  • sloc: ruby: 398,155; java: 169,506; yacc: 3,782; xml: 2,469; ansic: 415; sh: 279; makefile: 78; tcl: 40
file content (110 lines) | stat: -rwxr-xr-x 2,759 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/make -f

SOURCE_NAME := jruby
JRUBY_VERSION := $(shell pwd | perl -pe 's/.+-//')

DEST_DIR := $(CURDIR)/debian/$(SOURCE_NAME)

JRUBY_LIB_DIR := $(DEST_DIR)/usr/lib/$(SOURCE_NAME)
JRUBY_DOC_DIR := $(DEST_DIR)/usr/share/doc/$(SOURCE_NAME)

BUILD_TAR := $(shell echo dist/jruby-bin-*.tar.gz)
BUILD_CHEKSUM_MD5 := $(BUILD_TAR).md5
BUILD_CHEKSUM_SHA1 := $(BUILD_TAR).sha1

ANT := /usr/bin/ant
export JAVA_HOME := /usr/lib/jvm/default-java
export CLASSPATH := /usr/share/java/junit4.jar

JRUBY_MANPAGE := debian/jruby.1
JIRB_MANPAGE := debian/jirb.1

clean:
	dh_testdir
	dh_testroot

	# Add here commands to clean up after the build process.
	$(ANT) clean-all
	if [ -d dist ] ; then $(ANT) dist-clean ; fi
	rm -f $(BUILD_TAR) $(BUILD_CHEKSUM_SHA1) $(BUILD_CHEKSUM_MD5)
	rm -fr share bin/jruby

	rm -f build-stamp
	dh_clean 

build: build-stamp

build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	$(ANT) -Ddev.gems=false test
#	docbook-to-man $(JRUBY_DOCBOOK_MANPAGE) > $(JRUBY_MANPAGE)
#	docbook-to-man $(JIRB_DOCBOOK_MANPAGE) > $(JIRB_MANPAGE)

	touch build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_installdirs

	# Add here commands to install the package into debian/jruby
	$(ANT) dist-bin

	tar -zxf $(BUILD_TAR) --strip 1 -C $(JRUBY_LIB_DIR)
	# Remove all the bat/dll/exe files
	find $(JRUBY_LIB_DIR) -iregex '.*\.\(bat\|\|dll\|exe\)$$' | xargs rm -f
	# Remove all of the VCS directories
	find $(JRUBY_LIB_DIR) -name '.svn' | xargs rm -rf
	find $(JRUBY_LIB_DIR) -name '.git*' | xargs rm -rf
	# remove extra docs
	rm -fr $(JRUBY_LIB_DIR)/docs $(JRUBY_LIB_DIR)/COPYING* $(JRUBY_LIB_DIR)/LICENSE.RUBY
	# remove libjnidispatch.so, to keep the package 
	# architecture-independent; will put it in itw own
	# separate package later on, if need be.
	rm -fr $(JRUBY_LIB_DIR)/lib/native

# Build architecture-independent files here.
binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs docs/ COPYING* README
	rm -fr $(JRUBY_LIB_DIR)/docs $(JRUBY_LIB_DIR)/COPYING*
	find $(JRUBY_DOC_DIR) -regex '.*/\(COPYING\|LICEN[CS]E\).*' | xargs rm -fr
	dh_installexamples
	# Remove all empty directories
	find $(DEST_DIR) -depth -follow -type d -empty -delete
#	dh_install
#	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
#	dh_installcron
#	dh_installinfo
	dh_installman
	dh_link
#	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
#	dh_python
#	dh_makeshlibs
	dh_lintian
	dh_installdeb
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch:
	# We have nothing to do by default.

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install