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
|
#!/usr/bin/make -f
CFLAGS = -Wall -g
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
configure: configure-stamp
configure-stamp:
$(checkdir)
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --bindir=/usr/games --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --localstatedir=/var/games --libexecdir=/usr/lib/games/conquest --datadir=/usr/share/games/conquest --sysconfdir=/etc/conquest
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
$(checkdir)
# Add here commands to compile the package.
$(MAKE) all
#/usr/bin/docbook-to-man debian/conquest.sgml > conquest.6
touch build-stamp
clean: checkroot
$(checkdir)
rm -f build-stamp configure-stamp config.cache config.status config.log
-$(MAKE) clean
rm -f Makefile
rm -f debian/*.substvars debian/files debian/*.debhelper debian/substvars
rm -rf debian/conquest debian/conquest-gl debian/conquest-libs debian/conquest-data autom4te.cache
find . -type f -a \( -name \#\*\# -o -name .\*\~ -o -name \*\~ -o -name DEADJOE -o -name \*.orig -o -name \*.rej -o -name \*.bak -o -name .\*.orig -o -name .\*.rej -o -name .SUMS -o -name TAGS -o -name core -o \( -path \*/.deps/\* -a -name \*.P \) \) -exec rm -f {} \;
install: build checkroot
$(checkdir)
$(INSTALL_DIR) debian/conquest/usr/games \
debian/conquest/usr/share/games/conquest \
debian/conquest/usr/share/doc/conquest \
debian/conquest/usr/lib/menu \
debian/conquest/usr/share/man/man6 \
debian/conquest/DEBIAN
# Use CONQGROUP=root because conquest group won't be available
# until postinst
$(MAKE) install DESTDIR=$(CURDIR)/debian/conquest \
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
CONQGROUP=root
chmod 775 $(CURDIR)/debian/conquest/etc/conquest
chmod 644 $(CURDIR)/debian/conquest/usr/lib/lib*.so.*
chmod 755 $(CURDIR)/debian/conquest/usr/games/conquestd \
$(CURDIR)/debian/conquest/usr/games/conqoper \
$(CURDIR)/debian/conquest/usr/lib/games/conquest/conqdriv
rm $(CURDIR)/debian/conquest/usr/lib/lib*.la \
$(CURDIR)/debian/conquest/usr/lib/lib*.a \
$(CURDIR)/debian/conquest/usr/lib/lib*.so \
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install checkroot
$(checkdir)
$(INSTALL_FILE) conquest-8*.txt SERVER.TXT README debian/README.Debian \
debian/copyright \
debian/conquest/usr/share/doc/conquest
$(INSTALL_FILE) debian/menu debian/conquest/usr/lib/menu/conquest
$(INSTALL_FILE) debian/conqai.6 \
debian/conqstrat.6 \
debian/conquest.6 \
debian/conquest/usr/share/man/man6/
$(INSTALL_FILE) debian/changelog \
debian/conquest/usr/share/doc/conquest/changelog.Debian
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libconquest.so.1.0.0
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libconqserv.so.1.0.0
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libconqclnt.so.1.0.0
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libUi.so.1.0.0
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libUiCU.so.1.0.0
strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/conquest/usr/lib/libUiGL.so.1.0.0
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/lib/games/conquest/conqdriv
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/games/conquest
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/games/conquestgl
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/games/conqai
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/games/conqoper
strip --remove-section=.comment --remove-section=.note debian/conquest/usr/games/conqstrat
# strip --strip-debug debian/conquest/usr/lib/libconquest.a
endif
$(INSTALL_DIR) debian/conquest-gl/usr/games debian/conquest-gl/DEBIAN \
debian/conquest-gl/usr/share/doc/conquest-gl
mv debian/conquest/usr/games/conquestgl debian/conquest-gl/usr/games
$(INSTALL_FILE) debian/changelog \
debian/conquest-gl/usr/share/doc/conquest-gl/changelog.Debian
$(INSTALL_FILE) debian/copyright \
debian/conquest-gl/usr/share/doc/conquest-gl
$(INSTALL_DIR) debian/conquest-data/usr/share/games \
debian/conquest-data/DEBIAN \
debian/conquest-data/usr/share/doc/conquest-data
mv debian/conquest/usr/share/games/conquest debian/conquest-data/usr/share/games
$(INSTALL_FILE) debian/changelog \
debian/conquest-data/usr/share/doc/conquest-data/changelog.Debian
$(INSTALL_FILE) debian/copyright \
debian/conquest-data/usr/share/doc/conquest-data
$(INSTALL_DIR) debian/conquest-libs/usr/lib \
debian/conquest-libs/DEBIAN \
debian/conquest-libs/var/games/conquest \
debian/conquest-libs/etc/conquest \
debian/conquest-libs/usr/share/doc/conquest-libs
$(INSTALL_FILE) debian/changelog \
debian/conquest-libs/usr/share/doc/conquest-libs/changelog.Debian
$(INSTALL_FILE) debian/copyright \
debian/conquest-libs/usr/share/doc/conquest-libs
$(INSTALL_FILE) debian/shlibs debian/conquest-libs/DEBIAN/shlibs
mv debian/conquest/usr/lib/lib* debian/conquest-libs/usr/lib/
$(INSTALL_DIR) debian/conquest-server/usr/games \
debian/conquest-server/usr/lib/games \
debian/conquest-server/DEBIAN \
debian/conquest-server/usr/share/man/man6 \
debian/conquest-server/usr/share/doc/conquest-server
$(INSTALL_FILE) debian/changelog \
debian/conquest-server/usr/share/doc/conquest-server/changelog.Debian
$(INSTALL_FILE) debian/copyright \
debian/conquest-server/usr/share/doc/conquest-server
mv debian/conquest/usr/games/conquestd \
debian/conquest/usr/games/conqoper \
debian/conquest/usr/games/conqai \
debian/conquest-server/usr/games/
mv debian/conquest/usr/lib/games/conquest \
debian/conquest-server/usr/lib/games
$(INSTALL_FILE) debian/conqoper.6 \
debian/conquest-server/usr/share/man/man6/
cd debian/conquest && gzip -9f usr/share/man/man6/conqai.6 usr/share/man/man6/conqstrat.6 usr/share/man/man6/conquest.6 usr/share/doc/conquest/README usr/share/doc/conquest/changelog.Debian
cd debian/conquest-server && gzip -9f usr/share/man/man6/conqoper.6 usr/share/doc/conquest-server/changelog.Debian
cd debian/conquest-data && gzip -9f usr/share/doc/conquest-data/changelog.Debian
cd debian/conquest-libs && gzip -9f usr/share/doc/conquest-libs/changelog.Debian
cd debian/conquest-gl && gzip -9f usr/share/doc/conquest-gl/changelog.Debian
$(INSTALL_SCRIPT) debian/postinst debian/conquest/DEBIAN/postinst
$(INSTALL_SCRIPT) debian/postrm debian/conquest/DEBIAN/postrm
# $(INSTALL_SCRIPT) debian/conffiles debian/conquest/DEBIAN/conffiles
$(INSTALL_SCRIPT) debian/conquest-server.postinst debian/conquest-server/DEBIAN/postinst
$(INSTALL_SCRIPT) debian/conquest-server.postrm debian/conquest-server/DEBIAN/postrm
dpkg-shlibdeps -Tdebian/conquest.substvars \
debian/conquest/usr/games/conquest \
debian/conquest/usr/games/conqstrat
dpkg-shlibdeps -Tdebian/conquest-gl.substvars \
debian/conquest-gl/usr/games/conquestgl
dpkg-shlibdeps -Tdebian/conquest-libs.substvars \
debian/conquest-libs/usr/lib/lib*.so.*
dpkg-shlibdeps -Tdebian/conquest-server.substvars \
debian/conquest-server/usr/games/conquestd \
debian/conquest-server/usr/lib/games/conquest/conqdriv \
debian/conquest-server/usr/games/conqai \
debian/conquest-server/usr/games/conqoper
dpkg-gencontrol -pconquest -ldebian/changelog -isp -Tdebian/conquest.substvars -Pdebian/conquest
chmod 644 debian/conquest/DEBIAN/control
chown 0.0 debian/conquest/DEBIAN/control
cd debian/conquest >/dev/null && find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chmod 644 debian/conquest/DEBIAN/md5sums
chown 0.0 debian/conquest/DEBIAN/md5sums
dpkg-deb --build debian/conquest ..
dpkg-gencontrol -pconquest-gl -ldebian/changelog -isp -Tdebian/conquest-gl.substvars -Pdebian/conquest-gl
chmod 644 debian/conquest-gl/DEBIAN/control
chown 0.0 debian/conquest-gl/DEBIAN/control
cd debian/conquest-gl >/dev/null && find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chmod 644 debian/conquest-gl/DEBIAN/md5sums
chown 0.0 debian/conquest-gl/DEBIAN/md5sums
dpkg-deb --build debian/conquest-gl ..
dpkg-gencontrol -pconquest-data -ldebian/changelog -isp -Tdebian/conquest-data.substvars -Pdebian/conquest-data
chmod 644 debian/conquest-data/DEBIAN/control
chown 0.0 debian/conquest-data/DEBIAN/control
cd debian/conquest-data >/dev/null && find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chmod 644 debian/conquest-data/DEBIAN/md5sums
chown 0.0 debian/conquest-data/DEBIAN/md5sums
dpkg-deb --build debian/conquest-data ..
dpkg-gencontrol -pconquest-libs -ldebian/changelog -isp -Tdebian/conquest-libs.substvars -Pdebian/conquest-libs
chmod 644 debian/conquest-libs/DEBIAN/control
chown 0.0 debian/conquest-libs/DEBIAN/control
cd debian/conquest-libs >/dev/null && find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chmod 644 debian/conquest-libs/DEBIAN/md5sums
chown 0.0 debian/conquest-libs/DEBIAN/md5sums
dpkg-deb --build debian/conquest-libs ..
dpkg-gencontrol -pconquest-server -ldebian/changelog -isp -Tdebian/conquest-server.substvars -Pdebian/conquest-server
chmod 644 debian/conquest-server/DEBIAN/control
chown 0.0 debian/conquest-server/DEBIAN/control
cd debian/conquest-server >/dev/null && find . -type f ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums
chmod 644 debian/conquest-server/DEBIAN/md5sums
chown 0.0 debian/conquest-server/DEBIAN/md5sums
dpkg-deb --build debian/conquest-server ..
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure checkroot
define checkdir
test -f debian/rules
endef
checkroot:
$(checkdir)
test root = "`whoami`"
|