quakeforge/debian/rules

294 lines
8.6 KiB
Text
Raw Normal View History

#! /usr/bin/make -f
# This file is public domain software, originally written by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
export DH_COMPAT=2
PACKAGE := quakeforge
QFCC := qfcc
common := $(PACKAGE)-common
maptools := $(PACKAGE)-maptools
dev := $(PACKAGE)-dev
alsa := $(PACKAGE)-alsa
gllib := $(PACKAGE)-libs-gl
glx := $(PACKAGE)-glx
oss := $(PACKAGE)-oss
sdl := $(PACKAGE)-sdl
servers := $(PACKAGE)-servers
sgl := $(PACKAGE)-sgl
svga := $(PACKAGE)-svga
swlib := $(PACKAGE)-libs-sw
utils := $(PACKAGE)-utils
x11 := $(PACKAGE)-x11
build := $(shell pwd)/debian/tmp
tmp := debian/tmp
ifeq ($(DEB_BUILD_GNU_TYPE),)
RETARGET=
else
RETARGET= --build=$(DEB_BUILD_GNU_TYPE)
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
if test -d CVS; then ./bootstrap; fi
./configure --prefix=/usr $(RETARGET) --bindir=/usr/games \
--without-fbdev \
--disable-xmms \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-plugin-path=\$${prefix}/lib/quakeforge/plugins \
--with-clients=glx,sdl,sgl,svga,x11 \
--with-servers=master,nq,qw
touch $@
build: configure-stamp changelog-stamp build-stamp
build-stamp:
dh_testdir
$(MAKE) $(QFSMP)
touch $@
changelog-stamp:
dh_testdir
# Add here commands to build the changelog
2002-05-29 16:06:50 +00:00
if test -d CVS; then $(MAKE) changelog; fi
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp changelog-stamp debian/quakeforge-common.conffiles
# Add here commands to clean up after the build process.
-$(MAKE) distclean
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
# Add here commands to install the package into debian/tmp.
$(MAKE) DESTDIR=$(build) install
install -m644 -D debian/quakeforge.conf $(build)/etc/quakeforge.conf
# quakeforge-common
find $(tmp)/etc ! -type d | sed -e "s:^$(tmp)::" > debian/$(common).conffiles
install -D -m755 debian/$(common).shlibs debian/$(common)/DEBIAN/shlibs
dh_movefiles -p$(common) --sourcedir=$(tmp) \
etc/quakeforge.conf \
usr/lib/libQFcd.so.* \
usr/lib/libQFconsole.so.* \
usr/lib/libQFcsqc.so.* \
usr/lib/libQFgamecode.so.* \
usr/lib/libQFgamecode_builtins.so.* \
usr/lib/libQFgib.so.* \
2003-08-16 03:58:35 +00:00
usr/lib/libQFimage.so.* \
usr/lib/libQFjs.so.* \
usr/lib/libQFmodels.so.* \
usr/lib/libQFsound.so.* \
usr/lib/libQFutil.so.* \
usr/lib/quakeforge/plugins/cd_linux.so* \
usr/lib/quakeforge/plugins/console_client.so* \
usr/lib/quakeforge/plugins/snd_output_disk.so* \
usr/lib/quakeforge/plugins/snd_render_default.so* \
usr/share/games/quakeforge/QF/menu.dat*
dh_installdocs -p$(common) NEWS TODO
dh_installchangelogs -p$(common) ChangeLog
# quakeforge-dev
dh_movefiles -p$(dev) --sourcedir=$(tmp) \
usr/lib/libQFcd.*a \
usr/lib/libQFcd.so \
usr/lib/libQFconsole.*a \
usr/lib/libQFconsole.so \
usr/lib/libQFcsqc.*a \
usr/lib/libQFcsqc.so \
usr/lib/libQFgamecode.*a \
usr/lib/libQFgamecode.so \
usr/lib/libQFgamecode_builtins.*a \
usr/lib/libQFgamecode_builtins.so \
usr/lib/libQFgib.a \
usr/lib/libQFgib.so \
2003-08-16 03:58:35 +00:00
usr/lib/libQFimage.*a \
usr/lib/libQFimage.so \
usr/lib/libQFjs.*a \
usr/lib/libQFjs.so \
usr/lib/libQFmodels.*a \
usr/lib/libQFmodels.so \
usr/lib/libQFsound.*a \
usr/lib/libQFsound.so \
usr/lib/libQFutil.*a \
usr/lib/libQFutil.so \
usr/include/QF/GL/*.h \
usr/include/QF/plugin/*.h \
2002-09-30 18:19:51 +00:00
usr/include/QF/*.h
install -d -m755 debian/$(dev)/usr/share/doc
ln -s $(common) debian/$(dev)/usr/share/doc/$(dev)
# quakeforge-libs-gl
dh_movefiles -p$(gllib) --sourcedir=$(tmp) \
usr/lib/libQFmodels_gl.so.* \
usr/lib/libQFrenderer_gl.so.*
install -D -m755 debian/$(gllib).shlibs debian/$(gllib)/DEBIAN/shlibs
install -d -m755 debian/$(gllib)/usr/share/doc
ln -s $(common) debian/$(gllib)/usr/share/doc/$(gllib)
# quakeforge-libs-sw
dh_movefiles -p$(swlib) --sourcedir=$(tmp) \
2002-09-30 18:19:51 +00:00
usr/lib/libQFmodels_sw.so.*
install -D -m755 debian/$(swlib).shlibs debian/$(swlib)/DEBIAN/shlibs
install -d -m755 debian/$(swlib)/usr/share/doc
ln -s $(common) debian/$(swlib)/usr/share/doc/$(swlib)
# quakeforge-servers
dh_movefiles -p$(servers) --sourcedir=$(tmp) \
usr/games/qw-master \
usr/games/qw-server \
usr/games/nq-server \
usr/lib/quakeforge/plugins/console_server.so*
install -d -m755 debian/$(servers)/usr/share/doc
ln -s $(common) debian/$(servers)/usr/share/doc/$(servers)
# quakeforge-glx
dh_movefiles -p$(glx) --sourcedir=$(tmp) \
usr/games/nq-glx \
usr/games/qw-client-glx
install -d -m755 debian/$(glx)/usr/share/doc
ln -s $(common) debian/$(glx)/usr/share/doc/$(glx)
# quakeforge-sdl
dh_movefiles -p$(sdl) --sourcedir=$(tmp) \
usr/games/nq-sdl \
usr/games/qw-client-sdl
install -d -m755 debian/$(sdl)/usr/share/doc
ln -s $(common) debian/$(sdl)/usr/share/doc/$(sdl)
# quakeforge-sgl
dh_movefiles -p$(sgl) --sourcedir=$(tmp) \
usr/games/nq-sgl \
usr/games/qw-client-sgl
install -d -m755 debian/$(sgl)/usr/share/doc
ln -s $(common) debian/$(sgl)/usr/share/doc/$(sgl)
# quakeforge-svga
dh_movefiles -p$(svga) --sourcedir=$(tmp) \
usr/games/nq-svga \
usr/games/qw-client-svga
install -d -m755 debian/$(svga)/usr/share/doc
ln -s $(common) debian/$(svga)/usr/share/doc/$(svga)
# quakeforge-x11
dh_movefiles -p$(x11) --sourcedir=$(tmp) \
usr/games/nq-x11 \
usr/games/qw-client-x11
install -d -m755 debian/$(x11)/usr/share/doc
ln -s $(common) debian/$(x11)/usr/share/doc/$(x11)
# quakeforge-alsa
dh_movefiles -p$(alsa) --sourcedir=$(tmp) \
2003-09-10 22:02:32 +00:00
usr/lib/quakeforge/plugins/snd_output_alsa.so*
install -d -m755 debian/$(alsa)/usr/share/doc
ln -s $(common) debian/$(alsa)/usr/share/doc/$(alsa)
# quakeforge-oss
dh_movefiles -p$(oss) --sourcedir=$(tmp) \
usr/lib/quakeforge/plugins/snd_output_oss.so*
install -d -m755 debian/$(oss)/usr/share/doc
ln -s $(common) debian/$(oss)/usr/share/doc/$(oss)
# qfcc
install -D -m755 $(tmp)/usr/games/qfcc $(tmp)/usr/bin/qfcc
rm -f $(tmp)/usr/games/qfcc
dh_movefiles -p$(QFCC) --sourcedir=$(tmp) \
usr/bin/qfcc \
usr/share/man/man1/qfcc.1 \
2002-11-01 18:11:20 +00:00
usr/include/QF/ruamoko/* \
usr/lib/ruamoko/*
install -d -m755 debian/$(QFCC)/usr/share/doc
ln -s $(common) debian/$(QFCC)/usr/share/doc/$(QFCC)
# quakeforge-utils
install -D -m755 $(tmp)/usr/games/pak $(tmp)/usr/bin/pak
install -D -m755 $(tmp)/usr/games/zpak $(tmp)/usr/bin/zpak
install -D -m755 $(tmp)/usr/games/qfdefs $(tmp)/usr/bin/qfdefs
install -D -m755 $(tmp)/usr/games/qfprogs $(tmp)/usr/bin/qfprogs
install -D -m755 $(tmp)/usr/games/qfwavinfo $(tmp)/usr/bin/qfwavinfo
rm -f $(tmp)/usr/games/pak \
$(tmp)/usr/games/zpak \
$(tmp)/usr/games/qfdefs \
$(tmp)/usr/games/qfprogs \
$(tmp)/usr/games/qfwavinfo
dh_movefiles -p$(utils) --sourcedir=$(tmp) \
usr/bin/pak \
usr/bin/zpak \
usr/bin/qfdefs \
usr/bin/qfprogs \
usr/bin/qfwavinfo \
usr/share/man/man1/pak.1
install -d -m755 debian/$(utils)/usr/share/doc
ln -s $(common) debian/$(utils)/usr/share/doc/$(utils)
# quakeforge-maptools
install -D -m755 $(tmp)/usr/games/qfbsp $(tmp)/usr/bin/qfbsp
install -D -m755 $(tmp)/usr/games/qflight $(tmp)/usr/bin/qflight
install -D -m755 $(tmp)/usr/games/qfvis $(tmp)/usr/bin/qfvis
dh_movefiles -p$(maptools) --sourcedir=$(tmp) \
usr/bin/qfbsp \
usr/bin/qflight \
usr/bin/qfvis \
usr/share/man/man1/qflight.1 \
usr/share/man/man1/qfvis.1
install -d -m755 debian/$(maptools)/usr/share/doc
ln -s $(common) debian/$(maptools)/usr/share/doc/$(maptools)
# quakeforge
find $(tmp) -type d -empty -print | xargs -r rmdir -p --ignore-fail-on-non-empty
dh_movefiles -p$(PACKAGE) --sourcedir=$(tmp)
install -d -m755 debian/$(PACKAGE)/usr/share/doc
ln -s $(common) debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
# We don't have any packages with Architecture: all
# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
dh_testdir
dh_testroot
dh_installexamples
dh_installmenu
dh_installman -p$(QFCC)
dh_installman -p$(maptools)
dh_installman -p$(utils)
dh_undocumented
dh_strip -Xruamoko
dh_link
dh_compress
dh_fixperms
dh_makeshlibs
# You may want to make some executables suid here.
chmod 4755 debian/quakeforge-svga/usr/games/qw-client-svga debian/quakeforge-svga/usr/games/nq-svga
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install