Debian packaging scripts

This commit is contained in:
md2211 2008-12-30 22:14:06 +00:00
parent 30f05a912f
commit f176bd23da
9 changed files with 139 additions and 3 deletions

View file

@ -1,5 +1,10 @@
D2X-Rebirth Changelog
20081230
--------
SConstruct: prefix is now an argument (useful for auto-builds)
debian/*: created the debian packaging files
20081227
--------
arch/carbon/conf.h, d2x-Info.plist, d2x-rebirth.xcodeproj/project.pbxproj, d2xgl-Info.plist, English.lproj/InfoPlist.strings: Increment Mac version number, update project for latest Xcode

View file

@ -14,9 +14,9 @@ D2XSVN = os.popen('svnversion .').read()[:-1]
D2XSVN = D2XSVN.split(':')[-1]
# installation path
PREFIX = '/usr/local/'
BIN_SUBDIR = 'bin/'
DATA_SUBDIR = 'share/games/d2x-rebirth'
PREFIX = str(ARGUMENTS.get('prefix', '/usr/local'))
BIN_SUBDIR = '/bin'
DATA_SUBDIR = '/share/games/d2x-rebirth'
BIN_DIR = PREFIX + BIN_SUBDIR
DATA_DIR = PREFIX + DATA_SUBDIR

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
d2x-rebirth (0.55-1) intrepid; urgency=low
* Package creation.
-- MD2211 <md2211@users.sourceforge.net> Tue, 30 Dec 2008 16:18:17 +0100

19
debian/control vendored Normal file
View file

@ -0,0 +1,19 @@
Source: d2x-rebirth
Section: games
Priority: optional
Maintainer: MD2211 <md2211@users.sourceforge.net>
Standards-Version: 3.6.1
Package: d2x-rebirth
Build-Depends: libsdl1.2-dev, libsdl-mixer1.2-dev, libphysfs-dev
Recommends: timidity, freepats
Architecture: any
Depends: ${shlibs:Depends}
Description: Port of the 1996 classic game Descent 2: Counterstrike!
DXX-Rebirth is a Source Port of the Descent & Descent ][ Engines and
provides classical Gameplay combined with OpenGL graphics and effects,
a bunch of improvements and new features.
.
For more information please visit the web site:
http://www.dxx-rebirth.com/

13
debian/copyright vendored Normal file
View file

@ -0,0 +1,13 @@
This software was packaged by MD2211 <md2211@users.sourceforge.net>
Tue, 30 Dec 2008 22:32:05 +0100
It was downloaded from: http://www.dxx-rebirth.com/
Original authors:
* Descent 2 by Interplay / Parallax Software
* D2X by Bradley Bell (http://icculus.org/~btb/)
* DXX-Rebirth by Zico <zicodxx@yahoo.de>
License:
Please see COPYING file for details

11
debian/patches/00games_as_bindir.diff vendored Normal file
View file

@ -0,0 +1,11 @@
--- SConstruct 2008-12-30 21:47:01.000000000 +0100
+++ SConstruct.new 2008-12-30 21:47:44.000000000 +0100
@@ -15,7 +15,7 @@
# installation path
PREFIX = str(ARGUMENTS.get('prefix', '/usr/local'))
-BIN_SUBDIR = '/bin'
+BIN_SUBDIR = '/games'
DATA_SUBDIR = '/share/games/d2x-rebirth'
BIN_DIR = PREFIX + BIN_SUBDIR
DATA_DIR = PREFIX + DATA_SUBDIR

1
debian/postinst vendored Executable file
View file

@ -0,0 +1 @@
#! /bin/bash

1
debian/prerm vendored Executable file
View file

@ -0,0 +1 @@
#! /bin/bash

81
debian/rules vendored Executable file
View file

@ -0,0 +1,81 @@
#! /usr/bin/make -f
#
# debian/rules file for d2x-rebirth
# MD2211 <md2211@users.sourceforge.net>
# Mon, 22 Dec 2008 23:21:42 +0100
#
package = d2x-rebirth
SCONS = scons -Q
SCONSFLAGS = sdlmixer=1 prefix=/usr
BINARY = d2x-rebirth-gl
PREFIX = /usr
BIN_DIR = $(PREFIX)/games
SHARE_DIR = $(PREFIX)/share
DATA_DIR = $(SHARE_DIR)/games/$(package)
DEBIAN_TMP = debian/tmp
patch: patch-stamp
patch-stamp:
test -d debian/patches
@for patch in debian/patches/*.diff; do \
echo "Applying $$patch"; \
patch < $$patch; \
done
touch $@
build: patch build-stamp
build-stamp:
$(SCONS) $(SCONSFLAGS)
strip $(BINARY)
touch $@
clean:
$(SCONS) -c
rm -rf patch-stamp build-stamp *~ $(DEBIAN_TMP) debian/*~ debian/files* debian/substvars
binary-indep: checkroot build
$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
TMP_BIN_DIR = $(DEBIAN_TMP)/$(BIN_DIR)
TMP_SHARE_DIR = $(DEBIAN_TMP)/$(SHARE_DIR)
TMP_DATA_DIR = $(DEBIAN_TMP)/$(DATA_DIR)
binary-arch: checkroot build
$(checkdir)
rm -rf $(DEBIAN_TMP)
install -d $(DEBIAN_TMP)/DEBIAN $(TMP_BIN_DIR) $(TMP_DATA_DIR)
install -d $(TMP_DATA_DIR)/missions $(TMP_DATA_DIR)/demos $(TMP_DATA_DIR)/screenshots $(TMP_DATA_DIR)/Music
install -d $(TMP_SHARE_DIR)/applications $(TMP_SHARE_DIR)/pixmaps
install -m 755 debian/postinst debian/prerm $(DEBIAN_TMP)/DEBIAN
install -m 755 $(BINARY) $(TMP_BIN_DIR)
install -m 644 d2x.ini $(TMP_DATA_DIR)
install -m 644 CHANGELOG.txt $(TMP_DATA_DIR)
install -m 644 COPYING.txt $(TMP_DATA_DIR)
install -m 644 README.txt $(TMP_DATA_DIR)
install -m 644 d2x-rebirth.desktop $(TMP_SHARE_DIR)/applications
install -m 644 d2x-rebirth.xpm $(TMP_SHARE_DIR)/pixmaps
dpkg-shlibdeps $(TMP_BIN_DIR)/$(BINARY)
dpkg-gencontrol -isp
chown -R root:root $(DEBIAN_TMP)
chmod -R u+w,go=rX $(DEBIAN_TMP)
dpkg --build $(DEBIAN_TMP) ..
define checkdir
test -f SConstruct -a -f debian/rules
endef
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test $$(id -u) = 0
.PHONY: binary binary-arch binary-indep clean checkroot