Skip to content

Commit a7bcbe3

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/cs-container'
2 parents 80b792c + 1581e16 commit a7bcbe3

36 files changed

Lines changed: 2670 additions & 0 deletions

debian/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
openparsec/
2+
openparsec-server/
3+

debian/Jenkinsfile

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
#!groovy
2+
3+
// Docker images generated by https://github.com/VitexSoftware/BuildImages
4+
5+
6+
pipeline {
7+
agent none
8+
9+
options {
10+
ansiColor('xterm')
11+
copyArtifactPermission('*');
12+
//disableConcurrentBuilds()
13+
}
14+
15+
environment {
16+
RED = '\\e[31m'
17+
GREEN = '\\e[32m'
18+
ENDCOLOR = '\\e[0m'
19+
}
20+
21+
stages {
22+
23+
stage('debian-buster') {
24+
agent {
25+
docker { image 'vitexsoftware/debian:buster' }
26+
}
27+
steps {
28+
dir('build/debian/package') {
29+
checkout scm
30+
buildPackage()
31+
installPackages()
32+
}
33+
stash includes: 'dist/**', name: 'dist-buster'
34+
}
35+
post {
36+
success {
37+
archiveArtifacts 'dist/debian/'
38+
copyArtifact()
39+
}
40+
}
41+
}
42+
43+
stage('debian-bullseye') {
44+
agent {
45+
docker { image 'vitexsoftware/debian:bullseye' }
46+
}
47+
steps {
48+
dir('build/debian/package') {
49+
checkout scm
50+
buildPackage()
51+
installPackages()
52+
}
53+
stash includes: 'dist/**', name: 'dist-bullseye'
54+
}
55+
post {
56+
success {
57+
archiveArtifacts 'dist/debian/'
58+
copyArtifact()
59+
}
60+
}
61+
}
62+
63+
stage('debian-bookworm') {
64+
agent {
65+
docker { image 'vitexsoftware/debian:bookworm' }
66+
}
67+
steps {
68+
dir('build/debian/package') {
69+
checkout scm
70+
sh 'sudo apt update'
71+
sh 'sudo apt install -y php-xml' //TODO: Remove after upstream dependency fix
72+
buildPackage()
73+
installPackages()
74+
}
75+
stash includes: 'dist/**', name: 'dist-bookworm'
76+
}
77+
post {
78+
success {
79+
archiveArtifacts 'dist/debian/'
80+
copyArtifact()
81+
}
82+
}
83+
}
84+
85+
stage('ubuntu-focal') {
86+
agent {
87+
docker { image 'vitexsoftware/ubuntu:focal' }
88+
}
89+
steps {
90+
dir('build/debian/package') {
91+
checkout scm
92+
buildPackage()
93+
installPackages()
94+
}
95+
stash includes: 'dist/**', name: 'dist-focal'
96+
}
97+
post {
98+
success {
99+
archiveArtifacts 'dist/debian/'
100+
copyArtifact()
101+
}
102+
}
103+
}
104+
105+
stage('ubuntu-hirsute') {
106+
agent {
107+
docker { image 'vitexsoftware/ubuntu:hirsute' }
108+
}
109+
steps {
110+
dir('build/debian/package') {
111+
checkout scm
112+
buildPackage()
113+
installPackages()
114+
}
115+
stash includes: 'dist/**', name: 'dist-hirsute'
116+
}
117+
post {
118+
success {
119+
archiveArtifacts 'dist/debian/'
120+
copyArtifact()
121+
}
122+
}
123+
}
124+
125+
}
126+
}
127+
128+
def copyArtifact(){
129+
step ([$class: 'CopyArtifact',
130+
projectName: '${JOB_NAME}',
131+
filter: "**/*.deb",
132+
target: '/var/tmp/deb',
133+
flatten: true,
134+
selector: specific('${BUILD_NUMBER}')
135+
]);
136+
}
137+
138+
def buildPackage() {
139+
140+
def DIST = sh (
141+
script: 'lsb_release -sc',
142+
returnStdout: true
143+
).trim()
144+
145+
def DISTRO = sh (
146+
script: 'lsb_release -sd',
147+
returnStdout: true
148+
).trim()
149+
150+
151+
def SOURCE = sh (
152+
script: 'dpkg-parsechangelog --show-field Source',
153+
returnStdout: true
154+
).trim()
155+
156+
def VERSION = sh (
157+
script: 'dpkg-parsechangelog --show-field Version',
158+
returnStdout: true
159+
).trim()
160+
161+
ansiColor('vga') {
162+
echo '\033[42m\033[90mBuild debian package ' + SOURCE + ' v' + VERSION + ' for ' + DISTRO + '\033[0m'
163+
}
164+
165+
def VER = VERSION + '~' + DIST + '~' + env.BUILD_NUMBER
166+
167+
//Buster problem: Can't continue: dpkg-parsechangelog is not new enough(needs to be at least 1.17.0)
168+
//
169+
// debianPbuilder additionalBuildResults: '',
170+
// components: '',
171+
// distribution: DIST,
172+
// keyring: '',
173+
// mirrorSite: 'http://deb.debian.org/debian/',
174+
// pristineTarName: ''
175+
sh 'dch -b -v ' + VER + ' "' + env.BUILD_TAG + '"'
176+
sh 'sudo apt-get update'
177+
sh 'debuild-pbuilder -i -us -uc -b'
178+
sh 'mkdir -p $WORKSPACE/dist/debian/ ; rm -rf $WORKSPACE/dist/debian/* ; for deb in $(cat debian/files | awk \'{print $1}\'); do mv "../$deb" $WORKSPACE/dist/debian/; done'
179+
}
180+
181+
def installPackages() {
182+
def DEBCONF_DEBUG=0 //Set to "5" or "developer" to debug debconf
183+
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
184+
sh 'echo "deb [trusted=yes] file:////$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
185+
sh 'sudo apt-get update'
186+
sh 'echo "${GREEN} INSTALATION ${ENDCOLOR}"'
187+
if(env.POSTINST){
188+
run = 'echo "${GREEN} Testing launch of installed ${ENDCOLOR}"; ' + env.POSTINST + ';'
189+
} else {
190+
run = ''
191+
}
192+
193+
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + DEBCONF_DEBUG + ' apt-get -y install $package ; done;'
194+
sh run
195+
}

