1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

modify buildPackages

This commit is contained in:
Bill Winslow 2014-09-01 13:45:48 -05:00
parent 0de3ddaacd
commit 33064cdd17
3 changed files with 70 additions and 31 deletions

54
buildPackages.sh Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
# Config (Update me if needed !)
VERSION_UPSTREAM="1.0"
VERSION_PACKAGE="1"
PACKAGENAME="qtox"
UPSTREAM_URL="https://github.com/tux3/qTox/archive/master.tar.gz"
# Make some vars for convenience
VERNAME=$PACKAGENAME"_"$VERSION_UPSTREAM
FULLVERNAME=$VERNAME"-"$VERSION_PACKAGE
ARCHIVENAME=$VERNAME".orig.tar.gz"
# ARCHIVENAME > FULLVERNAME > VERNAME = PACKAGENAME+UPVER
# Get the requried tools if needed
echo "Installing missing tools (if any)..."
if [[ $EUID -ne 0 ]]; then
sudo apt-get install wget debhelper cdbs devscripts alien tar gzip build-essential
else
apt-get install wget debhelper cdbs devscripts alien tar gzip build-essential
fi
mkdir -p .packages
cd .packages
# Cleanup
rm -r $VERNAME 2> /dev/null
rm $ARCHIVENAME 2> /dev/null
# Fectch sources and layout directories
wget -O $ARCHIVENAME $UPSTREAM_URL
tar xvf $ARCHIVENAME # Extracts to qTox-master
mv qTox-master $VERNAME
#tar cz $VERNAME > $ARCHIVENAME
# Build packages
cd $VERNAME
debuild -us -uc
cd ..
# alien warns that it should probably be run as root...
if [[ $EUID -ne 0 ]]; then
sudo alien ./$FULLVERNAME*.deb -r
else
alien ./$FULLVERNAME*.deb -r
fi
mv *.deb ..
mv *.rpm ..
rm -r *
cd ..
rmdir .packages

View File

@ -1,3 +1,19 @@
/*
Copyright (C) 2013 by Maxim Biro <nurupo.contributions@gmail.com>
This file is part of Tox Qt GUI.
This program 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 3 of the License, or
(at your option) any later version.
This program 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 COPYING file for more details.
*/
#include "core.h"
#include "widget/widget.h"

View File

@ -1,31 +0,0 @@
#!/bin/bash
# Config (Update me if needed !)
VERSION_UPSTREAM="1.0"
VERSION_PACKAGE="1"
PACKAGENAME="qtox"
UPSTREAM_GIT_URL="https://github.com/tux3/qtox.git"
# Make some vars for convenience
VERNAME=$PACKAGENAME"_"$VERSION_UPSTREAM
FULLVERNAME=$VERNAME"-"$VERSION_PACKAGE
ARCHIVENAME=$VERNAME".orig.tar.gz"
# Get the requried tools if needed
echo "Installing missing tools (if any)..."
apt-get install git debhelper cdbs devscripts alien tar gzip build-essential
# Cleanup
rm -r $VERNAME 2> /dev/null
rm $ARCHIVENAME 2> /dev/null
# Fectche sources and layour directories
git clone --depth 1 $UPSTREAM_GIT_URL
mv $PACKAGENAME $VERNAME
tar cz $VERNAME > $ARCHIVENAME
# Build packages
cd $VERNAME
debuild -us -uc
cd ..
alien ./$FULLVERNAME*.deb -r