7
7
# Uncomment me to turn on debugging
10
# the debhelper compatability version
15
ROOT = $(shell pwd)/debian/$(package)
11
ROOT := $(CURDIR)/debian/$(package)
17
12
# statically define this... sucko
18
rm -f configure-stamp build-stamp
19
test ! -s doc/Makefile || $(MAKE) -C doc realclean
20
test ! -s Makefile || ! grep -q clean Makefile || $(MAKE) realclean
21
rm -f config.log config.status Makefile
25
configure: configure-stamp
22
29
./configure --prefix=/usr \
23
30
--infodir='$$(prefix)/share/info' \
24
31
--mandir='$$(prefix)/share/man' \
29
36
--enable-rxvt_osc \
30
37
--with-sys-screenrc=/etc/screenrc \
39
# Assert the use of fifos instead of sockets
40
grep -q "define.*NAMEDPIPE.*1" config.h
35
build-stamp: configure-stamp
44
build-stamp: configure
37
$(MAKE) CFLAGS+='-O2 -g -Wall'
38
for file in doc/screen.texinfo doc/screen.1 ; do \
39
sed -f debian/mod_docs.sed $${file} > $${file}.new && \
40
mv $${file}.new $${file} ; \
46
$(MAKE) CFLAGS+='-O2 -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers'
47
$(MAKE) CFLAGS+='-O2 -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' -C doc
47
rm -f configure-stamp build-stamp
48
# clean up after the build process
58
55
# can't call the normal install target b/c it installs the info files
60
57
$(MAKE) prefix=$(ROOT)/usr SCREENENCODINGS='$$(prefix)/share/screen/utf8encodings' installdirs install_bin
61
58
# install the debian screenrc to etc
62
59
install -m 644 debian/screenrc $(ROOT)/etc
63
# hack around the fact that the install target makes screen a symlink
64
# to screen-$(VERSION)
60
# hack around the fact that the install target makes screen a symlink to screen-$$(VERSION)
65
61
rm -f $(ROOT)/usr/bin/screen
66
62
mv -f $(ROOT)/usr/bin/screen* $(ROOT)/usr/bin/screen
67
63
# make it setgid utmp
68
64
chown root:utmp $(ROOT)/usr/bin/screen
69
65
chmod 2755 $(ROOT)/usr/bin/screen
70
chown root:utmp $(ROOT)/var/run/screen
71
chmod 775 $(ROOT)/var/run/screen
72
66
# lintian overrides for the setgid bin etc
73
67
install -m 755 -d $(ROOT)/usr/share/lintian/overrides
74
68
install -m 644 debian/screen.lintian.overrides $(ROOT)/usr/share/lintian/overrides/screen
75
# cheat a little here and copy the README.terminfo into the terminfo
76
# dir for dh_installdocs to pick up later
77
install -m 644 debian/README.terminfo terminfo
79
71
binary-indep: build install
83
72
binary-arch: build install
76
cp debian/README.terminfo $(ROOT)/usr/share/doc/screen/terminfo/
89
78
dh_installman || true
91
80
dh_installchangelogs -k patchlevel.h
92
dh_installinit --no-start --update-rcd-params='start 70 S .'
81
dh_installinit --no-start --init-script='screen-cleanup' --update-rcd-params='start 70 S .'
95
dh_fixperms -X/usr/bin/screen -X/var/run/screen
84
dh_fixperms -X/usr/bin/screen
102
.PHONY: build clean binary-indep binary-arch binary install
91
.PHONY: configure build clean binary-indep binary-arch binary install