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
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CFLAGS_MAINT_APPEND=-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
ROOT := $(CURDIR)/debian/screen
ROOT_UDEB := $(CURDIR)/debian/screen-udeb
TTYGROUP := 5
SCREEN_CONFIGURE=--with-socket-dir=/run/screen \
--with-pty-mode=0620 \
--with-pty-group=${TTYGROUP} \
--enable-rxvt_osc \
--with-sys-screenrc=/etc/screenrc \
--enable-colors256 \
--enable-telnet \
--enable-use-locale
%:
dh $@
override_dh_auto_clean:
rm -rf build build-udeb
override_dh_auto_configure:
dh_auto_configure -B build -- $(SCREEN_CONFIGURE) --enable-pam --enable-utempter
dh_auto_configure -B build-udeb -- $(SCREEN_CONFIGURE)
cd build; grep -q "define.*NAMEDPIPE.*1" config.h || echo "#define NAMEDPIPE 1" >> config.h
cd build-udeb; grep -q "define.*NAMEDPIPE.*1" config.h || echo "#define NAMEDPIPE 1" >> config.h
override_dh_auto_build:
dh_auto_build --builddirectory build
dh_auto_build --builddirectory build-udeb
dh_auto_build --sourcedirectory build/doc
override_dh_auto_install:
cd build; $(MAKE) prefix=$(ROOT)/usr SCREENENCODINGS='$$(prefix)/share/screen/utf8encodings' installdirs install_bin
cd build-udeb; $(MAKE) prefix=$(ROOT_UDEB)/usr SCREENENCODINGS='$$(prefix)/share/screen/utf8encodings' installdirs install_bin
rm -f $(ROOT)/usr/bin/screen $(ROOT_UDEB)/usr/bin/screen
mv -f $(ROOT)/usr/bin/screen* $(ROOT)/usr/bin/screen
mv -f $(ROOT_UDEB)/usr/bin/screen* $(ROOT_UDEB)/usr/bin/screen
chown root:utmp $(ROOT_UDEB)/usr/bin/screen
chmod 2755 $(ROOT_UDEB)/usr/bin/screen
chmod 755 $(ROOT)/usr/bin/screen
rm -f $(ROOT)/usr/share/info/dir*
rm -rf $(ROOT_UDEB)/usr/share/info $(ROOT_UDEB)/usr/share/man
override_dh_installinit:
dh_installinit --no-start --init-script=screen-cleanup
override_dh_installsystemd:
dh_installsystemd --name=screen-cleanup
override_dh_fixperms:
dh_fixperms -X/usr/bin/screen
override_dh_strip:
dh_strip --dbgsym-migration=screen-dbg
|