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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
|
#! /usr/bin/make -f
#
# Last updated: Sun May 4 17:39:40 BST 1997 by and1000
#
# There used to be `source' and `diff' targets in this file, and many
# packages also had `changes' and `dist' targets. These functions
# have been taken over by dpkg-source, dpkg-genchanges and
# dpkg-buildpackage in a package-independent way, and so these targets
# are obsolete.
#
# Invoke each target with `./debian/rules <target>'. All targets should be
# invoked with the package root as the current directory.
#
# The `binary' target must be run as root, as it needs to install files with
# specific ownerships.
# The runes to build the works:
# dpkg-buildpackage -rreally
# This lists all the subdirs of the debian/ directory. They need to be packed
# up - see the dirhack and dirpack rules near the end of this makefile.
DEBIAN_DIRS = utils extra-{bit,pix}maps
CC = gcc
CFLAGS = -O2
LDFLAGS = -s
build:
# Builds the code package.
xmkmf
make Makefiles
make
touch build
clean: dirpack
# Undoes the effect of `make -f debian/rules build'.
rm -f build
rm -rf debian/tmp-fvwm2 debian/tmp-fvwm-common
rm -f debian/files
rm -f debian/substvars
-make clean
rm -f Makefile* fvwm/Makefile* libs/Makefile* modules/*/Makefile* \
xpmroot/Makefile* sample.fvwmrc/Makefile* utils/Makefile*
rm -f *~ core debian/*~
rm -rf icons/.xvpics
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.
binary-arch: checkroot build binary-fvwm2 binary-fvwm-common
binary-fvwm2: checkroot build dirhack
$(checkdir)
rm -rf debian/tmp-fvwm2
install -d -g root -m 755 -o root debian/tmp-fvwm2
chmod g-s debian/tmp-fvwm2
install -d -g root -m 755 -o root debian/tmp-fvwm2/DEBIAN
install -d -g root -m 755 -o root debian/tmp-fvwm2/etc/X11/fvwm2
install -g root -m 644 -o root debian/system.fvwm2rc \
debian/tmp-fvwm2/etc/X11/fvwm2/system.fvwm2rc
rm -f debian/tmp-fvwm2/usr/X11R6/lib/X11/fvwm2/system.fvwm2rc
make install DESTDIR=`pwd`/debian/tmp-fvwm2
( cd debian/tmp-fvwm2/usr/X11R6/lib/X11/fvwm2 \
&& rm -f system.fvwmrc system.fvwm2rc .fvwm2rc \
&& ln -s /etc/X11/fvwm2/system.fvwm2rc .fvwm2rc \
&& ln -s /etc/X11/fvwm2/.fvwm2 .fvwm2 )
rm -f debian/tmp-fvwm2/usr/X11R6/bin/xpmroot
make -C fvwm install.man DESTDIR=`pwd`/debian/tmp-fvwm2
gzip -9 debian/tmp-fvwm2/usr/X11R6/man/man1/fvwm2.1x
# Joost's menu stuff
install -d -g root -o root -m 755 debian/tmp-fvwm2/etc/menu-methods
install -o root -g root -m 755 debian/fvwm2-menu-method \
debian/tmp-fvwm2/etc/menu-methods/fvwm2
install -d -g root -o root -m 755 debian/tmp-fvwm2/etc/X11/fvwm2/.fvwm2
# add in the list of modules we provide
install -d -g root -o root -m 755 debian/tmp-fvwm2/usr/lib/menu
install -o root -g root -m 644 debian/fvwm2-menudefs \
debian/tmp-fvwm2/usr/lib/menu/fvwm2
# rest of debian infrastructure
install -d -g root -m 755 -o root debian/tmp-fvwm2/usr/doc/fvwm2
install -g root -m 644 -o root debian/COPYRIGHT \
debian/tmp-fvwm2/usr/doc/fvwm2/copyright
for file in BUGS ChangeLog FAQ README TO-DO debian/README.sysrc \
debian/changelog; do \
install -g root -m 644 -o root $$file \
debian/tmp-fvwm2/usr/doc/fvwm2/`basename $$file`; \
gzip -9 debian/tmp-fvwm2/usr/doc/fvwm2/`basename $$file`; \
done
mv debian/tmp-fvwm2/usr/doc/fvwm2/changelog.gz \
debian/tmp-fvwm2/usr/doc/fvwm2/changelog.Debian.gz
( cd utils; \
install -d -g root -m 755 -o root \
../debian/tmp-fvwm2/usr/doc/fvwm2/utils;\
for file in *; do \
install -g root -m 644 -o root $$file \
../debian/tmp-fvwm2/usr/doc/fvwm2/utils/$$file; \
gzip -9 ../debian/tmp-fvwm2/usr/doc/fvwm2/utils/$$file; \
done; \
)
# want to use our own fvwmrc_convert, not the distributed one
rm debian/tmp-fvwm2/usr/doc/fvwm2/utils/fvwmrc_convert.gz
( cd debian/utils; \
for file in *; do \
install -g root -o root -m 755 $$file \
../../debian/tmp-fvwm2/usr/doc/fvwm2/utils; \
done; \
)
install -d -g root -m 755 -o root debian/tmp-fvwm2/usr/bin
# install -g root -m 755 -o root debian/install-fvwm2menu \
# debian/tmp-fvwm2/usr/bin/install-fvwm2menu
install -g root -m 755 -o root debian/setup-background \
debian/tmp-fvwm2/usr/bin/setup-background
( cd modules/FvwmButtons; \
install -d -g root -m 755 -o root \
../../debian/tmp-fvwm2/usr/doc/fvwm2/FvwmButtons; \
for file in BUGS README TODO CHANGES samplebuttonrc; do \
install -g root -m 644 -o root $$file \
../../debian/tmp-fvwm2/usr/doc/fvwm2/FvwmButtons/$$file; \
gzip -9 ../../debian/tmp-fvwm2/usr/doc/fvwm2/FvwmButtons/$$file; \
done )
install -d -g root -m 755 -o root \
debian/tmp-fvwm2/usr/doc/fvwm2/examples
for file in sample.fvwmrc/* \
debian/debian-old-system.fvwmrc \
debian/complex.fvwmrc \
debian/and1000.fvwm2rc \
debian/m4.fvwm2rc \
docs/color_combos; do \
install -g root -m 644 -o root $$file \
debian/tmp-fvwm2/usr/doc/fvwm2/examples/`basename $$file`; \
gzip -9 debian/tmp-fvwm2/usr/doc/fvwm2/examples/`basename $$file`; \
done
rm debian/tmp-fvwm2/usr/doc/fvwm2/examples/{Imakefile,Makefile,system.fvwmrc}.gz
install -g root -m 644 -o root debian/conffiles \
debian/tmp-fvwm2/DEBIAN/conffiles
install -g root -m 755 -o root debian/postinst \
debian/tmp-fvwm2/DEBIAN/postinst
install -g root -m 755 -o root debian/postrm \
debian/tmp-fvwm2/DEBIAN/postrm
install -g root -m 755 -o root debian/preinst \
debian/tmp-fvwm2/DEBIAN/preinst
dpkg-shlibdeps -pfvwm2 fvwm/fvwm2
dpkg-gencontrol -pfvwm2 -Pdebian/tmp-fvwm2
chown -R root.root debian/tmp-fvwm2
chmod -R g-ws debian/tmp-fvwm2
dpkg --build debian/tmp-fvwm2 ..
binary-fvwm-common: checkroot build dirhack
# now build the fvwm-common package
$(checkdir)
rm -rf debian/tmp-fvwm-common
install -d -g root -m 755 -o root debian/tmp-fvwm-common
chmod g-s debian/tmp-fvwm-common
install -d -g root -m 755 -o root debian/tmp-fvwm-common/DEBIAN
install -d -g root -m 755 -o root \
debian/tmp-fvwm-common/usr/X11R6/include/X11/pixmaps
install -d -g root -m 755 -o root \
debian/tmp-fvwm-common/usr/X11R6/include/X11/bitmaps
for file in `ls icons/*.xpm | sed s,icons/,,`; \
do \
install -g root -m 644 -o root icons/$$file \
debian/tmp-fvwm-common/usr/X11R6/include/X11/pixmaps/$$file; \
done
for file in debian/extra-pixmaps/*; \
do \
install -g root -m 644 -o root $$file \
debian/tmp-fvwm-common/usr/X11R6/include/X11/pixmaps/`basename $$file`; \
done
for file in debian/extra-bitmaps/*; \
do \
install -g root -m 644 -o root $$file \
debian/tmp-fvwm-common/usr/X11R6/include/X11/bitmaps/`basename $$file`; \
done
install -d -g root -o root -m 755 \
debian/tmp-fvwm-common/usr/doc/fvwm-common
install -g root -o root -m 644 debian/COPYRIGHT \
debian/tmp-fvwm-common/usr/doc/fvwm-common/copyright
make install.man DESTDIR=`pwd`/debian/tmp-fvwm-common
rm -f debian/tmp-fvwm-common/usr/X11R6/man/man1/fvwm2.1x
install -g root -m 444 -o root debian/GoodStuff.man \
debian/tmp-fvwm-common/usr/X11R6/man/man1/GoodStuff.1x
gzip -9 debian/tmp-fvwm-common/usr/X11R6/man/man1/*
install -d -g root -m 755 -o root debian/tmp-fvwm-common/usr/X11R6/bin
install -g root -m 755 -o root -s xpmroot/xpmroot \
debian/tmp-fvwm-common/usr/X11R6/bin/xpmroot
dpkg-shlibdeps -pfvwm-common xpmroot/xpmroot
dpkg-gencontrol -pfvwm-common -Pdebian/tmp-fvwm-common
chown -R root.root debian/tmp-fvwm-common
chmod -R g-ws debian/tmp-fvwm-common
dpkg --build debian/tmp-fvwm-common ..
define checkdir
test -f Fvwm.tmpl -a -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
###########################
# Hacks to get around the fact that the debian/ directory can only
# be one subdir deep. Idea (suggested by Joost Witteveen) is to keep a
# tar.gz.uue file of the subdirs
dirhack:
@if [ ! -d debian/utils ]; then \
(echo "Unpacking debian/ subdirs..." && \
cd debian && \
uudecode dirhack.tar.gz.uue && \
gzip -dc dirhack.tar.gz | tar -xvf - && \
rm dirhack.tar.gz ); \
fi
dirpack:
@if [ -d debian/utils ]; then \
echo "Packing debian/ subdirs..." && \
(cd debian && \
tar -cvf dirhack.tar $(DEBIAN_DIRS) && \
echo "Compressing and uuencoding the tarfile..." && \
gzip -9 dirhack.tar && \
uuencode dirhack.tar.gz dirhack.tar.gz >dirhack.tar.gz.uue && \
rm dirhack.tar.gz && \
rm -rf $(DEBIAN_DIRS) ); \
fi
|