mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
Update build script
This commit is contained in:
parent
28968a1fb6
commit
e962b1de84
@ -19,11 +19,29 @@ import time
|
||||
|
||||
package='pdf2htmlex'
|
||||
ppa_name='ppa:pdf2htmlex/pdf2htmlex'
|
||||
supported_distributions=('cosmic',)
|
||||
supported_distributions=('bionic',)
|
||||
dist_pattern=re.compile('|'.join(['\\) '+i for i in supported_distributions]))
|
||||
archive_cmd='(rm CMakeCache.txt || true) && cmake . && make dist'
|
||||
archive_suffix='.tar.bz2'
|
||||
|
||||
if os.path.exists('../build-area'):
|
||||
sys.stdout.write('Build area already exists, delete to continue?(y/n)')
|
||||
sys.stdout.flush()
|
||||
ans = raw_input().lower()
|
||||
while ans not in ['y', 'n']:
|
||||
sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
||||
ans = raw_input().lower()
|
||||
|
||||
if ans == 'n':
|
||||
print 'Skipped.'
|
||||
sys.exit(0)
|
||||
|
||||
if os.system('rm -rf ../build-area') != 0:
|
||||
print 'Failed to clean up old build directory'
|
||||
sys.exit(-1)
|
||||
|
||||
os.mkdir('../build-area')
|
||||
|
||||
print 'Generating version...'
|
||||
try:
|
||||
version = re.findall(r'set\(PDF2HTMLEX_VERSION\s*"([^"]*)"\)', open('CMakeLists.txt').read())[0]
|
||||
@ -74,7 +92,6 @@ if os.system(archive_cmd) != 0:
|
||||
sys.exit(-1)
|
||||
|
||||
orig_tar_filename = package+'-'+version+archive_suffix
|
||||
os.mkdir('../build-area')
|
||||
if os.system('test -e %s && cp %s ../build-area/' % (orig_tar_filename, orig_tar_filename)) != 0:
|
||||
print 'Cannot copy tarball file to build area'
|
||||
sys.exit(-1)
|
||||
@ -109,27 +126,28 @@ for cur_dist in supported_distributions:
|
||||
with open('debian/changelog', 'w') as f:
|
||||
f.write(dist_pattern.sub('~%s1) %s' % (cur_dist, cur_dist), changelog, 1))
|
||||
|
||||
# building for ppa
|
||||
if os.system('debuild -S -sa') != 0:
|
||||
print 'Failed in debuild'
|
||||
sys.exit(-1)
|
||||
|
||||
print
|
||||
sys.stdout.write('Everything seems to be good so far, upload?(y/n)')
|
||||
sys.stdout.flush()
|
||||
ans = raw_input().lower()
|
||||
while ans not in ['y', 'n']:
|
||||
sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
||||
ans = raw_input().lower()
|
||||
|
||||
if ans == 'n':
|
||||
print 'Skipped.'
|
||||
sys.exit(0)
|
||||
|
||||
print 'Uploading'
|
||||
if os.system('dput %s ../%s' % (ppa_name, package+'_'+full_deb_version+'~'+cur_dist+'1_source.changes')) != 0:
|
||||
print 'Failed in uploading by dput'
|
||||
sys.exit(-1)
|
||||
# No PPA Orginization set up, only building dpkg
|
||||
# # building for ppa
|
||||
# if os.system('debuild -S -sa') != 0:
|
||||
# print 'Failed in debuild'
|
||||
# sys.exit(-1)
|
||||
#
|
||||
# print
|
||||
# sys.stdout.write('Everything seems to be good so far, upload?(y/n)')
|
||||
# sys.stdout.flush()
|
||||
# ans = raw_input().lower()
|
||||
# while ans not in ['y', 'n']:
|
||||
# sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
||||
# ans = raw_input().lower()
|
||||
#
|
||||
# if ans == 'n':
|
||||
# print 'Skipped.'
|
||||
# sys.exit(0)
|
||||
#
|
||||
# print 'Uploading'
|
||||
# if os.system('dput %s ../%s' % (ppa_name, package+'_'+full_deb_version+'~'+cur_dist+'1_source.changes')) != 0:
|
||||
# print 'Failed in uploading by dput'
|
||||
# sys.exit(-1)
|
||||
|
||||
# building for dpkg
|
||||
if os.system('dpkg-buildpackage') != 0:
|
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,10 +1,4 @@
|
||||
pdf2htmlex (0.17.0-1~git201909200825r21a9f-0ubuntu1) cosmic; urgency=low
|
||||
|
||||
* Package for 18.10
|
||||
|
||||
-- Trent Petersen <trentpetersen.523@gmail.com> Fri, 20 Sep 2019 08:18:28 -0500
|
||||
|
||||
pdf2htmlex (0.16.0-1~git201909191126r32f7c-0ubuntu1) bionic; urgency=low
|
||||
pdf2htmlex (0.16.0-1~git20190920r21a9f-0ubuntu1) bionic; urgency=low
|
||||
|
||||
* Package for 18.04
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user