debian/README.Debian

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
openparsec for Debian
2+
3+
4+
set Jenkins custom environment variable to test launching:
5+
6+
POSTINST=/usr/games/parsec-server;/usr/games/parsec
7+
8+
9+
-- Vítězslav Dvořák <info@vitexsoftware.cz> Thu, 25 Nov 2021 19:41:51 +0100

debian/changelog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
openparsec (0.3) UNRELEASED; urgency=low
2+
3+
[ Vítězslav Dvořák ]
4+
* Initial release. Closes: #nnnn
5+
<nnnn is the bug number of your ITP>
6+
7+
[ vitex ]
8+
* 64bit supported now
9+
10+
-- vitex <info@vitexsoftware.cz> Thu, 25 Nov 2021 20:29:06 +0100

debian/clean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# You must remove unused comment lines for the released package.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Type=Application
4+
5+
Name=OpenParsec
6+
Comment=3D space shooter multiplayer game
7+
Categories=Game;ActionGame;
8+
9+
Icon=openparsec
10+
Exec=parsec
11+
Terminal=false
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>com.openparsec.client</id>
4+
5+
<name>OpenParsec</name>
6+
<summary>3D space shooter multiplayer game</summary>
7+
8+
<metadata_license>MIT</metadata_license>
9+
<project_license>GPL-2.0-only</project_license>
10+
11+
<recommends>
12+
<control>pointing</control>
13+
<control>keyboard</control>
14+
<control>gamepad</control>
15+
</recommends>
16+
17+
<description>
18+
<p>
19+
Fast-paced multiplayer cross-platform 3D Internet space combat game
20+
</p>
21+
</description>
22+
23+
<launchable type="desktop-id">com.openparsec.openparsec.desktop</launchable>
24+
<screenshots>
25+
<screenshot type="default">
26+
<image>https://www.philtopia.com/wp-uploads//2013/01/stargate04.png</image>
27+
</screenshot>
28+
<screenshot>
29+
<image>https://www.philtopia.com/wp-uploads//2012/02/upload2.png</image>
30+
</screenshot>
31+
<screenshot>
32+
<image>https://www.philtopia.com/wp-uploads//2012/02/upload.png</image>
33+
</screenshot>
34+
</screenshots>
35+
</component>

debian/control

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Source: openparsec
2+
Section: games
3+
Priority: optional
4+
Maintainer: Vítězslav Dvořák <info@vitexsoftware.cz>
5+
Build-Depends: debhelper-compat (= 12), premake4, libc6-dev, libsdl2-dev, libsdl2-mixer-dev, libncurses-dev
6+
Standards-Version: 4.5.0
7+
Homepage: https://www.openparsec.com/
8+
Vcs-Git: https://github.com/OpenParsec/openparsec.git
9+
Vcs-Browser: https://www.openparsec.com/
10+
11+
Package: openparsec
12+
Architecture: any
13+
Multi-Arch: foreign
14+
Depends: ${misc:Depends},
15+
${shlibs:Depends},
16+
Description: 3D space shooter game
17+
Fast-paced multiplayer cross-platform 3D Internet space combat game with amazing soundtrack
18+
19+
Package: openparsec-server
20+
Architecture: any
21+
Multi-Arch: foreign
22+
Depends: ${misc:Depends},
23+
${shlibs:Depends},
24+
Description: 3D space shooter game server
25+
Fast-paced multiplayer cross-platform
26+
3D Internet space combat game server
27+
28+
Package: openparsec-dbg
29+
Architecture: any
30+
Multi-Arch: foreign
31+
Description: 3D space shooter game debug symbols
32+

0 commit comments

Comments
 (0)