mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-09-21 06:21:17 +00:00
Update build script
This commit is contained in:
parent
28968a1fb6
commit
e962b1de84
@ -19,11 +19,29 @@ import time
|
|||||||
|
|
||||||
package='pdf2htmlex'
|
package='pdf2htmlex'
|
||||||
ppa_name='ppa:pdf2htmlex/pdf2htmlex'
|
ppa_name='ppa:pdf2htmlex/pdf2htmlex'
|
||||||
supported_distributions=('cosmic',)
|
supported_distributions=('bionic',)
|
||||||
dist_pattern=re.compile('|'.join(['\\) '+i for i in supported_distributions]))
|
dist_pattern=re.compile('|'.join(['\\) '+i for i in supported_distributions]))
|
||||||
archive_cmd='(rm CMakeCache.txt || true) && cmake . && make dist'
|
archive_cmd='(rm CMakeCache.txt || true) && cmake . && make dist'
|
||||||
archive_suffix='.tar.bz2'
|
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...'
|
print 'Generating version...'
|
||||||
try:
|
try:
|
||||||
version = re.findall(r'set\(PDF2HTMLEX_VERSION\s*"([^"]*)"\)', open('CMakeLists.txt').read())[0]
|
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)
|
sys.exit(-1)
|
||||||
|
|
||||||
orig_tar_filename = package+'-'+version+archive_suffix
|
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:
|
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'
|
print 'Cannot copy tarball file to build area'
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
@ -109,27 +126,28 @@ for cur_dist in supported_distributions:
|
|||||||
with open('debian/changelog', 'w') as f:
|
with open('debian/changelog', 'w') as f:
|
||||||
f.write(dist_pattern.sub('~%s1) %s' % (cur_dist, cur_dist), changelog, 1))
|
f.write(dist_pattern.sub('~%s1) %s' % (cur_dist, cur_dist), changelog, 1))
|
||||||
|
|
||||||
# building for ppa
|
# No PPA Orginization set up, only building dpkg
|
||||||
if os.system('debuild -S -sa') != 0:
|
# # building for ppa
|
||||||
print 'Failed in debuild'
|
# if os.system('debuild -S -sa') != 0:
|
||||||
sys.exit(-1)
|
# print 'Failed in debuild'
|
||||||
|
# sys.exit(-1)
|
||||||
print
|
#
|
||||||
sys.stdout.write('Everything seems to be good so far, upload?(y/n)')
|
# print
|
||||||
sys.stdout.flush()
|
# sys.stdout.write('Everything seems to be good so far, upload?(y/n)')
|
||||||
ans = raw_input().lower()
|
# sys.stdout.flush()
|
||||||
while ans not in ['y', 'n']:
|
# ans = raw_input().lower()
|
||||||
sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
# while ans not in ['y', 'n']:
|
||||||
ans = raw_input().lower()
|
# sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
||||||
|
# ans = raw_input().lower()
|
||||||
if ans == 'n':
|
#
|
||||||
print 'Skipped.'
|
# if ans == 'n':
|
||||||
sys.exit(0)
|
# 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 'Uploading'
|
||||||
print 'Failed in uploading by dput'
|
# if os.system('dput %s ../%s' % (ppa_name, package+'_'+full_deb_version+'~'+cur_dist+'1_source.changes')) != 0:
|
||||||
sys.exit(-1)
|
# print 'Failed in uploading by dput'
|
||||||
|
# sys.exit(-1)
|
||||||
|
|
||||||
# building for dpkg
|
# building for dpkg
|
||||||
if os.system('dpkg-buildpackage') != 0:
|
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
|
pdf2htmlex (0.16.0-1~git20190920r21a9f-0ubuntu1) bionic; 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
|
|
||||||
|
|
||||||
* Package for 18.04
|
* Package for 18.04
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user