#!/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