File: rules

package info (click to toggle)
wdm 1.28-20
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,740 kB
  • ctags: 1,576
  • sloc: ansic: 11,439; sh: 979; makefile: 376; perl: 28; cpp: 10
file content (79 lines) | stat: -rwxr-xr-x 2,414 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# GNU copyright 1998, 1999 Marcelo Magallon <mmagallo@debian.org>
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

WDM_SYSCONF_DIR        := /etc/X11
WDM_CONF_DIR           := $(WDM_SYSCONF_DIR)/wdm
WDM_CONFIG_FILE        := wdm-config
WDM_CONF_FILE          := debian/config/$(WDM_CONFIG_FILE)

DEF_WDM_CONFIG_PATH    := $(WDM_CONF_DIR)/$(WDM_CONFIG_FILE)
DEF_DEBIAN_SYSTEM_PATH := $(shell grep systemPath: $(WDM_CONF_FILE) | cut -d : -f 2- | tr -d [:blank:])
DEF_DEBIAN_USER_PATH   := $(shell grep userPath: $(WDM_CONF_FILE) | cut -d : -f 2- | tr -d [:blank:])
DEF_DEBIAN_CHOOSER     := /usr/lib/X11/xdm/chooser
DEF_DEBIAN_AUTH_DIR    := /var/lib/wdm
DEF_DEBIAN_PAM_PATH    := /etc/pam.d

WDM_BUILD_DIR          := $(shell pwd)/debian/wdm

# wdm build structure is ancient and links against unneeded libs.
# Make sure this does not happen.
LDFLAGS            := $(shell dpkg-buildflags --get LDFLAGS)
LDFLAGS            += -Wl,--as-needed

export LDFLAGS

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	  --datadir=/usr/share \
	  --sysconfdir=$(WDM_SYSCONF_DIR) \
	  --localstatedir=/var/lib/wdm \
	  --with-gfxdir=/usr/share/pixmaps \
	  --enable-shadow \
	  --enable-pam \
	  --enable-aafont \
	  --with-pamdir=$(DEF_DEBIAN_PAM_PATH) \
	  --enable-selinux \
	  --with-wdmdir=$(WDM_CONF_DIR) \
	  --with-defuserpath=$(DEF_DEBIAN_USER_PATH) \
	  --with-defsystempath=$(DEF_DEBIAN_SYSTEM_PATH) \
	  --with-nlsdir=/usr/share/locale \
	  --enable-exitlogin
	sed \
	  -e '/DEF_CHOOSER/     s|".*"|"$(DEF_DEBIAN_CHOOSER)"|' \
	  -e '/DEF_AUTH_DIR/    s|".*"|"$(DEF_DEBIAN_AUTH_DIR)"|' \
	  -e '/DEF_XDM_CONFIG/  s|".*"|"$(DEF_WDM_CONFIG_PATH)"|' \
	  -i include/config.h

override_dh_clean:
	debconf-updatepo
	dh_clean -Xconfigs/Xsession.orig

override_dh_prep:
	dh_prep -Xconfigs/Xsession.orig

override_dh_installinit:
	dh_installinit --noscripts

override_dh_installman:
	cp doc/wdm.man debian/man/wdm.1x
	cp doc/wdmLogin.man debian/man/wdmLogin.1x
	dh_installman

override_dh_auto_install:
	$(MAKE) install-nls-yes DESTDIR=$(WDM_BUILD_DIR)

override_dh_fixperms:
	dh_fixperms
	chmod 600 \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/wdm-config