File: rules

package info (click to toggle)
libgettext-ruby 1.7.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,892 kB
  • ctags: 1,198
  • sloc: ruby: 6,738; ansic: 67; makefile: 38; sql: 14; sh: 6
file content (49 lines) | stat: -rwxr-xr-x 2,017 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/langcore.mk

DEB_INSTALL_MANPAGES_libgettext-ruby-util = debian/rgettext.1 debian/rmsgfmt.1 debian/rmsgmerge.1

RUBY_CONFIG=ruby1.8 -rrbconfig -e
RUBY_VERSION=`$(RUBY_CONFIG) "RbConfig::CONFIG['ruby_version']"`
RUBY_ARCH=`$(RUBY_CONFIG) "print RbConfig::CONFIG['arch']"`
CUR_PKGDIR=$(CURDIR)/debian/$(cdbs_curpkg)

clean::
	-ruby1.8 setup.rb distclean 
	-rm -f ext/gettext/Makefile \
		ext/gettext/mkmf.log
	-for f in bin/*; do \
	  ruby1.8 -i -npe '$$. == 1 && /^#!/ and $$_="#! /usr/bin/ruby\n"' $$f; \
	done

install/libgettext-ruby-util::
	-ruby1.8 setup.rb distclean
	ruby1.8 setup.rb config \
		--prefix=$(CUR_PKGDIR)/usr \
                --siteruby=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['rubylibdir']"` \
                --siterubyver=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['rubylibdir']"` \
                --siterubyverarch=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['archdir']"`
	ruby1.8 setup.rb setup
	ruby1.8 setup.rb install
	rm -r $(CUR_PKGDIR)/usr/lib
	rm $(CUR_PKGDIR)/usr/share/locale/*/*/rails.mo
	#for f in $(CURDIR)/debian/$(cdbs_curpkg)/usr/bin/*; do \
	#  ruby1.8 -i -npe '$$. == 1 && /^#!/ and $$_="#!/usr/bin/ruby1.8\n"' $$f; \
	#done

install/libgettext-ruby1.8::
	-ruby1.8 setup.rb distclean
	ruby1.8 setup.rb config \
                --prefix=$(CURDIR)/debian/$(cdbs_curpkg)/usr \
                --siteruby=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['rubylibdir']"` \
                --siterubyver=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['rubylibdir']"` \
                --siterubyverarch=$(CUR_PKGDIR)/`$(RUBY_CONFIG) "print RbConfig::CONFIG['archdir']"`
	ruby1.8 setup.rb setup
	ruby1.8 setup.rb install
	rm -r $(CUR_PKGDIR)/usr/bin
	rm $(CUR_PKGDIR)/usr/share/locale/*/*/rgettext.mo

binary-fixup/libgettext-ruby1.8::
	find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/examples -type f | xargs chmod -x