mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
initial work on packaging debian old script too complex and does not work with new build system
This commit is contained in:
parent
040037ad3a
commit
30ffdeeea4
@ -12,6 +12,25 @@ modified for general git repo
|
|||||||
2013.05.30
|
2013.05.30
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# CONSIDER PORTING to either BASH or PERL (as used by dpkg-buldpackage)
|
||||||
|
# CONSIDER BINARY ONLY PACKAGE based on appDir or docerDir
|
||||||
|
#
|
||||||
|
# See: https://blog.serverdensity.com/how-to-create-a-debian-deb-package/
|
||||||
|
# See: http://www.sj-vs.net/creating-a-simple-debian-deb-package-based-on-a-directory-structure/
|
||||||
|
# See: https://unix.stackexchange.com/questions/30303/how-to-create-a-deb-file-manually
|
||||||
|
# See: https://askubuntu.com/questions/1130558/how-to-build-deb-package-for-ubuntu-18-04
|
||||||
|
# See: https://blog.knoldus.com/create-a-debian-package-using-dpkg-deb-tool/
|
||||||
|
# See: http://www.tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
|
||||||
|
# See: https://coderwall.com/p/urkybq/how-to-create-debian-package-from-source
|
||||||
|
#
|
||||||
|
# NOTES:
|
||||||
|
# 1. Should use something to force update of changelog
|
||||||
|
# 2. How best to compute dpkg version
|
||||||
|
# 3. Distribute only binary package (no source package -- link to main github repo)
|
||||||
|
# 4. Use ppa: https://launchpad.net/~pdf2htmlex/+archive/ubuntu/pdf2htmlex
|
||||||
|
# 5. Rename poppler-data destination to poppler-pdf2htmlEX
|
||||||
|
# 6. Ensure source code location of poppler-data has been updated
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
@ -21,28 +40,31 @@ package='pdf2htmlex'
|
|||||||
ppa_name='ppa:pdf2htmlex/pdf2htmlex'
|
ppa_name='ppa:pdf2htmlex/pdf2htmlex'
|
||||||
supported_distributions=('disco',)
|
supported_distributions=('disco',)
|
||||||
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='cd pdf2htmlEX/build && (rm CMakeCache.txt || true) && cmake .. && make dist'
|
||||||
archive_suffix='.tar.bz2'
|
archive_suffix='.tar.bz2'
|
||||||
|
|
||||||
if os.path.exists('../build-area'):
|
#if os.path.exists('imageBuild/debianDir'):
|
||||||
sys.stdout.write('Build area already exists, delete to continue?(y/n)')
|
# sys.stdout.write('Build area already exists, delete to continue?(y/n)')
|
||||||
sys.stdout.flush()
|
# sys.stdout.flush()
|
||||||
ans = raw_input().lower()
|
# ans = raw_input().lower()
|
||||||
while ans not in ['y', 'n']:
|
# while ans not in ['y', 'n']:
|
||||||
sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
# sys.stdout.write('I don\'t understand, enter \'y\' or \'n\':')
|
||||||
ans = raw_input().lower()
|
# ans = raw_input().lower()
|
||||||
|
#
|
||||||
if ans == 'n':
|
# if ans == 'n':
|
||||||
print 'Skipped.'
|
# print 'Skipped.'
|
||||||
sys.exit(0)
|
# sys.exit(0)
|
||||||
|
#
|
||||||
if os.system('rm -rf ../build-area') != 0:
|
if os.system('rm -rf imageBuild/debianDir') != 0:
|
||||||
print 'Failed to clean up old build directory'
|
print 'Failed to clean up old build directory'
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
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('pdf2htmlEX/CMakeLists.txt').read()
|
||||||
|
)[0]
|
||||||
except:
|
except:
|
||||||
print 'Cannot get package name and version number'
|
print 'Cannot get package name and version number'
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
@ -90,16 +112,16 @@ 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')
|
os.mkdir('imageBuild/debianDir')
|
||||||
if os.system('test -e %s && cp %s ../build-area/' % (orig_tar_filename, orig_tar_filename)) != 0:
|
if os.system('test -e pdf2htmlEX/build/%s && cp pdf2htmlEX/build/%s imageBuild/debianDir/' % (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)
|
||||||
|
|
||||||
deb_orig_tar_filename = package+'_'+deb_version+'.orig'+archive_suffix
|
deb_orig_tar_filename = package+'_'+deb_version+'.orig'+archive_suffix
|
||||||
try:
|
try:
|
||||||
os.chdir('../build-area')
|
os.chdir('imageBuild/debianDir')
|
||||||
except:
|
except:
|
||||||
print 'Cannot find ../build-area'
|
print 'Cannot find imageBuild/debianDir'
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
# remove old dir
|
# remove old dir
|
||||||
|
@ -24,6 +24,9 @@ sudo apt-get $UNATTENDED install \
|
|||||||
make \
|
make \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
|
build-essential \
|
||||||
|
dpkg-dev \
|
||||||
|
devscripts \
|
||||||
gettext \
|
gettext \
|
||||||
openjdk-8-jre-headless \
|
openjdk-8-jre-headless \
|
||||||
jq \
|
jq \
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
pdf2htmlex (0.18.7-1~git20200531r3fcd0-0ubuntu1) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* test packaging
|
||||||
|
|
||||||
|
-- Stephen Gaito <dev@pDev> Sun, 31 May 2020 13:38:59 +0000
|
||||||
|
|
||||||
pdf2htmlex (0.18.7-1~git20190927rb69b8-0ubuntu1) disco; urgency=low
|
pdf2htmlex (0.18.7-1~git20190927rb69b8-0ubuntu1) disco; urgency=low
|
||||||
|
|
||||||
* Package for poppler-0.81.0
|
* Package for poppler-0.81.0
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -2,7 +2,7 @@ Source: pdf2htmlex
|
|||||||
Section: universe/web
|
Section: universe/web
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Trent Petersen <trentpetersen.523@gmail.com>
|
Maintainer: Trent Petersen <trentpetersen.523@gmail.com>
|
||||||
Build-Depends: cmake (>= 2.6.0), pkg-config, debhelper (>= 10), libpoppler-dev (>= 0.20.3), libpng-dev, libjpeg-dev, libfontforge-dev, libspiro-dev, python-dev, openjdk-8-jre-headless
|
Build-Depends: cmake (>= 2.6.0), pkg-config, debhelper (>= 10), libpng-dev, libjpeg-dev, openjdk-8-jre-headless
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.3
|
||||||
Homepage: http://github.com/pdf2htmlEX/pdf2htmlEX
|
Homepage: http://github.com/pdf2htmlEX/pdf2htmlEX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user