File: rules

package info (click to toggle)
rails 2.3.5-1.2%2Bsqueeze8
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 18,248 kB
  • ctags: 20,944
  • sloc: ruby: 122,413; makefile: 72; sql: 43; sh: 1
file content (121 lines) | stat: -rwxr-xr-x 5,571 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
111
112
113
114
115
116
117
118
119
120
121
#!/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


configure:

build: build-stamp

build-stamp:
	# Generate documentation
	mkdir build
	cd railties; RAILS_PKG_DESTINATION="`pwd`/../build" rake fresh_rails
	cp -r railties/configs/databases build/config
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	dh_clean 
	rm -rf build build-stamp configure-stamp

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install

	# Copy HTML documentation
	cp -r build/doc/api debian/rails-doc/usr/share/doc/rails-doc/html

	# Install railties
	cp -r railties debian/rails-ruby1.8/usr/share/rails-ruby1.8/
	for i in `find debian/rails-ruby1.8/usr/share/rails-ruby1.8 -type f`; do chown root:root $$i; chmod 0644 $$i; done
	for i in `find debian/rails-ruby1.8/usr/share/rails-ruby1.8 -type d`; do chown root:root $$i; done
	ln -s ../../rails-ruby1.8/railties/CHANGELOG debian/rails/usr-ruby1.8/share/doc/rails/changelog; \
	ln -s ../../rails-ruby1.8/railties/README    debian/rails-ruby1.8/usr/share/doc/rails/README.railties; \
	rm -f debian/rails-ruby1.8/usr/share/rails-ruby1.8/railties/MIT-LICENSE;
	rm -r debian/rails-ruby1.8/usr/share/rails-ruby1.8/railties/guides   # Remove guides
	
	# link to Debian's prototype.js instead of upstream's
	rm debian/rails-ruby1.8/usr/share/rails-ruby1.8/railties/html/javascripts/prototype.js
	ln -s /usr/share/javascript/prototype/prototype.js debian/rails-ruby1.8/usr/share/rails-ruby1.8/railties/html/javascripts/prototype.js

	# Remove some upstream provided libraries as we depend on Debian's packaged versions now
	# instead of bundled stuff
	rm -r debian/libactivesupport-ruby1.8/usr/lib/ruby/1.8/active_support/vendor/builder-2.1.2
	rm -r debian/libactivesupport-ruby1.8/usr/lib/ruby/1.8/active_support/vendor/i18n-0.1.3
	rm -r debian/libactivesupport-ruby1.8/usr/lib/ruby/1.8/active_support/vendor/memcache-client-1.7.4
	rm -r debian/libactivesupport-ruby1.8/usr/lib/ruby/1.8/active_support/vendor/tzinfo-0.3.12
	rmdir debian/libactivesupport-ruby1.8/usr/lib/ruby/1.8/active_support/vendor

	rm -r debian/libactivesupport-ruby1.9.1/usr/lib/ruby/1.9.1/active_support/vendor/builder-2.1.2
	rm -r debian/libactivesupport-ruby1.9.1/usr/lib/ruby/1.9.1/active_support/vendor/i18n-0.1.3
	rm -r debian/libactivesupport-ruby1.9.1/usr/lib/ruby/1.9.1/active_support/vendor/memcache-client-1.7.4
	rm -r debian/libactivesupport-ruby1.9.1/usr/lib/ruby/1.9.1/active_support/vendor/tzinfo-0.3.12
	rmdir debian/libactivesupport-ruby1.9.1/usr/lib/ruby/1.9.1/active_support/vendor


	rm -r debian/libactionmailer-ruby1.8/usr/lib/ruby/1.8/action_mailer/vendor/text-format-0.6.3
	rm -r debian/libactionmailer-ruby1.8/usr/lib/ruby/1.8/action_mailer/vendor/tmail-1.2.3
	rm debian/libactionmailer-ruby1.8/usr/lib/ruby/1.8/action_mailer/vendor/text_format.rb
	rm debian/libactionmailer-ruby1.8/usr/lib/ruby/1.8/action_mailer/vendor/tmail.rb
	rmdir debian/libactionmailer-ruby1.8/usr/lib/ruby/1.8/action_mailer/vendor

	# rm -r debian/libactionmailer-ruby1.9.1/usr/lib/ruby/1.8/action_mailer/vendor/text-format-0.6.3
	# rm -r debian/libactionmailer-ruby1.9.1/usr/lib/ruby/1.8/action_mailer/vendor/tmail-1.2.3
	# rm debian/libactionmailer-ruby1.9.1/usr/lib/ruby/1.8/action_mailer/vendor/text_format.rb
	# rm debian/libactionmailer-ruby1.9.1/usr/lib/ruby/1.8/action_mailer/vendor/tmail.rb
	# rmdir debian/libactionmailer-ruby1.9.1/usr/lib/ruby/1.8/action_mailer/vendor

	# remove some Git files from installation
	find debian/rails-ruby1.8/usr -type f -regex '.*\/\.gitignore$$' -delete

	# no-executables in in ruby directories, or group/world writable files
	find . -path './debian/*/usr/lib/ruby/*' -name '*.rb' -perm /133 -exec chmod 644 {} +

	# install changelogs - dh_install cannot rename these changelogs to lowercase
	# so we do this manually
	install -m 0644 actionmailer/CHANGELOG debian/libactionmailer-ruby1.8/usr/share/doc/libactionmailer-ruby1.8/changelog
	install -m 0644 actionpack/CHANGELOG debian/libactionpack-ruby1.8/usr/share/doc/libactionpack-ruby1.8/changelog
	install -m 0644 activerecord/CHANGELOG debian/libactiverecord-ruby1.8/usr/share/doc/libactiverecord-ruby1.8/changelog
	install -m 0644 activesupport/CHANGELOG debian/libactivesupport-ruby1.8/usr/share/doc/libactivesupport-ruby1.8/changelog
	install -m 0644 activeresource/CHANGELOG debian/libactiveresource-ruby1.8/usr/share/doc/libactiveresource-ruby1.8/changelog
	install -m 0644 railties/CHANGELOG debian/rails-ruby1.8/usr/share/doc/rails-ruby1.8/changelog

	install -m 0644 activerecord/CHANGELOG debian/libactiverecord-ruby1.9.1/usr/share/doc/libactiverecord-ruby1.9.1/changelog
	install -m 0644 activesupport/CHANGELOG debian/libactivesupport-ruby1.9.1/usr/share/doc/libactivesupport-ruby1.9.1/changelog


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installman
	dh_lintian
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb -- -Z bzip2

# Build architecture-dependent files here.
binary-arch: build install

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