~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Jerome Marant
  • Date: 2002-03-23 13:06:05 UTC
  • Revision ID: james.westby@ubuntu.com-20020323130605-qvzaillwdk3j8x24
Tags: 1.0.9.2-7
* Integrated more fixes from Julien Lemoine:
  - Improved again window position patch.
    Closes: Bug#138784, Bug#126214.
  - Improved patch fixing taskbar display in hide mode. Closes: Bug#139426.
  - Fixed non-functional logout entry in icewm-lite. Closes: Bug#130466.
* Applied patch from Rob Funk fixing the broken POP3 mailcheck with
  some servers. Closes: Bug#139401.
* Applied patch removing src/.targets when cleaning so targets are
  calculated for each icewm flavour. Closes: Bug#139370.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# -*- Mode: makefile -*-
 
3
 
 
4
#DH_VERBOSE=1
 
5
 
 
6
export DH_COMPAT=3
 
7
 
 
8
ICEWM_COMMON=$(shell pwd)/debian/icewm-common
 
9
ICEWM=$(shell pwd)/debian/icewm
 
10
ICEWM_GNOME=$(shell pwd)/debian/icewm-gnome
 
11
ICEWM_LITE=$(shell pwd)/debian/icewm-lite
 
12
ICEWM_EXP=$(shell pwd)/debian/icewm-experimental
 
13
 
 
14
# Patch list: debian/patches contains all patches
 
15
# in the dpatch format.
 
16
debian_patches=package_build_fixes\
 
17
               menu_custom\
 
18
               taskbar_custom\
 
19
               toolbar_custom\
 
20
               fontpath_fix\
 
21
               network_load_incator_fix\
 
22
               geometry_option_winoptions_fix\
 
23
               traydrawbevel_fix\
 
24
               window_position_fix\
 
25
               catalan_translation\
 
26
               taskbar_hide_mode\
 
27
               icewm-lite_logout\
 
28
               pop3_mailcheck
 
29
 
 
30
build:  build-stamp
 
31
 
 
32
build-stamp: patched-stamp
 
33
        dh_testdir
 
34
 
 
35
        # Make gnome-experimental
 
36
        ./configure --with-gnome-menus --with-imlib \
 
37
                --prefix=/usr/X11R6 --sysconfdir=/etc --datadir=/usr/share \
 
38
                --disable-debug --enable-i18n --enable-nls \
 
39
                --enable-movesize-fx --enable-antialiasing --enable-xfreetype \
 
40
                --enable-gradients --enable-shaped-decorations
 
41
        make EXEEXT=-experimental && make srcclean
 
42
 
 
43
        # Make icewm-gnome
 
44
        ./configure --with-gnome-menus --with-imlib \
 
45
                --prefix=/usr/X11R6 --sysconfdir=/etc --datadir=/usr/share \
 
46
                --disable-debug --enable-i18n --enable-nls
 
47
        make EXEEXT=-gnome && make srcclean
 
48
 
 
49
        # Make icewm-lite
 
50
        make distclean
 
51
        ./configure --without-gnome-menus --with-xpm --prefix=/usr/X11R6 \
 
52
                --sysconfdir=/etc --datadir=/usr/share --disable-debug \
 
53
                --enable-i18n --enable-nls --enable-lite
 
54
        make EXEEXT=-lite && make srcclean
 
55
 
 
56
        # Make icewm
 
57
        make distclean
 
58
        ./configure --without-gnome-menus --with-imlib \
 
59
                --prefix=/usr/X11R6 \
 
60
                --sysconfdir=/etc --datadir=/usr/share --disable-debug \
 
61
                --enable-i18n --enable-nls
 
62
        make
 
63
 
 
64
        # Generate the most exhaustive preference file, i.e. the one
 
65
        # from the experimental version.
 
66
        src/genpref-experimental > lib/preferences 
 
67
 
 
68
        touch build-stamp
 
69
 
 
70
clean: reverse-patches
 
71
        dh_testdir
 
72
        dh_testroot
 
73
 
 
74
        rm -f build-stamp
 
75
 
 
76
        make srcclean EXEEXT=-experimental
 
77
        make srcclean EXEEXT=-gnome
 
