~ubuntu-branches/ubuntu/trusty/screen/trusty-backports

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-10-23 17:36:30 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20071023173630-6q4agogsxuzujhwd
Tags: 4.0.3-7ubuntu1
* Merge with Debian; remaining Ubuntu changes:
  - 07_norootpassword.dpatch: When locking a root-owned screen, check that
    root has a password set. If not, ask for an unlocking key. (LP#6760)
  - debian/preinst: Remove obsolete init script 'screen' on
    upgrades. The script is called 'screen-cleanup' in Debian and thus
    should be called the same in Ubuntu to avoid a permanent and pointless
    delta. This needs to be kept until after the next LTS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# Uncomment me to turn on debugging
8
8
#export DH_VERBOSE=1
9
9
 
10
 
# the debhelper compatability version
11
 
export DH_COMPAT=3
12
 
 
13
 
package = screen
14
 
 
15
 
ROOT = $(shell pwd)/debian/$(package)
16
 
 
 
10
package := screen
 
11
ROOT := $(CURDIR)/debian/$(package)
17
12
# statically define this... sucko
18
 
TTYGROUP = 5
19
 
 
 
13
TTYGROUP := 5
 
14
 
 
15
clean:
 
16
        dh_testdir
 
17
        dh_testroot
 
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
 
22
        dpatch deapply-all
 
23
        dh_clean
 
24
 
 
25
configure: configure-stamp
20
26
configure-stamp:
21
27
        dh_testdir
 
28
        dpatch apply-all
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 \
31
38
                    --enable-colors256
 
39
        # Assert the use of fifos instead of sockets
 
40
        grep -q "define.*NAMEDPIPE.*1" config.h
32
41
        touch $@
33
42
 
34
43
build: build-stamp
35
 
build-stamp: configure-stamp
 
44
build-stamp: configure
36
45
        dh_testdir
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} ; \
41
 
        done
 
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
42
48
        touch $@
43
49
 
44
 
clean:
45
 
        dh_testdir
46
 
        dh_testroot
47
 
        rm -f configure-stamp build-stamp
48
 
        # clean up after the build process
49
 
        -$(MAKE) clean
50
 
        rm -rf config.status
51
 
        dh_clean
52
 
 
53
50
install: build
54
51
        dh_testdir
55
52
        dh_testroot
56
 
        dh_clean -k
 
53
        dh_clean
57
54
        dh_installdirs
58
55
        # can't call the normal install target b/c it installs the info files
59
56
        # and other crud
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
78
69
 
 
70
binary: binary-arch
79
71
binary-indep: build install
80
 
 
81
 
binary: binary-arch
82
 
 
83
72
binary-arch: build install
84
73
        dh_testdir
85
74
        dh_testroot
86
 
        dh_installdebconf
87
75
        dh_installdocs
 
76
        cp debian/README.terminfo $(ROOT)/usr/share/doc/screen/terminfo/
88
77
        dh_installexamples
89
78
        dh_installman || true
90
79
        dh_installinfo
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 .'
93
82
        dh_strip
94
83
        dh_compress
95
 
        dh_fixperms -X/usr/bin/screen -X/var/run/screen
 
84
        dh_fixperms -X/usr/bin/screen
96
85
        dh_installdeb
97
86
        dh_shlibdeps
98
87
        dh_gencontrol
99
88
        dh_md5sums
100
89
        dh_builddeb
101
90
 
102
 
.PHONY: build clean binary-indep binary-arch binary install
 
91
.PHONY: configure build clean binary-indep binary-arch binary install