Commit ef871698 authored by Stephane Mankowski's avatar Stephane Mankowski

Support packaging for 'eoan'

parent 5cfa9725
......@@ -66,7 +66,6 @@ More information here: [https://skrooge.org/download](https://skrooge.org/downlo
- libsqlite3-dev (>=3.7.0)
- libofx-dev
- libboost-dev
- libqjson-dev (>=0.8.0)
- qtscript5-dev
- qttools5-dev
- libqt5webkit5-dev (If you want to build with WebKit. You must not activate the option SKG_WEBENGINE) (**Preferred**)
......@@ -97,7 +96,7 @@ More information here: [https://skrooge.org/download](https://skrooge.org/downlo
On ubuntu:
sudo apt-get install pkg-config build-essential cmake devscripts cdbs extra-cmake-modules kross-dev sqlite3 sqlcipher libsqlcipher-dev libgrantlee5-dev libsqlite3-dev libofx-dev libboost-dev xsltproc libqjson-dev qtscript5-dev qttools5-dev libqt5webkit5-dev libqt5webengine5-dev libqt5svg5-dev libkf5coreaddons-dev libkf5archive-dev libkf5xmlgui-dev libkf5activities-dev libkf5wallet-dev libkf5parts-dev libkf5newstuff-dev libkf5iconthemes-dev libkf5kdelibs4support-dev libkf5notifyconfig-dev libkf5runner-dev plasma-framework-dev kdoctools-dev kgendesignerplugin libqca-qt5-2-dev qtbase5-private-dev qtdeclarative5-controls-plugin
sudo apt-get install pkg-config build-essential cmake devscripts cdbs extra-cmake-modules kross-dev sqlite3 sqlcipher libsqlcipher-dev libgrantlee5-dev libsqlite3-dev libofx-dev libboost-dev xsltproc qtscript5-dev qttools5-dev libqt5webkit5-dev libqt5webengine5-dev libqt5svg5-dev libkf5coreaddons-dev libkf5archive-dev libkf5xmlgui-dev libkf5activities-dev libkf5wallet-dev libkf5parts-dev libkf5newstuff-dev libkf5iconthemes-dev libkf5kdelibs4support-dev libkf5notifyconfig-dev libkf5runner-dev plasma-framework-dev kdoctools-dev kgendesignerplugin libqca-qt5-2-dev qtbase5-private-dev qtdeclarative5-controls-plugin
### Extract the archive, and enter the "skrooge" directory. Then run :
......
......@@ -68,22 +68,30 @@ class Releasor(object):
return 0
def makeTarFile(self, args):
print('# Make the tar file')
cmd = ['git', 'clone', 'https://github.com/KDE/releaseme.git']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc == 0:
cmd = ['releaseme/tarme.rb', '--version', args.version, '--origin', 'trunk', 'skrooge']
rc = 0
if args.fromtar:
print('# Make the tar file from '+args.fromtar)
dst = os.path.join(self.workdingDir, 'skrooge-'+args.version+'.tar.xz')
shutil.copyfile(args.fromtar, dst)
print('# DONE')
else:
print('# Make the tar file')
cmd = ['git', 'clone', 'https://github.com/KDE/releaseme.git']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
shutil.rmtree(os.path.join(self.workdingDir, 'skrooge-'+args.version))
shutil.rmtree('releaseme')
os.remove(os.path.join(self.workdingDir, 'release_data'))
sig_file = os.path.join(self.workdingDir, 'skrooge-'+args.version+'.tar.xz.sig')
if os.path.exists(sig_file):
os.remove(sig_file)
print('# '+("DONE" if rc == 0 else "FAILED"))
if rc == 0:
cmd = ['releaseme/tarme.rb', '--version', args.version, '--origin', 'trunk', 'skrooge']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
shutil.rmtree(os.path.join(self.workdingDir, 'skrooge-'+args.version))
shutil.rmtree('releaseme')
os.remove(os.path.join(self.workdingDir, 'release_data'))
sig_file = os.path.join(self.workdingDir, 'skrooge-'+args.version+'.tar.xz.sig')
if os.path.exists(sig_file):
os.remove(sig_file)
print('# '+("DONE" if rc == 0 else "FAILED"))
return rc
def updateTarFile(self, args):
......@@ -198,20 +206,15 @@ class Releasor(object):
for ppa in self.ppatotreat:
for i in range(len(self.ubuntuVersions)):
print('# {}/{}: {} - {}'.format(i+1, len(self.ubuntuVersions), self.ubuntuVersions[i], ppa))
f = open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/skrooge-kf5-common.install'), 'r')
f = open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/control'), 'r')
cf = f.read()
f.close()
if self.ubuntuVersions[i] == 'xenial' and 'usr/share/metainfo/*.xml' in cf:
print('# make changes for '+self.ubuntuVersions[i])
f = open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/skrooge-kf5-common.install'), 'w')
f.write(cf.replace('usr/share/metainfo/*.xml', 'usr/share/appdata/*.xml'))
f.close()
if self.ubuntuVersions[i] != 'xenial' and 'usr/share/appdata/*.xml' in cf:
if self.ubuntuVersions[i] == 'eoan':
print('# make changes for '+self.ubuntuVersions[i])
f = open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/skrooge-kf5-common.install'), 'w')
f.write(cf.replace('usr/share/appdata/*.xml', 'usr/share/metainfo/*.xml'))
f.close()
f = open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/control'), 'w')
f.write(cf.replace('libqjson-dev, \n', '').replace('libqjson0, ', ''))
f.close()
with open(os.path.join(self.workdingDir, 'skrooge-'+args.version+'/debian/changelog'), 'w') as fileDebianChangelog:
fileDebianChangelog.write('skrooge ('+args.version+'-0ubuntu1~'+ppa+str(i+1)+') '+self.ubuntuVersions[i]+'; urgency=medium\n')
......@@ -340,6 +343,7 @@ def main():
# Global arguments
parser.add_argument('--version', required=True, help='The release version')
parser.add_argument('--fromtar', required=False, help='To copy an existing tar file instead of building it from git')
parser.add_argument('--pwd', required=False, help='The password')
parser.add_argument('--stable', action='store_true', help='To define this version as a master version')
parser.add_argument('--publish', action='store_true', help='To publish on launchpad and KDE')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment