Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debian|Builder: Added new script for generating source package metadata
- Loading branch information
Showing
6 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/python | ||
# | ||
# This script will generate the debian/ directory required for creating | ||
# a source package. Binary packages are created by CPack, so they do | ||
# not need this. | ||
|
||
import os, subprocess, sys | ||
|
||
DENG_ROOT = os.getcwd() | ||
OUT_DIR = os.path.join(DENG_ROOT, 'debian') | ||
TEMPLATE_DIR = os.path.join(DENG_ROOT, 'doomsday/build/debian/template') | ||
|
||
if not os.path.exists(OUT_DIR): | ||
os.mkdir(OUT_DIR) | ||
|
||
ARCH = subprocess.check_output(['dpkg', '--print-architecture']).strip() | ||
DEBFULLNAME = os.getenv('DEBFULLNAME') | ||
DEBEMAIL = os.getenv('DEBEMAIL') | ||
PACKAGE = 'doomsday' | ||
BUILDNUMBER = sys.argv[1] | ||
|
||
control = open(os.path.join(TEMPLATE_DIR, 'control'), 'r').read() | ||
control = control.replace('${Package}', PACKAGE) | ||
control = control.replace('${Arch}', ARCH) | ||
control = control.replace('${DEBFULLNAME}', DEBFULLNAME) | ||
control = control.replace('${DEBEMAIL}', DEBEMAIL) | ||
open(os.path.join(OUT_DIR, 'control'), 'w').write(control) | ||
|
||
rules = open(os.path.join(TEMPLATE_DIR, 'rules'), 'r').read() | ||
rules = rules.replace('${BuildNumber}', BUILDNUMBER) | ||
open(os.path.join(OUT_DIR, 'rules'), 'w').write(rules) | ||
|
||
compat = open(os.path.join(TEMPLATE_DIR, 'compat'), 'r').read() | ||
open(os.path.join(OUT_DIR, 'compat'), 'w').write(compat) | ||
|
||
copyright = open(os.path.join(TEMPLATE_DIR, 'copyright'), 'r').read() | ||
open(os.path.join(OUT_DIR, 'copyright'), 'w').write(copyright) | ||
|
||
docs = open(os.path.join(TEMPLATE_DIR, 'docs'), 'r').read() | ||
open(os.path.join(OUT_DIR, 'docs'), 'w').write(docs) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
control | ||
*.ex | ||
*.EX | ||
*.substvars | ||
*.log | ||
source | ||
files | ||
doomsday | ||
changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Format: http://dep.debian.net/deps/dep5 | ||
Upstream-Name: deng | ||
Source: http://dengine.net/ | ||
|
||
Files: * | ||
Copyright: 1999-2011 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
License: GPL-2.0+ | ||
|
||
Files: debian/* | ||
Copyright: 2011 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
License: GPL-3.0+ | ||
|
||
License: GPL-3.0+ | ||
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 3 of the License, or | ||
(at your option) any later version. | ||
. | ||
This package 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. | ||
. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
. | ||
On Debian systems, the complete text of the GNU General | ||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/make -f | ||
APPNAME := doomsday | ||
|
||
builddir: | ||
mkdir -p builddir | ||
|
||
builddir/Makefile: builddir | ||
cd builddir && QTCHOOSER_RUNTOOL=qmake QT_SELECT=5 cmake \ | ||
-DQMAKE=qtchooser \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DDENG_BUILD=${BuildNumber} \ | ||
-DCMAKE_CXX_FLAGS=-std=c++11 \ | ||
-DDENG_ENABLE_COTIRE=OFF \ | ||
../../doomsday | ||
|
||
build: build-arch build-indep | ||
build-arch: build-stamp | ||
build-indep: build-stamp | ||
|
||
build-stamp: builddir/Makefile | ||
dh_testdir | ||
# Add here commands to compile the package. | ||
cd builddir && $(MAKE) | ||
touch $@ | ||
|
||
clean: | ||
dh_testdir | ||
dh_testroot | ||
rm -f build-stamp | ||
# Add here commands to clean up after the build process. | ||
rm -rf builddir | ||
dh_clean | ||
install: build | ||
dh_testdir | ||
dh_testroot | ||
dh_prep | ||
dh_installdirs | ||
|
||
# Add here commands to install the package into debian/your_appname | ||
cd builddir && $(MAKE) DESTDIR=$(CURDIR)/debian/$(APPNAME) install | ||
|
||
# Build architecture-independent files here. | ||
binary-indep: build install | ||
# We have nothing to do by default. | ||
|
||
# Build architecture-dependent files here. | ||
binary-arch: build install | ||
dh_testdir | ||
dh_testroot | ||
dh_installdocs | ||
dh_installexamples | ||
dh_installman | ||
dh_link | ||
#dh_strip --dbg-package=my-application-dbg | ||
dh_compress | ||
dh_fixperms | ||
dh_installdeb | ||
dh_shlibdeps | ||
dh_gencontrol | ||
dh_md5sums | ||
dh_builddeb | ||
|
||
binary: binary-indep binary-arch | ||
.PHONY: build clean binary-indep binary-arch binary install configure |