projects
/
auto-debuild.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e2ba607
)
fix usgae of host and build architecture; rename binaryInstall -> binaryInstallFiles
author
Ralf Jung
<post@ralfj.de>
Tue, 31 Jul 2012 11:12:18 +0000
(13:12 +0200)
committer
Ralf Jung
<post@ralfj.de>
Tue, 31 Jul 2012 11:12:18 +0000
(13:12 +0200)
auto_debuild.py
patch
|
blob
|
history
diff --git
a/auto_debuild.py
b/auto_debuild.py
index cb2d840039af595a7a6f79ae545cb78e08b3294a..ab04dc0e9d752e24d5aa2f8e918e457e3f1fb515 100755
(executable)
--- a/
auto_debuild.py
+++ b/
auto_debuild.py
@@
-53,11
+53,14
@@
def cmakeRules(config):
return r
def automakeRules(config):
return r
def automakeRules(config):
+ # "build" is what we are building *on*, and "host" is what we are building *for* (and GNU is weird...)
+ # also, we don't really support cross-building... ;-) (to do, we'd have to write shell code that checks whether BUILD_GNU_TYPE
+ # and HOST_GNU_TYPE are equal, and if they are not, add a --host parameter)
r = RulesFile()
r.dh += ["--buildsystem=autoconf"]
r.rules['auto_configure'] = [
'BUILD_TYPE=$$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) && ' + # doing the expansion beforehand ensures that we cancel if it fails
r = RulesFile()
r.dh += ["--buildsystem=autoconf"]
r.rules['auto_configure'] = [
'BUILD_TYPE=$$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) && ' + # doing the expansion beforehand ensures that we cancel if it fails
- 'MULTIARCH=$$(dpkg-architecture -qDEB_
BUILD
_MULTIARCH) && '+
+ 'MULTIARCH=$$(dpkg-architecture -qDEB_
HOST
_MULTIARCH) && '+
'./configure --build=$$BUILD_TYPE '+ # do the escape manually here so we can use the variables (there's no user-controlled string in here anyway)
'--prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info '+
'--libdir=/usr/lib/$$MULTIARCH --libexecdir=/usr/lib/$$MULTIARCH '+
'./configure --build=$$BUILD_TYPE '+ # do the escape manually here so we can use the variables (there's no user-controlled string in here anyway)
'--prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info '+
'--libdir=/usr/lib/$$MULTIARCH --libexecdir=/usr/lib/$$MULTIARCH '+
@@
-74,7
+77,7
@@
def commandInBuildEnv(config, command):
return command
def getArchitecture(config):
return command
def getArchitecture(config):
- cmd = commandInBuildEnv(config, ['dpkg-architecture', '-qDEB_
BUILD
_ARCH'])
+ cmd = commandInBuildEnv(config, ['dpkg-architecture', '-qDEB_
HOST
_ARCH'])
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
res = p.communicate()[0] # get only stdout
if p.returncode != 0: raise Exception("Querying dpkg for the architecture failed")
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
res = p.communicate()[0] # get only stdout
if p.returncode != 0: raise Exception("Querying dpkg for the architecture failed")
@@
-148,7
+151,7
@@
def createDebianFiles(config):
files.append(os.path.join(debDir, "%s-dbg_%s_%s.deb" % (binaryName, version, arch)))
# install file
with open('debian/'+binaryName+'.install', 'w') as f:
files.append(os.path.join(debDir, "%s-dbg_%s_%s.deb" % (binaryName, version, arch)))
# install file
with open('debian/'+binaryName+'.install', 'w') as f:
- for line in config.get('binaryInstall', []):
+ for line in config.get('binaryInstall
Files
', []):
if line.startswith('/'): # a file from within the package, not from the source tree
line = 'debian/'+binaryName+line
print >>f, line
if line.startswith('/'): # a file from within the package, not from the source tree
line = 'debian/'+binaryName+line
print >>f, line