File: rules

package info (click to toggle)
jruby1.0 1.0.2-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 28,004 kB
  • ctags: 33,860
  • sloc: ruby: 166,858; java: 90,218; yacc: 1,572; xml: 708; sh: 700; makefile: 53; ansic: 19
file content (110 lines) | stat: -rwxr-xr-x 2,842 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
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

# -*- makefile -*- Sample debian/rules that uses debhelper.  This file
# was originally written by Joey Hess and Craig Small.  As a special
# exception, when this file is copied by dh-make into a dh-make output
# file, you may use that output file without restriction.  This
# special exception was added by Craig Small in version 0.37 of
# dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

JRUBY_VERSION = $(shell dpkg-parsechangelog | awk '/^Version/{gsub(/-.*/, "", $$2);print $$2}')
DEST_DIR = $(CURDIR)/debian/jruby1.0

BUILD_TAR = jruby-bin-1.0.2.tar.gz
BUILD_ZIP = jruby-bin-1.0.2.zip
ANT = /usr/bin/ant

JRUBY_MANPAGE = debian/jruby1.0.1
#JRUBY_DOCBOOK_MANPAGE = debian/jruby0.9.sgml
JIRB_MANPAGE = debian/jirb1.0.1
#JIRB_DOCBOOK_MANPAGE = debian/jirb0.9.1.sgml

build: build-stamp

build-stamp: patch
	dh_testdir

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

	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
#	rm -f $(JRUBY_MANPAGE) $(JIRB_MANPAGE)
	rm -f $(BUILD_ZIP)
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	$(ANT) clean
	if [ -d dist ] ; then $(ANT) dist-clean ; fi
	rm -f ${BUILD_TAR}
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

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

	tar -zxf $(BUILD_TAR) --strip 1 -C $(DEST_DIR)/usr/lib//jruby1.0
	# Remove all of the bat files
	find $(DEST_DIR)/usr/lib/jruby1.0 -name '*.bat' | xargs rm -f
	# Remove all of the svn directories
	find $(DEST_DIR)/usr/lib/jruby1.0 -name '.svn' | xargs rm -rf
	# remove extra docs
	rm -fr $(DEST_DIR)/usr/lib/jruby1.0/docs
	rm -fr $(DEST_DIR)/usr/lib/jruby1.0/COPYING*

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs --exclude api docs/ COPYING* README
	rm -fr $(DEST_DIR)/usr/lib/jruby1.0/docs
	rm -fr $(DEST_DIR)/usr/lib/jruby1.0/COPYING*
	find $(DEST_DIR)/usr/share/doc/jruby1.0 -regex '.*/\(COPYING\|LICEN[CS]E\).*' | xargs rm -fr
	dh_installexamples
#	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_installdeb
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

binary: binary-indep binary-arch

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