Skip to content

Commit

Permalink
Debian: Improving packaging
Browse files Browse the repository at this point in the history
The launch-doomsday script is now included in the .deb.
Also cleaned up the packaging so that no generated files
are left in the doomsday directory.
  • Loading branch information
skyjake committed Sep 19, 2011
1 parent 9929bfd commit 3e5d2b6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 2 additions & 0 deletions distrib/linux/.gitignore
@@ -0,0 +1,2 @@
launch-doomsday

25 changes: 17 additions & 8 deletions distrib/platform_release.py
Expand Up @@ -210,10 +210,10 @@ def win_release():

"""The Linux release procedure."""
def linux_release():
os.chdir(WORK_DIR)
os.chdir(LAUNCH_DIR)

# Generate a launcher script.
f = file('launch-doomsday', 'wt')
f = file('linux/launch-doomsday', 'wt')
print >> f, """#!/usr/bin/python
import os, sys
os.chdir('/usr/share/doomsday/snowberry')
Expand All @@ -222,15 +222,24 @@ def linux_release():
import snowberry"""
f.close()

if os.system('cmake -D SYSTEMARCH=`dpkg --print-architecture`' +
' -D DOOMSDAY_VERSION=' + DOOMSDAY_VERSION +
' -D DOOMSDAY_BUILD=' + DOOMSDAY_BUILD +
' -D DOOMSDAY_BUILD_TEXT="' + DOOMSDAY_BUILD_NUMBER + '"' +
' -D CMAKE_INSTALL_PREFIX=/usr ../../doomsday && fakeroot make package'):
def clean_products():
# Remove previously build deb packages.
os.system('rm -f ../doomsday*.deb ../doomsday*.changes ../doomsday*.tar.gz ../doomsday*.dsc')

clean_products()

#if os.system('cmake -D SYSTEMARCH=`dpkg --print-architecture`' +
# ' -D DOOMSDAY_VERSION=' + DOOMSDAY_VERSION +
# ' -D DOOMSDAY_BUILD=' + DOOMSDAY_BUILD +
# ' -D DOOMSDAY_BUILD_TEXT="' + DOOMSDAY_BUILD_NUMBER + '"' +
# ' -D CMAKE_INSTALL_PREFIX=/usr ../../doomsday && fakeroot make package'):
if os.system('linux/gencontrol.sh && dpkg-buildpackage -b'):
raise Exception("Failure to build from source.")

# Place the result in the output directory.
shutil.copy(glob.glob('doomsday*deb')[0], OUTPUT_DIR)
shutil.copy(glob.glob('../doomsday*.deb')[0], OUTPUT_DIR)
shutil.copy(glob.glob('../doomsday*.changes')[0], OUTPUT_DIR)
clean_products()


def main():
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/engine.pro
Expand Up @@ -30,7 +30,7 @@ win32 {
DEFINES += __DOOMSDAY__

!isEmpty(DENG_BUILD) {
echo(DENG_BUILD $$DENG_BUILD)
echo(Build number: $$DENG_BUILD)
DEFINES += DOOMSDAY_BUILD_TEXT=\\\"$$DENG_BUILD\\\"
} else {
echo(DENG_BUILD is not defined.)
Expand Down

0 comments on commit 3e5d2b6

Please sign in to comment.