1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/usr/bin/python2.3
# arch-tag: main entry point
# Copyright (C) 2003 John Goerzen
#
# 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import sys, os
from tla_support import util
from tbppy import versions, extcmd, tbpconfig
util.verbose = 1
debver, upstreamver, package, wcdir = tbpconfig.pkginit()
tgzname = "%s_%s.orig.tar.gz" % (package, upstreamver)
tgzpath = os.path.abspath(os.getcwd() + "/../%s" % tgzname)
origdirname = '%s-%s.orig' % (package, upstreamver)
origdir = os.path.abspath(os.getcwd() + "/../%s-%s.orig" % (package, upstreamver))
startdir = os.getcwd()
if not os.path.isfile(tgzpath):
if not os.path.isdir(origdir):
# Need to build the orig dir so that the
#system can generate the orig tgz
os.chdir(wcdir)
print "Building .orig from archive."
extcmd.qrun('tla buildcfg upstream/%s/%s' % (package, upstreamver))
os.chdir(startdir)
os.chdir('..')
extcmd.qrun('tla inventory -s "%s" | tar -cSpf - -T- | gzip -9 > "%s"' % \
(origdirname, tgzname))
os.chdir(startdir)
print " *** Running build program"
util.safeexec("debuild",
[r'-i\+\+pristine-trees|,,*|\{arch\}|\.arch-ids|\.arch-inventory'] + \
sys.argv[1:])
|