78
        make srcclean EXEEXT=-lite
 
79
        make distclean
 
80
 
 
81
        # Extra clean ups
 
82
        make -C po clean
 
83
        rm -f `find . -name "*~"`
 
84
 
 
85
        dh_clean
 
86
 
 
87
install: build
 
88
        dh_testdir
 
89
        dh_testroot
 
90
        dh_clean -k
 
91
        dh_installdirs
 
92
 
 
93
        # Install everything but documentation
 
94
        make install-base install-nls\
 
95
             prefix=$(ICEWM_COMMON)/usr/X11R6\
 
96
             sysconfdir=$(ICEWM_COMMON)/etc\
 
97
             datadir=$(ICEWM_COMMON)/usr/share
 
98
 
 
99
        # Install Mutt additional icons
 
100
        install -m 644 debian/mutt*.xpm $(ICEWM_COMMON)/usr/X11R6/lib/X11/icewm/icons
 
101
 
 
102
        # Add some links
 
103
        dh_link -picewm-common usr/X11R6/lib/X11/icewm/taskbar/debian.xpm usr/X11R6/lib/X11/icewm/taskbar/linux.xpm
 
104
        dh_link -picewm-common usr/X11R6/lib/X11/icewm/themes/gtk2 usr/X11R6/lib/X11/icewm/themes/gtk
 
105
 
 
106
        # Move files in the right package directory
 
107
        mv $(ICEWM_COMMON)/usr/X11R6/bin/* $(ICEWM)/usr/X11R6/bin
 
108
        rm -rf $(ICEWM_COMMON)/usr/X11R6/bin
 
109
        install -m 755 src/*-gnome $(ICEWM_GNOME)/usr/X11R6/bin
 
110
        install -m 755 src/*-lite $(ICEWM_LITE)/usr/X11R6/bin
 
111
        install -m 755 src/*-experimental $(ICEWM_EXP)/usr/X11R6/bin
 
112
 
 
113
        # Do some clean up
 
114
        rm debian/icewm*/usr/X11R6/bin/genpref*
 
115
 
 
116
        # Install documentation
 
