File: rules

package info (click to toggle)
pdsh 2.35-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,996 kB
  • sloc: ansic: 12,431; sh: 6,838; makefile: 400; perl: 163
file content (61 lines) | stat: -rwxr-xr-x 2,067 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
#!/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


# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
    CONFIG_FLAGS += --enable-debug
endif

%:
	dh $@

override_dh_auto_configure:
	# Add here commands to configure the package.
	CFLAGS="$(CFLAGS) -Wl,-z,defs"
	dh_auto_configure -- \
			--with-ssh \
			--with-genders \
			--with-readline \
			--without-rsh \
			--prefix=/usr \
			--mandir=\$${prefix}/share/man \
                        --infodir=\$${prefix}/share/info \
                        $(CONFIG_FLAGS)

MODULE_DIRS := src/modules/.libs tests/test-modules/.libs
override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	# Clean up directory
	rm -f $(CURDIR)/debian/pdsh/usr/lib/**/pdsh/*.a
	rm -f $(CURDIR)/debian/pdsh/usr/lib/**/pdsh/*.la

	# Install pdsh script
	mv $(CURDIR)/debian/pdsh/usr/bin/pdsh $(CURDIR)/debian/pdsh/usr/bin/pdsh.bin
	cp $(CURDIR)/debian/pdsh.script $(CURDIR)/debian/pdsh/usr/bin/pdsh
	chmod 755 $(CURDIR)/debian/pdsh/usr/bin/pdsh
	rm -f $(CURDIR)/debian/pdsh/usr/bin/pdcp
	cp $(CURDIR)/debian/pdcp.script $(CURDIR)/debian/pdsh/usr/bin/pdcp
	chmod 755 $(CURDIR)/debian/pdsh/usr/bin/pdcp
	rm -f $(CURDIR)/debian/pdsh/usr/bin/rpdcp
	cp $(CURDIR)/debian/rpdcp.script $(CURDIR)/debian/pdsh/usr/bin/rpdcp
	chmod 755 $(CURDIR)/debian/pdsh/usr/bin/rpdcp

override_dh_auto_clean:
	rm -f debian/module-dirs.tar
	find . -name .libs -type l -exec rm {} \;
	dh_auto_clean