Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 102 lines (74 sloc) 2.43 KB
#! /bin/bash
set -xe
PKG=git-cola
VERSION=3.2
BUILD=0
SRC=https://github.com/git-cola/git-cola/archive/v$VERSION.tar.gz
PREFIX=/pkg/$PKG-$VERSION-$BUILD
# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD
# sip should be part of recent pkg-pythons
SIP_VERSION=4.19.13
SIP_SRC=https://sourceforge.net/projects/pyqt/files/sip/sip-$SIP_VERSION/sip-$SIP_VERSION.tar.gz
# pyqt annoyances:
# v 5.11.3 is defunct due to api changes/borkage
# old 5.7, 5.7.1 now have problems with the qt-licence (what?)
# 5.8.2, 5.10.1 are ok, thus:
PYQT_VERSION=5.10.1
PYQT_SRC=https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$PYQT_VERSION/PyQt5_gpl-$PYQT_VERSION.tar.gz
PYTHONVER=$( python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d. )
PATH=$PREFIX/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin
PYTHONPATH=$PREFIX/lib/python$PYTHONVER/site-packages
PYTHONLIB=$PYTHONPATH
export PATH PYTHONPATH
mkdir -p $PREFIX/build
mkdir -p $PYTHONPATH
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
PYTHONPATH=$PYTHONPATH\${PYTHONPATH:+":\$PYTHONPATH"}
export PATH PYTHONPATH
EOF
cd $PREFIX/build
if test -z "$(type -p sip)"; then # install sip
test -e sip-$SIP_VERSION.tar.gz || wget $SIP_SRC
test -n 'XWIPE' && rm -rf sip-$SIP_VERSION
test -d sip-$SIP_VERSION || tar -xf sip-$SIP_VERSION.tar.gz
cd sip-$SIP_VERSION
python configure.py \
-b $PREFIX/bin \
-d $PYTHONLIB \
-e $PREFIX/include/python$PYTHONVER \
-v $PREFIX/share/sip
mkdir -p $PREFIX/share/sip
make; make install
fi
cd $PREFIX/build
test -e PyQt5_gpl-$PYQT_VERSION.tar.gz || wget $PYQT_SRC
test -n 'XWIPE' && rm -rf PyQt5_gpl-$PYQT_VERSION
test -d PyQt5_gpl-$PYQT_VERSION || tar -xf PyQt5_gpl-$PYQT_VERSION.tar.gz
cd PyQt5_gpl-$PYQT_VERSION
export QTDIR=/usr/local/qt5
python configure.py \
-b $PREFIX/bin \
-d $PYTHONLIB \
-q /usr/local/qt5/bin/qmake \
-v $PREFIX/share/sip \
--confirm-license \
--no-designer-plugin \
--no-python-dbus \
--no-qml-plugin \
--no-stubs \
--sip-incdir=$PREFIX/include/python$PYTHONVER \
--verbose
make -j $(( 2 * $(nproc) - 1 ))
make install
cd $PREFIX/build
test -e v$VERSION.tar.gz || wget $SRC
test -n 'XWIPE' && rm -rf git-cola-$VERSION
test -d git-cola-$VERSION || tar -xf v$VERSION.tar.gz
cd git-cola-$VERSION
python setup.py install --prefix=$PREFIX
# exit 1 # final barrier, inhibits 'closing' on success.
# dump debris from build (approx. 200MB), but keep the sources
cd $PREFIX/build
find * -maxdepth 0 -type d -exec rm -rf {} \;
exit