File: rules

package info (click to toggle)
ruby-defaults 1:2.5.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 128 kB
  • sloc: sh: 83; ruby: 77; makefile: 24
file content (38 lines) | stat: -rwxr-xr-x 1,027 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

# XXX remember to regenerate debian/ruby.postinst when you change either of
# these variables.
#
# $ debian/rules debian/ruby.postinst
#
export DEBIAN_DEFAULT_RUBY_VERSION=2.5
export DEBIAN_RUBY_PROGRAMS = \
  erb \
  gem \
  irb \
  rdoc \
  ri \
  ruby

%:
	dh $@

override_dh_auto_configure:
	debian/version-check "$(DEB_VERSION)" "$(DEBIAN_DEFAULT_RUBY_VERSION)"
	dh_auto_configure

debian/ruby.postinst: debian/ruby.postinst.in
	sed -e 's/@@DEBIAN_DEFAULT_RUBY_VERSION@@/$(DEBIAN_DEFAULT_RUBY_VERSION)/g; s/@@DEBIAN_RUBY_PROGRAMS@@/$(DEBIAN_RUBY_PROGRAMS)/g' $< > $@ || ($(RM) $@; false)

override_dh_gencontrol:
	./debian/ruby-all-dev-depends >> debian/ruby-all-dev.substvars
	dh_gencontrol

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_install-arch:
	dh_auto_install
	dh_link -pruby-dev /usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/ruby-$(DEBIAN_DEFAULT_RUBY_VERSION).pc \
		/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/ruby.pc