diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-12-23 13:45:09 +0100 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2019-12-23 13:45:09 +0100 |
commit | 5d647cf9a6159afd2933da594b9c79ad93d3cd9b (patch) | |
tree | 2571025a602f68fc8933b01104dc712d41f84034 /build-deb.sh | |
parent | 654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff) |
New upstream version 0.12.0~b0+dfsg
Diffstat (limited to 'build-deb.sh')
-rwxr-xr-x | build-deb.sh | 97 |
1 files changed, 21 insertions, 76 deletions
diff --git a/build-deb.sh b/build-deb.sh index f87e565..7ca6d7e 100755 --- a/build-deb.sh +++ b/build-deb.sh @@ -3,7 +3,7 @@ # Project: Silx # https://github.com/silx-kit/silx # -# Copyright (C) 2015-2017 European Synchrotron Radiation Facility, Grenoble, France +# Copyright (C) 2015-2019 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # @@ -29,9 +29,9 @@ project=silx source_project=silx -version=$(python -c"import version; print(version.version)") -strictversion=$(python -c"import version; print(version.strictversion)") -debianversion=$(python -c"import version; print(version.debianversion)") +version=$(python3 -c"import version; print(version.version)") +strictversion=$(python3 -c"import version; print(version.strictversion)") +debianversion=$(python3 -c"import version; print(version.debianversion)") deb_name=$(echo "$source_project" | tr '[:upper:]' '[:lower:]') @@ -44,15 +44,6 @@ then #we are probably on a ubuntu platform debian_version=$(cat /etc/debian_version | cut -d/ -f1) case $debian_version in - squeeze) - debian_version=6 - ;; - wheezy) - debian_version=7 - ;; - jessie) - debian_version=8 - ;; stretch) debian_version=9 ;; @@ -88,13 +79,11 @@ optional arguments: --help show this help text --install install the packages generated at the end of the process using 'sudo dpkg' - --debian7 Simulate a debian7 system (fail-safe) - --debian8 Simulate a debian 8 Jessie system --debian9 Simulate a debian 9 Stretch system + --debian10 Simulate a debian 10 Buster system " install=0 -use_python3=0 #used only for stdeb while : do @@ -107,24 +96,6 @@ do install=1 shift ;; - --python3) - use_python3=1 - shift - ;; - --debian7) - debian_version=7 - target_system=debian${debian_version} - dist_directory=${project_directory}/dist/${target_system} - build_directory=${project_directory}/build/${target_system} - shift - ;; - --debian8) - debian_version=8 - target_system=debian${debian_version} - dist_directory=${project_directory}/dist/${target_system} - build_directory=${project_directory}/build/${target_system} - shift - ;; --debian9) debian_version=9 target_system=debian${debian_version} @@ -152,11 +123,11 @@ clean_up() mkdir -p ${build_directory} } -build_deb_8_plus () { +build_deb () { echo "Build for debian 8 or newer using actual packaging" tarname=${project}_${debianversion}.orig.tar.gz clean_up - python setup.py debian_src + python3 setup.py debian_src cp -f dist/${tarname} ${build_directory} if [ -f dist/${project}-testimages.tar.gz ] then @@ -208,9 +179,19 @@ build_deb_8_plus () { #export PYBUILD_DISABLE_python3=test #export DEB_BUILD_OPTIONS=nocheck fi - + + case $debian_version in + 9) + debian_name=stretch + ;; + 10) + debian_name=buster + ;; + esac + dch -v ${debianversion}-1 "upstream development build of ${project} ${version}" - dch --bpo "${project} snapshot ${version} built for ${target_system}" + dch -D ${debian_name}-backports -l~bpo${debian_version}+ "${project} snapshot ${version} built for ${target_system}" + #dch --bpo "${project} snapshot ${version} built for ${target_system}" dpkg-buildpackage -r rc=$? @@ -230,47 +211,11 @@ build_deb_8_plus () { fi } -build_deb_7_minus () { - echo "Build for debian 7 or older using stdeb" - tarname=${project}-${strictversion}.tar.gz - clean_up - - python setup.py sdist - cp -f dist/${tarname} ${build_directory} - cd ${build_directory} - tar -xzf ${tarname} - cd ${project}-${strictversion} - - if [ $use_python3 = 1 ] - then - echo Using Python 2+3 - python3 setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True build --no-cython bdist_deb - rc=$? - else - echo Using Python 2 - # bdist_deb feed /usr/bin using setup.py entry-points - python setup.py --command-packages=stdeb.command build --no-cython bdist_deb - rc=$? - fi - - # move packages to dist directory - rm -rf ${dist_directory} - mkdir -p ${dist_directory} - mv -f deb_dist/*.deb ${dist_directory} - - # back to the root - cd ../../.. -} -if [ $debian_version -ge 8 ] -then - build_deb_8_plus -else - build_deb_7_minus -fi +build_deb if [ $install -eq 1 ]; then - sudo -v su -c "dpkg -i ${dist_directory}/*.deb" + sudo su -c "dpkg -i ${dist_directory}/*.deb" fi exit "$rc" |