File: rules

package info (click to toggle)
wdm 1.28-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,108 kB
  • ctags: 1,140
  • sloc: ansic: 11,448; sh: 1,431; makefile: 441; perl: 29; cpp: 10
file content (153 lines) | stat: -rwxr-xr-x 4,678 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/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

DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
DEB_BUILD_ARCH_OS_kfreebsd = 1
endif

WDM_PREFIX             := /usr
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)
WDM_BIN_DIR            := $(WDM_PREFIX)/bin

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/X11R6/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

INSTALL_PROGRAM        := install -m 0755
INSTALL_REGFILE        := install -m 0644

build: build-stamp
build-stamp: config-stamp
	dh_testdir
	make
	touch build-stamp

config-stamp: patch
	dh_testdir
	# touch configure because it is modified by .diff.gz
	touch configure
	./configure \
	  --prefix=$(WDM_PREFIX) \
	  --datadir=/usr/share \
	  --sysconfdir=$(WDM_SYSCONF_DIR) \
	  --localstatedir=/var/lib/wdm \
	  --with-gfx-incs="/usr/X11R6/include" \
	  --with-gfx-libs="/usr/X11R6/lib -ltiff -lXpm -lpng -lz -ljpeg -lWINGs -lwraster" \
	  --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)"|' \
	  < include/config.h > include/config.h.debian
	mv include/config.h.debian include/config.h
	touch config-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	-rm -f *-stamp debian/conffiles
	rm -f po/*.mo
	[ ! -f Makefile ] || $(MAKE) distclean
	debconf-updatepo

	dh_clean -Xconfigs/Xsession.orig

install-stamp: build-stamp
	dh_testdir
	dh_clean -k -Xconfigs/Xsession.orig
	dh_installdirs
	$(INSTALL_PROGRAM) bin/wdm                   \
	  $(WDM_BUILD_DIR)/$(WDM_BIN_DIR)
	$(INSTALL_PROGRAM) bin/wdmLogin              \
	  $(WDM_BUILD_DIR)/$(WDM_BIN_DIR)

	dh_installpam
# if I use debian/config/* I cannot build this on a CVS checked-out tree
	for config_file in `find debian/config -type f | grep -v /CVS/` ; do \
	  $(INSTALL_REGFILE) $$config_file $(WDM_BUILD_DIR)/$(WDM_CONF_DIR) ; \
	done
	chmod a+rx,u+w \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xreset \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xreset_0 \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xsession \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xsetup \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xsetup_0 \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xstartup \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/Xstartup_0
	dh_installinit --noscripts
	dh_installlogrotate
	$(INSTALL_PROGRAM) debian/update_wdm_wmlist \
	  $(WDM_BUILD_DIR)/usr/sbin/update_wdm_wmlist
	$(INSTALL_REGFILE) pixmaps/*.xpm pixmaps/*.jpg \
	  $(WDM_BUILD_DIR)/usr/share/pixmaps/
	$(INSTALL_REGFILE) debian/*.xpm $(WDM_BUILD_DIR)/usr/share/pixmaps/
	dh_installdocs
	dh_installdebconf
	cp debian/lintian.overrides $(WDM_BUILD_DIR)/usr/share/lintian/overrides/wdm
	cp doc/wdm.man debian/man/wdm.1x
	cp doc/wdmLogin.man debian/man/wdmLogin.1x
	dh_installman
	$(MAKE) install-nls-yes DESTDIR=$(WDM_BUILD_DIR)
	dh_installchangelogs ChangeLog
	touch install-stamp

binary-indep: build
# nothing to do here

binary-arch: build install-stamp
	dh_testdir
	dh_testroot
	dh_strip
	dh_compress
	dh_fixperms
	chmod 600 \
	  $(WDM_BUILD_DIR)/$(WDM_CONF_DIR)/wdm-config
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

patch: patch-stamp
patch-stamp:
	dpatch apply-all
	dpatch cat-all >patch-stamp
	touch patch-stamp

unpatch:
	dpatch deapply-all

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary patch unpatch

# Local variables:
# mode: makefile
# mode: font-lock
# End: