Merge pull request #351 from borglab/fix/move-debian-packaging
Remove all debian package files from this repository.release/4.3a0
commit
b39c94782d
|
@ -1,12 +0,0 @@
|
|||
# How to build a GTSAM debian package
|
||||
|
||||
To use the ``debuild`` command, install the ``devscripts`` package
|
||||
|
||||
sudo apt install devscripts
|
||||
|
||||
Change into the gtsam directory, then run:
|
||||
|
||||
debuild -us -uc -j4
|
||||
|
||||
Adjust the ``-j4`` depending on how many CPUs you want to build on in
|
||||
parallel.
|
|
@ -1,5 +0,0 @@
|
|||
gtsam (4.0.0-1berndpfrommer) bionic; urgency=medium
|
||||
|
||||
* initial release
|
||||
|
||||
-- Bernd Pfrommer <bernd.pfrommer@gmail.com> Wed, 18 Jul 2018 20:36:44 -0400
|
|
@ -1 +0,0 @@
|
|||
9
|
|
@ -1,15 +0,0 @@
|
|||
Source: gtsam
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Frank Dellaert <frank@cc.gatech.edu>
|
||||
Uploaders: Jose Luis Blanco Claraco <joseluisblancoc@gmail.com>, Bernd Pfrommer <bernd.pfrommer@gmail.com>
|
||||
Build-Depends: cmake, libboost-all-dev (>= 1.58), libeigen3-dev, libtbb-dev, debhelper (>=9)
|
||||
Standards-Version: 3.9.7
|
||||
Homepage: https://github.com/borglab/gtsam
|
||||
Vcs-Browser: https://github.com/borglab/gtsam
|
||||
|
||||
Package: libgtsam-dev
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libboost-serialization-dev, libboost-system-dev, libboost-filesystem-dev, libboost-thread-dev, libboost-program-options-dev, libboost-date-time-dev, libboost-timer-dev, libboost-chrono-dev, libboost-regex-dev
|
||||
Description: Georgia Tech Smoothing and Mapping Library
|
||||
gtsam: Georgia Tech Smoothing and Mapping library for SLAM type applications
|
|
@ -1,15 +0,0 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: gtsam
|
||||
Source: https://bitbucket.org/gtborg/gtsam.git
|
||||
|
||||
Files: *
|
||||
Copyright: 2017, Frank Dellaert
|
||||
License: BSD
|
||||
|
||||
Files: gtsam/3rdparty/CCOLAMD/*
|
||||
Copyright: 2005-2011, Univ. of Florida. Authors: Timothy A. Davis, Sivasankaran Rajamanickam, and Stefan Larimore. Closely based on COLAMD by Davis, Stefan Larimore, in collaboration with Esmond Ng, and John Gilbert. http://www.cise.ufl.edu/research/sparse
|
||||
License: GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Files: gtsam/3rdparty/Eigen/*
|
||||
Copyright: 2017, Multiple Authors
|
||||
License: MPL2
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
# Makefile target name for running unit tests:
|
||||
GTSAM_TEST_TARGET = check
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
# dh_make generated override targets
|
||||
# This is example for Cmake (See https://bugs.debian.org/641051 )
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DGTSAM_BUILD_TESTS=ON -DGTSAM_BUILD_WRAP=OFF -DGTSAM_BUILD_DOCS=OFF -DGTSAM_INSTALL_CPPUNITLITE=OFF -DGTSAM_INSTALL_GEOGRAPHICLIB=OFF -DGTSAM_BUILD_TYPE_POSTFIXES=OFF -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF
|
||||
|
||||
override_dh_auto_test-arch:
|
||||
# Tests for arch-dependent :
|
||||
echo "[override_dh_auto_test-arch]"
|
||||
dh_auto_build -O--buildsystem=cmake -- $(GTSAM_TEST_TARGET)
|
|
@ -1 +0,0 @@
|
|||
3.0 (quilt)
|
|
@ -1,44 +0,0 @@
|
|||
# How to build Debian and Ubuntu Packages
|
||||
|
||||
## Preparations
|
||||
|
||||
Packages must be signed with a GPG key. First have a look of the keys
|
||||
you have available:
|
||||
|
||||
gpg --list-secret-keys
|
||||
|
||||
If you don't have one, create one, then list again.
|
||||
|
||||
Pick a secret key you like from the listed keys, for instance
|
||||
"Your Name <your.email@yourprovider.com>". Then unlock that key by
|
||||
signing a dummy file. The following line should pop up a window to
|
||||
enter the passphrase:
|
||||
|
||||
echo | gpg --local-user "Your Name <your.email@yourprovider.com>" -s >/dev/null
|
||||
|
||||
Now you can run the below scripts. Without this step they will fail
|
||||
with "No secret key" or similar messages.
|
||||
|
||||
## How to generate a Debian package
|
||||
|
||||
Run the package script, providing a name/email that matches your PGP key.
|
||||
|
||||
cd [GTSAM_SOURCE_ROOT]
|
||||
bash package_scripts/prepare_debian.sh -e "Your Name <your.email@yourprovider.com>"
|
||||
|
||||
|
||||
## How to generate Ubuntu packages for a PPA
|
||||
|
||||
Run the packaging script, passing the name of the gpg key
|
||||
(see above) with the "-e" option:
|
||||
|
||||
cd [GTSAM_SOURCE_ROOT]
|
||||
bash package_scripts/prepare_ubuntu_pkgs_for_ppa.sh -e "Your Name <your.email@yourprovider.com>"
|
||||
|
||||
Check that you have uploaded this key to the ubuntu key server, and
|
||||
have added the key to your account.
|
||||
|
||||
Upload the package to your ppa:
|
||||
|
||||
cd ~/gtsam_ubuntu
|
||||
bash [GTSAM_SOURCE_ROOT]/package_scripts/upload_all_gtsam_ppa.sh -p "ppa:your-name/ppa-name"
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Compile boost statically, with -fPIC to allow linking it into the mex
|
||||
# module (which is a dynamic library). --disable-icu prevents depending
|
||||
# on libicu, which is unneeded and would require then linking the mex
|
||||
# module with it as well. We just stage instead of install, then the
|
||||
# toolbox_package_unix.sh script uses the staged boost.
|
||||
./b2 link=static threading=multi cxxflags=-fPIC cflags=-fPIC --disable-icu -a -j4 stage
|
|
@ -1,187 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Prepare to build a Debian package.
|
||||
# Jose Luis Blanco Claraco, 2019 (for GTSAM)
|
||||
# Jose Luis Blanco Claraco, 2008-2018 (for MRPT)
|
||||
|
||||
set -e # end on error
|
||||
#set -x # for debugging
|
||||
|
||||
APPEND_SNAPSHOT_NUM=0
|
||||
IS_FOR_UBUNTU=0
|
||||
APPEND_LINUX_DISTRO=""
|
||||
VALUE_EXTRA_CMAKE_PARAMS=""
|
||||
while getopts "sud:c:e:" OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
s)
|
||||
APPEND_SNAPSHOT_NUM=1
|
||||
;;
|
||||
u)
|
||||
IS_FOR_UBUNTU=1
|
||||
;;
|
||||
d)
|
||||
APPEND_LINUX_DISTRO=$OPTARG
|
||||
;;
|
||||
c)
|
||||
VALUE_EXTRA_CMAKE_PARAMS=$OPTARG
|
||||
;;
|
||||
e)
|
||||
PACKAGER_EMAIL=$OPTARG
|
||||
;;
|
||||
?)
|
||||
echo "Unknown command line argument!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${PACKAGER_EMAIL+x} ]; then
|
||||
echo "must specify packager email via -e option!"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ -f CMakeLists.txt ];
|
||||
then
|
||||
source package_scripts/prepare_debian_gen_snapshot_version.sh
|
||||
else
|
||||
echo "Error: cannot find CMakeList.txt. This script is intended to be run from the root of the source tree."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Append snapshot?
|
||||
if [ $APPEND_SNAPSHOT_NUM == "1" ];
|
||||
then
|
||||
CUR_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $CUR_SCRIPT_DIR/prepare_debian_gen_snapshot_version.sh # populate GTSAM_SNAPSHOT_VERSION
|
||||
|
||||
GTSAM_VERSION_STR="${GTSAM_VERSION_STR}~snapshot${GTSAM_SNAPSHOT_VERSION}${APPEND_LINUX_DISTRO}"
|
||||
else
|
||||
GTSAM_VERSION_STR="${GTSAM_VERSION_STR}${APPEND_LINUX_DISTRO}"
|
||||
fi
|
||||
|
||||
# Call prepare_release
|
||||
GTSAMSRC=`pwd`
|
||||
|
||||
if [ -f $HOME/gtsam_release/gtsam*.tar.gz ];
|
||||
then
|
||||
echo "## release file already exists. Reusing it."
|
||||
else
|
||||
source package_scripts/prepare_release.sh
|
||||
echo
|
||||
echo "## Done prepare_release.sh"
|
||||
fi
|
||||
|
||||
echo "=========== Generating GTSAM ${GTSAM_VER_MMP} Debian package =============="
|
||||
cd $GTSAMSRC
|
||||
|
||||
set -x
|
||||
if [ -z "$GTSAM_DEB_DIR" ]; then
|
||||
GTSAM_DEB_DIR="$HOME/gtsam_debian"
|
||||
fi
|
||||
GTSAM_EXTERN_DEBIAN_DIR="$GTSAMSRC/debian/"
|
||||
GTSAM_EXTERN_UBUNTU_PPA_DIR="$GTSAMSRC/debian/"
|
||||
|
||||
if [ -f ${GTSAM_EXTERN_DEBIAN_DIR}/control ];
|
||||
then
|
||||
echo "Using debian dir: ${GTSAM_EXTERN_DEBIAN_DIR}"
|
||||
else
|
||||
echo "ERROR: Cannot find ${GTSAM_EXTERN_DEBIAN_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GTSAM_DEBSRC_DIR=$GTSAM_DEB_DIR/gtsam-${GTSAM_VERSION_STR}
|
||||
|
||||
echo "GTSAM_VERSION_STR: ${GTSAM_VERSION_STR}"
|
||||
echo "GTSAM_DEBSRC_DIR: ${GTSAM_DEBSRC_DIR}"
|
||||
|
||||
# Prepare a directory for building the debian package:
|
||||
#
|
||||
rm -fR $GTSAM_DEB_DIR || true
|
||||
mkdir -p $GTSAM_DEB_DIR || true
|
||||
|
||||
# Orig tarball:
|
||||
echo "Copying orig tarball: gtsam_${GTSAM_VERSION_STR}.orig.tar.gz"
|
||||
cp $HOME/gtsam_release/gtsam*.tar.gz $GTSAM_DEB_DIR/gtsam_${GTSAM_VERSION_STR}.orig.tar.gz
|
||||
cd ${GTSAM_DEB_DIR}
|
||||
tar -xf gtsam_${GTSAM_VERSION_STR}.orig.tar.gz
|
||||
|
||||
if [ ! -d "${GTSAM_DEBSRC_DIR}" ];
|
||||
then
|
||||
mv gtsam-* ${GTSAM_DEBSRC_DIR} # fix different dir names for Ubuntu PPA packages
|
||||
fi
|
||||
|
||||
if [ ! -f "${GTSAM_DEBSRC_DIR}/CMakeLists.txt" ];
|
||||
then
|
||||
echo "*ERROR*: Seems there was a problem copying sources to ${GTSAM_DEBSRC_DIR}... aborting script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${GTSAM_DEBSRC_DIR}
|
||||
|
||||
# Copy debian directory:
|
||||
#mkdir debian
|
||||
cp -r ${GTSAM_EXTERN_DEBIAN_DIR}/* debian
|
||||
|
||||
# Use modified control & rules files for Ubuntu PPA packages:
|
||||
#if [ $IS_FOR_UBUNTU == "1" ];
|
||||
#then
|
||||
# already done: cp ${GTSAM_EXTERN_UBUNTU_PPA_DIR}/control.in debian/
|
||||
# Ubuntu: force use of gcc-7:
|
||||
#sed -i '9i\export CXX=/usr/bin/g++-7\' debian/rules
|
||||
#sed -i '9i\export CC=/usr/bin/gcc-7\' debian/rules7
|
||||
#fi
|
||||
|
||||
# Export signing pub key:
|
||||
mkdir debian/upstream/
|
||||
gpg --export --export-options export-minimal --armor > debian/upstream/signing-key.asc
|
||||
|
||||
# Parse debian/ control.in --> control
|
||||
#mv debian/control.in debian/control
|
||||
#sed -i "s/@GTSAM_VER_MM@/${GTSAM_VER_MM}/g" debian/control
|
||||
|
||||
# Replace the text "REPLACE_HERE_EXTRA_CMAKE_PARAMS" in the "debian/rules" file
|
||||
# with: ${${VALUE_EXTRA_CMAKE_PARAMS}}
|
||||
RULES_FILE=debian/rules
|
||||
sed -i -e "s/REPLACE_HERE_EXTRA_CMAKE_PARAMS/${VALUE_EXTRA_CMAKE_PARAMS}/g" $RULES_FILE
|
||||
echo "Using these extra parameters for CMake: '${VALUE_EXTRA_CMAKE_PARAMS}'"
|
||||
|
||||
# Strip my custom files...
|
||||
rm debian/*.new || true
|
||||
|
||||
|
||||
# Figure out the next Debian version number:
|
||||
echo "Detecting next Debian version number..."
|
||||
|
||||
CHANGELOG_UPSTREAM_VER=$( dpkg-parsechangelog | sed -n 's/Version:.*\([0-9]\.[0-9]*\.[0-9]*.*snapshot.*\)-.*/\1/p' )
|
||||
CHANGELOG_LAST_DEBIAN_VER=$( dpkg-parsechangelog | sed -n 's/Version:.*\([0-9]\.[0-9]*\.[0-9]*\).*-\([0-9]*\).*/\2/p' )
|
||||
|
||||
echo " -> PREVIOUS UPSTREAM: $CHANGELOG_UPSTREAM_VER -> New: ${GTSAM_VERSION_STR}"
|
||||
echo " -> PREVIOUS DEBIAN VERSION: $CHANGELOG_LAST_DEBIAN_VER"
|
||||
|
||||
# If we have the same upstream versions, increase the Debian version, otherwise create a new entry:
|
||||
if [ "$CHANGELOG_UPSTREAM_VER" = "$GTSAM_VERSION_STR" ];
|
||||
then
|
||||
NEW_DEBIAN_VER=$[$CHANGELOG_LAST_DEBIAN_VER + 1]
|
||||
echo "Changing to a new Debian version: ${GTSAM_VERSION_STR}-${NEW_DEBIAN_VER}"
|
||||
DEBCHANGE_CMD="--newversion ${GTSAM_VERSION_STR}-${NEW_DEBIAN_VER}"
|
||||
else
|
||||
DEBCHANGE_CMD="--newversion ${GTSAM_VERSION_STR}-1"
|
||||
fi
|
||||
|
||||
echo "Adding a new entry to debian/changelog..."
|
||||
|
||||
DEBEMAIL=${PACKAGER_EMAIL} debchange $DEBCHANGE_CMD -b --distribution unstable --force-distribution New version of upstream sources.
|
||||
|
||||
echo "Copying back the new changelog to a temporary file in: ${GTSAM_EXTERN_DEBIAN_DIR}changelog.new"
|
||||
cp debian/changelog ${GTSAM_EXTERN_DEBIAN_DIR}changelog.new
|
||||
|
||||
set +x
|
||||
|
||||
echo "=============================================================="
|
||||
echo "Now, you can build the source Deb package with 'debuild -S -sa'"
|
||||
echo "=============================================================="
|
||||
|
||||
cd ..
|
||||
ls -lh
|
||||
|
||||
exit 0
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# See https://reproducible-builds.org/specs/source-date-epoch/
|
||||
# get SOURCE_DATE_EPOCH with UNIX time_t
|
||||
if [ -d ".git" ];
|
||||
then
|
||||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
||||
else
|
||||
echo "Error: intended for use from within a git repository"
|
||||
exit 1
|
||||
fi
|
||||
GTSAM_SNAPSHOT_VERSION=$(date -d @$SOURCE_DATE_EPOCH +%Y%m%d-%H%M)
|
||||
|
||||
GTSAM_SNAPSHOT_VERSION+="-git-"
|
||||
GTSAM_SNAPSHOT_VERSION+=`git rev-parse --short=8 HEAD`
|
||||
GTSAM_SNAPSHOT_VERSION+="-"
|
||||
|
||||
# x.y.z version components:
|
||||
GTSAM_VERSION_MAJOR=$(grep "(GTSAM_VERSION_MAJOR" CMakeLists.txt | sed -r 's/^.*GTSAM_VERSION_MAJOR\s*([0-9])*.*$/\1/g')
|
||||
GTSAM_VERSION_MINOR=$(grep "(GTSAM_VERSION_MINOR" CMakeLists.txt | sed -r 's/^.*GTSAM_VERSION_MINOR\s*([0-9])*.*$/\1/g')
|
||||
GTSAM_VERSION_PATCH=$(grep "(GTSAM_VERSION_PATCH" CMakeLists.txt | sed -r 's/^.*GTSAM_VERSION_PATCH\s*([0-9])*.*$/\1/g')
|
||||
|
||||
GTSAM_VER_MM="${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}"
|
||||
GTSAM_VER_MMP="${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH}"
|
||||
GTSAM_VERSION_STR=$GTSAM_VER_MMP
|
|
@ -1,71 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Export sources from a git tree and prepare it for a public release.
|
||||
# Jose Luis Blanco Claraco, 2019 (for GTSAM)
|
||||
# Jose Luis Blanco Claraco, 2008-2018 (for MRPT)
|
||||
|
||||
set -e # exit on error
|
||||
#set -x # for debugging
|
||||
|
||||
# Checks
|
||||
# --------------------------------
|
||||
if [ -f version_prefix.txt ];
|
||||
then
|
||||
if [ -z ${GTSAM_VERSION_STR+x} ];
|
||||
then
|
||||
source package_scripts/prepare_debian_gen_snapshot_version.sh
|
||||
fi
|
||||
echo "ERROR: Run this script from the GTSAM source tree root directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GTSAM_SRC=`pwd`
|
||||
OUT_RELEASES_DIR="$HOME/gtsam_release"
|
||||
|
||||
OUT_DIR=$OUT_RELEASES_DIR/gtsam-${GTSAM_VERSION_STR}
|
||||
|
||||
echo "=========== Generating GTSAM release ${GTSAM_VER_MMP} =================="
|
||||
echo "GTSAM_VERSION_STR : ${GTSAM_VERSION_STR}"
|
||||
echo "OUT_DIR : ${OUT_DIR}"
|
||||
echo "============================================================"
|
||||
echo
|
||||
|
||||
# Prepare output directory:
|
||||
rm -fR $OUT_RELEASES_DIR || true
|
||||
mkdir -p ${OUT_DIR}
|
||||
|
||||
# Export / copy sources to target dir:
|
||||
if [ -d "$GTSAM_SRC/.git" ];
|
||||
then
|
||||
echo "# Exporting git source tree to ${OUT_DIR}"
|
||||
git archive --format=tar HEAD | tar -x -C ${OUT_DIR}
|
||||
|
||||
# Remove VCS control files:
|
||||
find ${OUT_DIR} -name '.gitignore' | xargs rm
|
||||
|
||||
# Generate ./SOURCE_DATE_EPOCH with UNIX time_t
|
||||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
||||
else
|
||||
echo "# Copying sources to ${OUT_DIR}"
|
||||
cp -R . ${OUT_DIR}
|
||||
|
||||
# Generate ./SOURCE_DATE_EPOCH with UNIX time_t
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
fi
|
||||
|
||||
# See https://reproducible-builds.org/specs/source-date-epoch/
|
||||
echo $SOURCE_DATE_EPOCH > ${OUT_DIR}/SOURCE_DATE_EPOCH
|
||||
|
||||
cd ${OUT_DIR}
|
||||
|
||||
# Dont include Debian files in releases:
|
||||
rm -fR package_scripts
|
||||
|
||||
# Orig tarball:
|
||||
cd ..
|
||||
echo "# Creating orig tarball: gtsam-${GTSAM_VERSION_STR}.tar.gz"
|
||||
tar czf gtsam-${GTSAM_VERSION_STR}.tar.gz gtsam-${GTSAM_VERSION_STR}
|
||||
|
||||
rm -fr gtsam-${GTSAM_VERSION_STR}
|
||||
|
||||
# GPG signature:
|
||||
gpg --armor --detach-sign gtsam-${GTSAM_VERSION_STR}.tar.gz
|
|
@ -1,123 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Creates a set of packages for each different Ubuntu distribution, with the
|
||||
# intention of uploading them to a PPA on launchpad
|
||||
#
|
||||
# JLBC, 2010
|
||||
# [Addition 2012:]
|
||||
#
|
||||
# You can declare a variable (in the caller shell) with extra flags for the
|
||||
# CMake in the final ./configure like:
|
||||
#
|
||||
# GTSAM_PKG_CUSTOM_CMAKE_PARAMS="\"-DDISABLE_SSE3=ON\""
|
||||
#
|
||||
|
||||
|
||||
function show_help {
|
||||
echo "USAGE:"
|
||||
echo ""
|
||||
echo "- to display this help: "
|
||||
echo "prepare_ubuntu_packages_for_ppa.sh -h or -?"
|
||||
echo ""
|
||||
echo "- to package to your PPA: "
|
||||
echo "prepare_ubuntu_packages_for_ppa.sh -e email_of_your_gpg_key"
|
||||
echo ""
|
||||
echo "to pass custom config for GTSAM, set the following"
|
||||
echo "environment variable beforehand: "
|
||||
echo ""
|
||||
echo "GTSAM_PKG_CUSTOM_CMAKE_PARAMS=\"\"-DDISABLE_SSE3=ON\"\""
|
||||
echo ""
|
||||
}
|
||||
|
||||
while getopts "h?e:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
e) PACKAGER_EMAIL=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${PACKAGER_EMAIL+x} ]; then
|
||||
show_help
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
# List of distributions to create PPA packages for:
|
||||
LST_DISTROS=(xenial bionic eoan focal)
|
||||
|
||||
# Checks
|
||||
# --------------------------------
|
||||
if [ -f CMakeLists.txt ];
|
||||
then
|
||||
source package_scripts/prepare_debian_gen_snapshot_version.sh
|
||||
echo "GTSAM version: ${GTSAM_VER_MMP}"
|
||||
else
|
||||
echo "ERROR: Run this script from the GTSAM root directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${gtsam_ubuntu_OUT_DIR}" ]; then
|
||||
export gtsam_ubuntu_OUT_DIR="$HOME/gtsam_ubuntu"
|
||||
fi
|
||||
GTSAMSRC=`pwd`
|
||||
if [ -z "${GTSAM_DEB_DIR}" ]; then
|
||||
export GTSAM_DEB_DIR="$HOME/gtsam_debian"
|
||||
fi
|
||||
GTSAM_EXTERN_DEBIAN_DIR="$GTSAMSRC/debian/"
|
||||
|
||||
# Clean out dirs:
|
||||
rm -fr $gtsam_ubuntu_OUT_DIR/
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# And now create the custom packages for each Ubuntu distribution:
|
||||
# -------------------------------------------------------------------
|
||||
count=${#LST_DISTROS[@]}
|
||||
IDXS=$(seq 0 $(expr $count - 1))
|
||||
|
||||
cp ${GTSAM_EXTERN_DEBIAN_DIR}/changelog /tmp/my_changelog
|
||||
|
||||
for IDX in ${IDXS};
|
||||
do
|
||||
DEBIAN_DIST=${LST_DISTROS[$IDX]}
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Call the standard "prepare_debian.sh" script:
|
||||
# -------------------------------------------------------------------
|
||||
cd ${GTSAMSRC}
|
||||
bash package_scripts/prepare_debian.sh -e "$PACKAGER_EMAIL" -s -u -d ${DEBIAN_DIST} -c "${GTSAM_PKG_CUSTOM_CMAKE_PARAMS}"
|
||||
|
||||
CUR_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $CUR_SCRIPT_DIR/prepare_debian_gen_snapshot_version.sh # populate GTSAM_SNAPSHOT_VERSION
|
||||
|
||||
echo "===== Distribution: ${DEBIAN_DIST} ========="
|
||||
cd ${GTSAM_DEB_DIR}/gtsam-${GTSAM_VER_MMP}~snapshot${GTSAM_SNAPSHOT_VERSION}${DEBIAN_DIST}/debian
|
||||
#cp ${GTSAM_EXTERN_DEBIAN_DIR}/changelog changelog
|
||||
cp /tmp/my_changelog changelog
|
||||
DEBCHANGE_CMD="--newversion ${GTSAM_VERSION_STR}~snapshot${GTSAM_SNAPSHOT_VERSION}${DEBIAN_DIST}-1"
|
||||
echo "Changing to a new Debian version: ${DEBCHANGE_CMD}"
|
||||
echo "Adding a new entry to debian/changelog for distribution ${DEBIAN_DIST}"
|
||||
DEBEMAIL="${PACKAGER_EMAIL}" debchange $DEBCHANGE_CMD -b --distribution ${DEBIAN_DIST} --force-distribution New version of upstream sources.
|
||||
|
||||
cp changelog /tmp/my_changelog
|
||||
|
||||
echo "Now, let's build the source Deb package with 'debuild -S -sa':"
|
||||
cd ..
|
||||
# -S: source package
|
||||
# -sa: force inclusion of sources
|
||||
# -d: don't check dependencies in this system
|
||||
debuild -S -sa -d
|
||||
|
||||
# Make a copy of all these packages:
|
||||
cd ..
|
||||
mkdir -p $gtsam_ubuntu_OUT_DIR/$DEBIAN_DIST
|
||||
cp gtsam_* $gtsam_ubuntu_OUT_DIR/${DEBIAN_DIST}/
|
||||
echo ">>>>>> Saving packages to: $gtsam_ubuntu_OUT_DIR/$DEBIAN_DIST/"
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
|
@ -1,64 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Script to build a tarball with the matlab toolbox
|
||||
|
||||
# Detect platform
|
||||
os=`uname -s`
|
||||
arch=`uname -m`
|
||||
if [ "$os" = "Linux" -a "$arch" = "x86_64" ]; then
|
||||
platform=lin64
|
||||
elif [ "$os" = "Linux" -a "$arch" = "i686" ]; then
|
||||
platform=lin32
|
||||
elif [ "$os" = "Darwin" -a "$arch" = "x86_64" ]; then
|
||||
platform=mac64
|
||||
else
|
||||
echo "Unrecognized platform"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Platform is ${platform}"
|
||||
|
||||
# Check for empty diectory
|
||||
if [ ! -z "`ls`" ]; then
|
||||
echo "Please run this script from an empty build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for boost
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 BOOSTTREE"
|
||||
echo "BOOSTTREE should be a boost source tree compiled with toolbox_build_boost."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run cmake
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DGTSAM_INSTALL_MATLAB_TOOLBOX:BOOL=ON \
|
||||
-DCMAKE_INSTALL_PREFIX="$PWD/stage" \
|
||||
-DBoost_NO_SYSTEM_PATHS:BOOL=ON \
|
||||
-DBoost_USE_STATIC_LIBS:BOOL=ON \
|
||||
-DBOOST_ROOT="$1" \
|
||||
-DGTSAM_BUILD_TESTS:BOOL=OFF \
|
||||
-DGTSAM_BUILD_TIMING:BOOL=OFF \
|
||||
-DGTSAM_BUILD_EXAMPLES_ALWAYS:BOOL=OFF \
|
||||
-DGTSAM_WITH_TBB:BOOL=OFF \
|
||||
-DGTSAM_SUPPORT_NESTED_DISSECTION:BOOL=OFF \
|
||||
-DGTSAM_INSTALL_GEOGRAPHICLIB:BOOL=OFF \
|
||||
-DGTSAM_BUILD_UNSTABLE:BOOL=OFF \
|
||||
-DGTSAM_MEX_BUILD_STATIC_MODULE:BOOL=ON ..
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "CMake failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile
|
||||
make -j8 install
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Compile failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create package
|
||||
tar czf gtsam-toolbox-3.2.0-$platform.tgz -C stage/gtsam_toolbox toolbox
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
function show_help {
|
||||
echo "USAGE:"
|
||||
echo ""
|
||||
echo "- to display this help: "
|
||||
echo "upload_all_gtsam_ppa.sh -h or -?"
|
||||
echo ""
|
||||
echo "- to upload to your PPA: "
|
||||
echo "upload_all_gtsam_ppa.sh -p ppa:your_name/name_of_ppa"
|
||||
echo ""
|
||||
}
|
||||
|
||||
while getopts "h?p:" opt; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
p) ppa_name=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z ${ppa_name+x} ]; then
|
||||
show_help
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
find . -name '*.changes' | xargs -I FIL dput ${ppa_name} FIL
|
Loading…
Reference in New Issue