File: rules

package info (click to toggle)
ruby-defaults 1%3A3.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116 kB
  • sloc: ruby: 81; sh: 77; makefile: 30
file content (43 lines) | stat: -rwxr-xr-x 1,323 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
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=3.3
export DEBIAN_RUBY_PROGRAMS = \
  erb \
  irb \
  rdbg \
  rdoc \
  ri \
  ruby
export SUPPORTED_API_VERSIONS = $(shell sed -e '/api_version:/!d; s/[^0-9\.]//g ' ruby_debian_dev.rb)

%:
	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

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
	for version in $(SUPPORTED_API_VERSIONS); do \
		dh_link -pruby-all-dev \
			/usr/lib/$(DEB_HOST_MULTIARCH)/ruby/$${version}/rbconfig.rb \
			/usr/lib/$(DEB_HOST_MULTIARCH)/ruby-crossbuild/$${version}/rbconfig.rb; \
		done