117
        install -m 644 doc/*.html $(ICEWM_COMMON)/usr/share/doc/icewm-common/html
 
118
        install -m 644 doc/*.sgml $(ICEWM_COMMON)/usr/share/doc/icewm-common/sgml
 
119
 
 
120
        dh_installdocs
 
121
 
 
122
        # Remove doc directories since we will add links
 
123
        # to icewm-common instead.
 
124
        rm -rf $(ICEWM)/usr/share/doc/icewm
 
125
        rm -rf $(ICEWM_GNOME)/usr/share/doc/icewm-gnome
 
126
        rm -rf $(ICEWM_LITE)/usr/share/doc/icewm-lite
 
127
        rm -rf $(ICEWM_EXP)/usr/share/doc/icewm-experimental
 
128
 
 
129
binary-indep: build install
 
130
# There are no architecture-independent files to be uploaded
 
131
# generated by this package.  If there were any they would be
 
132
# made here.
 
133
 
 
134
binary-arch: build install
 
135
        dh_testdir
 
136
        dh_testroot
 
137
 
 
138
        dh_link -picewm usr/share/doc/icewm-common usr/share/doc/icewm
 
139
        dh_link -picewm-gnome usr/share/doc/icewm-common usr/share/doc/icewm-gnome
 
140
        dh_link -picewm-lite usr/share/doc/icewm-common usr/share/doc/icewm-lite
 
141
        dh_link -picewm-experimental usr/share/doc/icewm-common usr/share/doc/icewm-experimental
 
142
 
 
143
        dh_installmenu
 
144
        install -m 644 debian/icewm.1x $(ICEWM)/usr/X11R6/man/man1 
 
145
        install -m 644 debian/icewm.1x $(ICEWM_GNOME)/usr/X11R6/man/man1/icewm-gnome.1x
 
146
        install -m 644 debian/icewm.1x $(ICEWM_LITE)/usr/X11R6/man/man1/icewm-lite.1x
 
147
        install -m 644 debian/icewm.1x $(ICEWM_EXP)/usr/X11R6/man/man1/icewm-experimental.1x
 
148
 
 
149
        dh_installchangelogs -picewm-common CHANGES
 
150
 
 
151
        # Stop using dh_installwm until bug #85963 is fixed.
 
152
 
 
153
        #dh_installwm -picewm --priority=50 icewm
 
154
        #dh_installwm -picewm-gnome --priority=60 icewm-gnome
 
155
        #dh_installwm -picewm-lite --priority=40 icewm-lite
 
156
        #dh_installwm -picewm-experimental --priority=40 icewm-experimental
 
157
 
 
158
        # Install undocumented manpages
 
159
        for i in icehelp icewmbg icewmhint icesh; do\
 
160
                ln -s ../../../share/man/man7/undocumented.7.gz $(ICEWM)/usr/X11R6/man/man1/$$i.1x.gz;\
 
161
                ln -s ../../../share/man/man7/undocumented.7.gz $(ICEWM_GNOME)/usr/X11R6/man/man1/$$i-gnome.1x.gz;\
 
162
                ln -s ../../../share/man/man7/undocumented.7.gz $(ICEWM_LITE)/usr/X11R6/man/man1/$$i-lite.1x.gz;\
 
163
                ln -s ../../../share/man/man7/undocumented.7.gz $(ICEWM_EXP)/usr/X11R6/man/man1/$$i-experimental.1x.gz;\
 
164
        done
 
165
 
 
166
        dh_strip
 
167
        dh_compress
 
168
        dh_fixperms
 
169
        dh_installdeb
 
170
        dh_shlibdeps
 
171
        dh_gencontrol
 
172
        dh_md5sums
 
173
        dh_builddeb
 
174
 
 
175
# Below here is fairly generic really
 
176
 
 
177
binary: binary-indep binary-arch
 
178
 
 
179
.PHONY: binary binary-arch binary-indep clean checkroot
 
180
 
 
181
# ---------------------------------------------------------------------------
 
182
# Various rules to unpack addons and (un)apply patches.
 
183
# Borrowed from DBS
 
184
 
 
185
patch_dir       = debian/patches
 
186
 
 
187
apply-patches: patched-stamp
 
188
reverse-patches:
 
189
        @for stamp in none patched-*; do \
 
190
                case "$$stamp" in none|patched-stamp|patched-\*) continue; esac; \
 
191
                patch=`echo $$stamp | sed -e 's/patched-//'`; \
 
192
                echo "trying to revert patch $$patch ..."; \
 
193
                if [ -x $(patch_dir)/$$patch.dpatch ]; then true; else \
 
194
                        chmod +x $(patch_dir)/$$patch.dpatch; fi; \
 
195
                if $(patch_dir)/$$patch.dpatch -unpatch; then \
 
196
                        echo "reverted $$patch patch."; \
 
197
                        rm -f $$stamp; \
 
198
                else \
 
199
                        echo "error in reverting $$patch patch."; \
 
200
                        exit 1; \
 
201
                fi; \
 
202
        done
 
203
        @echo "Removing patched-stamp"
 
204
        @rm -f patched-stamp
 
205
 
 
206
patched-%: $(patch_dir)/%.dpatch
 
207
        @if [ -x $< ]; then true; else chmod +x $<; fi
 
208
        @if [ -f $@ ]; then \
 
209
                echo "$* patches already applied."; exit 1; \
 
210
        fi
 
211
        $< -patch
 
212
        @echo "$* patches applied." > $@
 
213
 
 
214
patched-stamp: $(foreach p,$(debian_patches),patched-$(p))
 
215
        @echo -e "\nPatches applied:" >> pxxx
 
216
        @for i in none $(debian_patches); do \
 
217
                if [ -r debian/patches/$$i.dpatch ]; then \
 
218
                        echo -e "\n$$i:" >> pxxx; \
 
219
                        sed -n 's/^# *DP: */  /p' debian/patches/$$i.dpatch >> pxxx; \
 
220
                fi \
 
221
        done
 
222
        @echo "Writing patched-stamp"
 
223
        @mv -f pxxx patched-stamp
 
224
 
 
225
 
 
226
 
 
227
 
 
228
 
 
229
 
 
230
 
 
231