Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial build of deb package #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ deploy:
provider: releases
api_key:
secure: eATAa4qYDbak2xavsUw15u3pKqwNPF314QuMPUQzsbiariIiyvEhD5X+KDBeuffJ215V9qFHyAtGfdl3EujWPq8HTrfUiRy1uopyyxV/EE4hM3w06vgS7ij5SJWP/8h1ZVb7gN1Y2N0A+w098HWYbHrj9o9p8wdUc3gja8Z0AMwUidp5IdBDpGGpl3aCfftzFmllrDFbuIye3mXS5hxXO2ws4iG5HoP/X9uDUFzZ9SFqFKzFuEvGB4FTmFKmun62cc2EjkwhLYNtZokXh5YsHR6+Qdl4yzVZVp0rpxV4yD/+wP6IiEYea2u/u2d0s4qHMlEk8TCxIZ5C5bANwN4HswX6ywUFdTfvjM+BaqnumltwbPoTJ0BE6zoKGWPp9Gn3ukIEdwd01p/+GI4t0CoLnsQgwbYknE+twoIWyvziSgG8J2dAY+lWwWyW1juNs5w4L0OU+y7Li9h+MwLtPMglwbG6RcWr2kqIsSYrUFz1ZgnCaSBaUmxCzb1MkYpSwovpur7mOGuFtl6qUfV3VR3HZJlX8WhLKWAOQMUxUwiFZ14EGvs2z7sGoUY3xfN5sac1oaN1cWqWr2eEEz/shdkmvF7009ouvSLlia2yVXddDpHHOfSLNfd0MNn+aN/rTKLhZqUCTxPOuNn7YE+XEn+fJzNmYzpVGtsdanHHjTxyGfk=
file: dist/occt-7.1.0-${TRAVIS_OS_NAME}.tgz
file:
- dist/occt-7.1.0-${TRAVIS_OS_NAME}.tgz
- /tmp/occt-7.1.0-${TRAVIS_OS_NAME}.deb
skip_cleanup: true
overwrite: true
on:
Expand Down
42 changes: 42 additions & 0 deletions build_occt.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
function create_deb {
rm -rf /tmp/$1-$2
mkdir /tmp/$1-$2
mkdir /tmp/$1-$2/DEBIAN
echo "Package:$1" >> /tmp/$1-$2/DEBIAN/control
echo "Version:$2" >> /tmp/$1-$2/DEBIAN/control
echo "Section:base" >> /tmp/$1-$2/DEBIAN/control
echo "Priority:optional" >> /tmp/$1-$2/DEBIAN/control
echo "Architecture:amd64" >> /tmp/$1-$2/DEBIAN/control
echo "Depends:"$3 >> /tmp/$1-$2/DEBIAN/control
echo "Maintainer:[email protected]" >> /tmp/$1-$2/DEBIAN/control
echo "Homepage:http://ruggedpod.qyshare.com" >> /tmp/$1-$2/DEBIAN/control
echo "Description:TEST PACKAGE" >> /tmp/$1-$2/DEBIAN/control
# file_list=`ls -ltd $(find ../dist/occt-7.1.0) | awk '{ print $9}'`
# for file in $file_list
#do
# new_file=`printf "%q" "$file"`
# new_file=`echo $new_file | sed 's/\+/\\\\+/g'`
# is_done=`cat /tmp/stage | grep -E "$new_file"`
#if [ "$is_done" == "" ]
#then
# The file must be integrated into the new deb
# cp --parents $file /tmp/$1-$2
# echo $file >> /tmp/stage
#fi
#done
current_dir=`pwd`
# relocate the deb package into /usr instead of ../dist/occt-7.1.0
cd ../dist/occt-7.1.0
content=`ls`
output_dir=`pwd`
mkdir /tmp/$1-$2/usr
mv * /tmp/$1-$2/usr
cd /tmp
dpkg-deb --build $1-$2
mv $1-$2.deb $1-$2-${TRAVIS_OS_NAME}.deb
ls -lta $1-$2-${TRAVIS_OS_NAME}.deb
cd $current_dir
}


if [ ! -f occt7.1.0.tgz ]
Expand Down Expand Up @@ -34,3 +73,6 @@ cmake -DINSTALL_DIR:STRING="../dist/occt-7.1.0" \
../occt-7.1.0

make -j 5 | grep -v "Building CXX"
make install
#create_deb OCCT 7.0 "tcl8.5-dev,tk8.5-dev,libcoin80-dev,libglu1-mesa-dev,g++,cmake"
create_deb occt 7.1.0 ""