2001-02-19 21:15:25 +00:00
|
|
|
#! /usr/bin/make -f
|
|
|
|
# This file is public domain software, originally written by Joey Hess.
|
|
|
|
|
2012-07-11 04:37:57 +00:00
|
|
|
# Uncomment this to turn on verbose mode.
|
2001-02-19 21:15:25 +00:00
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
# This is the debhelper compatibility version to use.
|
2010-12-24 10:08:29 +00:00
|
|
|
export DH_COMPAT=7
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2002-09-30 16:51:30 +00:00
|
|
|
PACKAGE := quakeforge
|
|
|
|
QFCC := qfcc
|
|
|
|
common := $(PACKAGE)-common
|
2004-04-07 02:09:21 +00:00
|
|
|
stub := $(PACKAGE)-stub
|
2002-09-30 16:51:30 +00:00
|
|
|
maptools := $(PACKAGE)-maptools
|
|
|
|
dev := $(PACKAGE)-dev
|
|
|
|
|
|
|
|
alsa := $(PACKAGE)-alsa
|
2012-07-11 04:37:57 +00:00
|
|
|
gllib := $(PACKAGE)-gl
|
|
|
|
glsllib := $(PACKAGE)-glsl
|
2010-12-24 10:08:29 +00:00
|
|
|
jack := $(PACKAGE)-jack
|
2002-09-30 16:51:30 +00:00
|
|
|
oss := $(PACKAGE)-oss
|
|
|
|
sdl := $(PACKAGE)-sdl
|
|
|
|
servers := $(PACKAGE)-servers
|
2012-07-11 04:37:57 +00:00
|
|
|
swlib := $(PACKAGE)-sw
|
|
|
|
sw32lib := $(PACKAGE)-sw32
|
2002-09-30 16:51:30 +00:00
|
|
|
utils := $(PACKAGE)-utils
|
|
|
|
x11 := $(PACKAGE)-x11
|
2001-10-14 12:17:11 +00:00
|
|
|
|
|
|
|
build := $(shell pwd)/debian/tmp
|
|
|
|
tmp := debian/tmp
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
ifeq ($(DEB_BUILD_GNU_TYPE),)
|
|
|
|
RETARGET=
|
|
|
|
else
|
2002-05-31 06:42:04 +00:00
|
|
|
RETARGET= --build=$(DEB_BUILD_GNU_TYPE)
|
2001-02-19 21:15:25 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
# Add here commands to configure the package.
|
2010-12-23 07:48:40 +00:00
|
|
|
./bootstrap
|
2001-02-19 21:15:25 +00:00
|
|
|
./configure --prefix=/usr $(RETARGET) --bindir=/usr/games \
|
2002-04-16 08:07:40 +00:00
|
|
|
--without-fbdev \
|
2010-12-30 11:39:04 +00:00
|
|
|
--with-ipv6 \
|
2010-12-24 18:55:26 +00:00
|
|
|
--disable-Werror \
|
2002-04-16 08:07:40 +00:00
|
|
|
--disable-xmms \
|
2004-04-28 00:46:15 +00:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--with-sharepath=/usr/share/games/quake \
|
|
|
|
--with-plugin-path=/usr/lib/quakeforge/plugins \
|
2012-07-11 04:37:57 +00:00
|
|
|
--with-clients=sdl,x11 \
|
2001-10-14 12:17:11 +00:00
|
|
|
--with-servers=master,nq,qw
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
touch $@
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
build: configure-stamp changelog-stamp build-stamp
|
2001-02-19 21:15:25 +00:00
|
|
|
build-stamp:
|
|
|
|
dh_testdir
|
2002-06-02 06:45:23 +00:00
|
|
|
$(MAKE) $(QFSMP)
|
2001-10-14 12:17:11 +00:00
|
|
|
touch $@
|
2001-02-19 21:15:25 +00:00
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
changelog-stamp:
|
|
|
|
dh_testdir
|
|
|
|
# Add here commands to build the changelog
|
2010-11-15 15:49:01 +00:00
|
|
|
if test -d .git; then $(MAKE) changelog; fi
|
2001-10-14 12:17:11 +00:00
|
|
|
touch $@
|
2012-07-11 04:37:57 +00:00
|
|
|
|
2001-02-19 21:15:25 +00:00
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2010-12-24 22:12:58 +00:00
|
|
|
rm -f build-stamp configure-stamp changelog-stamp
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
# Add here commands to clean up after the build process.
|
|
|
|
-$(MAKE) distclean
|
2010-12-11 06:35:03 +00:00
|
|
|
# VERY clean
|
|
|
|
./bootstrap clean
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
dh_clean
|
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
install: DH_OPTIONS=
|
2001-02-19 21:15:25 +00:00
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_prep
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
# Add here commands to install the package into debian/tmp.
|
2001-10-14 12:17:11 +00:00
|
|
|
$(MAKE) DESTDIR=$(build) install
|
|
|
|
install -m644 -D debian/quakeforge.conf $(build)/etc/quakeforge.conf
|
2004-04-28 00:46:15 +00:00
|
|
|
mkdir $(build)/usr/share/games/quake/id1
|
2001-10-14 12:17:11 +00:00
|
|
|
|
2010-12-24 10:08:29 +00:00
|
|
|
# Moving files to their right locations
|
|
|
|
# qfcc
|
|
|
|
install -D -m755 $(tmp)/usr/games/qfcc $(tmp)/usr/bin/qfcc
|
|
|
|
rm -f $(tmp)/usr/games/qfcc
|
|
|
|
install -D -m755 $(tmp)/usr/games/qfpreqcc $(tmp)/usr/bin/qfpreqcc
|
|
|
|
rm -f $(tmp)/usr/games/qfpreqcc
|
|
|
|
# quakeforge-utils
|
|
|
|
install -D -m755 $(tmp)/usr/games/pak $(tmp)/usr/bin/pak
|
|
|
|
install -D -m755 $(tmp)/usr/games/wad $(tmp)/usr/bin/wad
|
|
|
|
install -D -m755 $(tmp)/usr/games/zpak $(tmp)/usr/bin/zpak
|
|
|
|
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/wad \
|
|
|
|
$(tmp)/usr/games/zpak \
|
|
|
|
$(tmp)/usr/games/qfprogs \
|
|
|
|
$(tmp)/usr/games/qfwavinfo
|
|
|
|
# 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
|
|
|
|
rm -f $(tmp)/usr/games/qfbsp \
|
|
|
|
$(tmp)/usr/games/qflight \
|
|
|
|
$(tmp)/usr/games/qfvis
|
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
# quakeforge-common
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(common) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
dh_installdocs -p$(common) NEWS TODO
|
|
|
|
dh_installchangelogs -p$(common) ChangeLog
|
|
|
|
|
2004-04-07 02:09:21 +00:00
|
|
|
# quakeforge-stub
|
2004-04-28 00:46:15 +00:00
|
|
|
install -d -m755 debian/$(stub)/usr/share/games/quake/id1
|
2004-04-07 02:09:21 +00:00
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
# quakeforge-dev
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(dev) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(dev)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(dev)/usr/share/doc/$(dev)
|
|
|
|
|
|
|
|
# quakeforge-libs-gl
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(gllib) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(gllib)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(gllib)/usr/share/doc/$(gllib)
|
|
|
|
|
2012-07-11 04:37:57 +00:00
|
|
|
# quakeforge-libs-glsl
|
|
|
|
dh_install -p$(glsllib) --sourcedir=$(tmp)
|
|
|
|
install -d -m755 debian/$(glsllib)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(glsllib)/usr/share/doc/$(glsllib)
|
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
# quakeforge-libs-sw
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(swlib) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(swlib)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(swlib)/usr/share/doc/$(swlib)
|
|
|
|
|
2012-07-11 04:37:57 +00:00
|
|
|
# quakeforge-libs-sw32
|
|
|
|
dh_install -p$(sw32lib) --sourcedir=$(tmp)
|
|
|
|
install -d -m755 debian/$(sw32lib)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(sw32lib)/usr/share/doc/$(sw32lib)
|
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
# quakeforge-servers
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(servers) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(servers)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(servers)/usr/share/doc/$(servers)
|
|
|
|
|
|
|
|
# quakeforge-sdl
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(sdl) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(sdl)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(sdl)/usr/share/doc/$(sdl)
|
|
|
|
|
|
|
|
# quakeforge-x11
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(x11) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(x11)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(x11)/usr/share/doc/$(x11)
|
|
|
|
|
|
|
|
# quakeforge-alsa
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(alsa) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(alsa)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(alsa)/usr/share/doc/$(alsa)
|
|
|
|
|
|
|
|
# quakeforge-oss
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(oss) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(oss)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(oss)/usr/share/doc/$(oss)
|
|
|
|
|
2010-12-24 10:08:29 +00:00
|
|
|
# quakeforge-jack
|
|
|
|
dh_install -p$(jack) --sourcedir=$(tmp)
|
|
|
|
install -d -m755 debian/$(jack)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(jack)/usr/share/doc/$(jack)
|
|
|
|
|
2002-04-16 08:07:40 +00:00
|
|
|
# qfcc
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(QFCC) --sourcedir=$(tmp)
|
2002-04-16 08:07:40 +00:00
|
|
|
install -d -m755 debian/$(QFCC)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(QFCC)/usr/share/doc/$(QFCC)
|
|
|
|
|
2002-09-30 16:51:30 +00:00
|
|
|
# quakeforge-utils
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(utils) --sourcedir=$(tmp)
|
2002-09-30 16:51:30 +00:00
|
|
|
install -d -m755 debian/$(utils)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(utils)/usr/share/doc/$(utils)
|
|
|
|
|
|
|
|
# quakeforge-maptools
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(maptools) --sourcedir=$(tmp)
|
2002-09-30 16:51:30 +00:00
|
|
|
install -d -m755 debian/$(maptools)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(maptools)/usr/share/doc/$(maptools)
|
2012-07-11 04:37:57 +00:00
|
|
|
|
2001-10-14 12:17:11 +00:00
|
|
|
# quakeforge
|
2002-09-30 16:51:30 +00:00
|
|
|
find $(tmp) -type d -empty -print | xargs -r rmdir -p --ignore-fail-on-non-empty
|
2010-12-24 10:08:29 +00:00
|
|
|
dh_install -p$(PACKAGE) --sourcedir=$(tmp)
|
2001-10-14 12:17:11 +00:00
|
|
|
install -d -m755 debian/$(PACKAGE)/usr/share/doc
|
|
|
|
ln -s $(common) debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)
|
2001-02-19 21:15:25 +00:00
|
|
|
|
|
|
|
# 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
|
2002-04-16 08:07:40 +00:00
|
|
|
dh_installman -p$(QFCC)
|
2002-09-30 16:51:30 +00:00
|
|
|
dh_installman -p$(maptools)
|
|
|
|
dh_installman -p$(utils)
|
2001-02-19 21:15:25 +00:00
|
|
|
dh_undocumented
|
2012-07-11 04:37:57 +00:00
|
|
|
dh_strip -Xshare/qfcc
|
2001-02-19 21:15:25 +00:00
|
|
|
dh_link
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
2010-12-24 20:47:55 +00:00
|
|
|
dh_makeshlibs -V -Xplugins
|
2001-02-19 21:15:25 +00:00
|
|
|
# You may want to make some executables suid here.
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|