diff --git a/.gitignore b/.gitignore index b23acabc..41b0f740 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +debian/* + # Compiled source *.o *.lo diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..14b50351 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,61 @@ +language: c +sudo: required +dist: trusty + +#Evito che travis lanci una compilazione ogni volta che si crea un tag +branches: + only: + - master + - debian-build + +env: + global: + - GITHUB_EMAIL: max.galbusera+travis@gmail.com + - GITHUB_USERNAME: maxgalbu + - GITHUB_REPO: ios-webkit-debug-proxy + - GITHUB_REPOPATH: ${GITHUB_USERNAME}/${GITHUB_REPO} + - GITHUB_TAGNAME: latest + - secure: "zjmZbYNZ7jp7TLjsMwOZgyRyir6nGKrqCp+WrouJ1J6OcvYyrQyqtk1rmHCW/V0p6p53iYD3BPvF3NBua+YvG0lDymcAMTtn33gNgj9IzKeb88yG1JC/tF1QcLnYTx0csPYR9KjXnunZ1p6RX08a4Hix0yW5iUq9zYmScb3h8aHBR+9BU2b6/OgJ3IItFABtdutElZvAd4qOr9SPhHP0cKKMtiCLvh2P7JF3S4q4Aw1yptZqoxadzgyFPNTKInlWfgKi7U/Ds8WZmBCt69+SwMh+HVKdl8J2hgSJACP1Vsq5lRmknoirYLOrIg5stBFMRPKXnU0u/l/K7O/dHAEa1PTr/K6NGZLa8lKjSNQlp6Tq7Ql3zwIiyziOQY6zY5AADxs3slYJuynArhuhKT9wI0UcBt7owAdB/kJqZGyp5iT1fkogL5tlUgmnXtsuFeyQwDrngBYUFGRT/5ohNmGNZDYBgu3dS725T33ypZk3ZrtkHMsljOeeo6IG8o/jHF6IbKEVmuI5IyP8Fk58jp+t4A99PRm11pFAHvuUve9X0wj5horgib1IR+XvyMqUKPLI9SdQ2v9W4bvte7/V6V2eHgdfcBmJJRS57f4UMa+3X4s9M9Us8lFyaZJp6ryA/zE06hJwM62rI7moSAdrgFr/dMIySHM515tJaNYh7ODj3QY=" + +script: + #Newer version of libimobiledevice and dependencies + - sudo add-apt-repository ppa:martin-salbaba/ppa+libimobiledevice -y + - sudo apt-get update + + #Tools to build + - sudo apt-get install autoconf automake libusb-dev libusb-1.0-0-dev libplist-dev libplist++-dev usbmuxd libtool libimobiledevice-dev -y + - sudo apt-get install debhelper dh-make devscripts -y + - sudo apt-get install libparse-debcontrol-perl -y + + #Build + - ./autogen.sh + - make + + #Create changelog + - dch -v $(git describe --tags $(git rev-list --tags --max-count=1)) -m "New upstream version" -D stable --create --package $GITHUB_REPO --controlmaint + + #Make package + - dpkg-buildpackage -rfakeroot -us -uc + + #Creo un tag per creare una release su github + - git config --global user.email "${GITHUB_EMAIL}" + - git config --global user.name "Travis-CI" + - git remote rm origin + - git remote add origin https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${GITHUB_USERNAME}/${GITHUB_REPO} + - git tag -d $GITHUB_TAGNAME + - git push origin :$GITHUB_TAGNAME --quiet 2> /dev/null + - git tag -a $GITHUB_TAGNAME -m 'latest version' + - git push origin $GITHUB_TAGNAME --quiet 2> /dev/null + + #The .deb is in the parent folder + - cd .. + + #Download github-release (https://github.com/aktau/github-release) + - wget "https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2" + - tar xvf linux-amd64-github-release.tar.bz2 + + #Use it + - export FILENAME=$(printf '%s\n' * | grep .deb$) + - bin/linux/amd64/github-release delete --user $GITHUB_USERNAME --repo $GITHUB_REPO --tag $GITHUB_TAGNAME + - bin/linux/amd64/github-release release --user $GITHUB_USERNAME --repo $GITHUB_REPO --tag $GITHUB_TAGNAME --name "Latest version" + - bin/linux/amd64/github-release upload --user $GITHUB_USERNAME --repo $GITHUB_REPO --tag $GITHUB_TAGNAME --name "$FILENAME" --file $FILENAME \ No newline at end of file diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..2343b802 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: ios-webkit-debug-proxy +Section: debug +Priority: optional +Maintainer: m.galbusera +Build-Depends: debhelper (>= 8.0.0), autotools-dev +Standards-Version: 3.9.4 +Homepage: https://github.com/google/ios-webkit-debug-proxy +Vcs-Git: git://github.com/google/ios-webkit-debug-proxy.git + +Package: ios-webkit-debug-proxy +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A DevTools proxy for iOS devices. + A DevTools proxy (Chrome Remote Debugging Protocol) + for iOS devices (Safari Remote Web Inspector). diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..13568c4e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,35 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ios-webkit-debug-proxy +Source: https://github.com/google/ios-webkit-debug-proxy + +Files: * +Copyright: 2012 Google Inc. +License: Google BSD license + Copyright (c) 2009, Google Inc. + All rights reserved. + . + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + . + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/* +Copyright: 2015 m.galbusera +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..42061c01 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..c6d751b8 --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with autotools-dev