2014-03-15 16:59:03 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
#
|
|
|
|
# GNU Make Debian package makefile for SRB2-data
|
|
|
|
#
|
|
|
|
# Copyright (C) 1998-2011 by Callum Dickinson
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# This file most likely will not need to be modified to make
|
|
|
|
# branches of SRB2 capable of making their own Debian packages,
|
|
|
|
# instead look at the /debian/control file for configuration.
|
|
|
|
#
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
# user/group of to-be-installed files
|
|
|
|
ROOT_USER := 0
|
|
|
|
ROOT_GROUP := 0
|
|
|
|
|
|
|
|
MKDIR := mkdir -p
|
|
|
|
INSTALL := install -o $(ROOT_USER) -g $(ROOT_GROUP) -m 644
|
|
|
|
MV := mv
|
|
|
|
RM := rm -rf
|
|
|
|
DIR := $(shell pwd)
|
|
|
|
|
|
|
|
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
|
2018-11-26 19:40:59 +00:00
|
|
|
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta patch.dta README.txt LICENSE.txt LICENSE-3RD-PARTY.txt
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
DATADIR := usr/games/SRB2
|
|
|
|
RESOURCEDIR := .
|
|
|
|
WGET := wget -P $(RESOURCEDIR) -c -nc
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(MKDIR) $(DIR)/debian/tmp/$(DATADIR)
|
2018-11-27 02:37:39 +00:00
|
|
|
> $(DIR)/debian/source/include-binaries
|
2014-03-15 16:59:03 +00:00
|
|
|
# This will need to be updated every time SRB2 official version is
|
|
|
|
# Copy data files to their install locations, and add data files to include-binaries
|
|
|
|
for file in $(DATAFILES); do \
|
2018-11-27 03:39:22 +00:00
|
|
|
if [ ! -f $(RESOURCEDIR)/$$file ]; then \
|
2018-11-27 02:37:39 +00:00
|
|
|
$(WGET) http://alam.srb2.org/SRB2/2.1.21-Final/Resources/$$file; \
|
|
|
|
fi; \
|
|
|
|
if [ -f $(RESOURCEDIR)/$$file ]; then \
|
|
|
|
if test "$$file" = "srb2.wad"; then \
|
|
|
|
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/srb2.srb; \
|
|
|
|
else \
|
|
|
|
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/$$file; \
|
|
|
|
fi; \
|
2018-11-27 03:39:22 +00:00
|
|
|
echo $(RESOURCEDIR)/$$file >> $(DIR)/debian/source/include-binaries; \
|
2018-11-27 03:14:51 +00:00
|
|
|
else \
|
2018-11-27 03:39:22 +00:00
|
|
|
echo $(DIR)/$$file not found and could not be downloaded!; \
|
2018-11-27 03:14:51 +00:00
|
|
|
return 1; \
|
2014-03-15 16:59:03 +00:00
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
binary-indep:
|
|
|
|
# Generate install folder file
|
|
|
|
echo $(DATADIR) > $(DIR)/debian/$(PACKAGE).install
|
|
|
|
|
|
|
|
binary-arch:
|
|
|
|
# only here to kill Lintian warning
|
|
|
|
echo "no need to do any arch-specific stuff"
|
|
|
|
|
|
|
|
binary: binary-indep
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installchangelogs
|
|
|
|
# dh_installdocs
|
|
|
|
# dh_installexamples
|
|
|
|
dh_install --sourcedir=$(DIR)/debian/tmp
|
|
|
|
# dh_installmenu
|
|
|
|
# dh_installdebconf
|
|
|
|
# dh_installlogrotate
|
|
|
|
# dh_installemacsen
|
|
|
|
# dh_installpam
|
|
|
|
# dh_installmime
|
|
|
|
# dh_python
|
|
|
|
# dh_installinit
|
|
|
|
# dh_installcron
|
|
|
|
# dh_installinfo
|
|
|
|
# dh_installman
|
|
|
|
# dh_link
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
# dh_perl
|
|
|
|
# dh_makeshlibs
|
|
|
|
dh_installdeb
|
|
|
|
# -dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(RESOURCEDIR)/*.wad
|
|
|
|
$(RM) $(RESOURCEDIR)/*.dta
|
|
|
|
$(RM) $(RESOURCEDIR)/*.plr
|
|
|
|
$(RM) $(RESOURCEDIR)/*.wpn
|
|
|
|
$(RM) $(RESOURCEDIR)/*.srb
|
|
|
|
$(RM) $(RESOURCEDIR)/*.dll
|
2018-11-26 19:40:59 +00:00
|
|
|
$(RM) $(RESOURCEDIR)/*.txt
|
2014-03-15 16:59:03 +00:00
|
|
|
$(RM) $(DIR)/debian/tmp/*
|
|
|
|
$(RM) $(DIR)/debian/$(PACKAGE).install
|
|
|
|
$(RM) $(DIR)/debian/files
|
|
|
|
$(RM) $(DIR)/debian/source/include-binaries
|
|
|
|
|
|
|
|
.PHONY: all clean binary binary-arch binary-indep build
|