Permalink
Cannot retrieve contributors at this time
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?
pkg-scripts/LibreCAD-2.2.0.rc1-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
46 lines (35 sloc)
920 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -xe | |
umask 022 | |
PKG=LibreCAD | |
VERSION=2.2.0.rc1 | |
VERSIONGIT=$(echo $VERSION|sed -e 's/\.r/-r/') | |
SRCURL=https://github.com/LibreCAD/LibreCAD/archive/$VERSIONGIT.tar.gz | |
SRC=$VERSIONGIT.tar.gz | |
BUILD=0 | |
PREFIX=/pkg/$PKG-$VERSION-$BUILD | |
# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD | |
mkdir -p $PREFIX | |
cat >$PREFIX/profile <<-EOF | |
PATH=$PREFIX/bin:\$PATH | |
EOF | |
source $PREFIX/profile | |
mkdir -p $PREFIX/build | |
cd $PREFIX/build | |
test -e $SRC || wget $SRCURL | |
test -d $PKG-$VERSIONGIT || tar -xf $SRC | |
cd $PKG-$VERSIONGIT | |
export PATH=/usr/local/qt5/bin:$PATH | |
qmake -r | |
nice -12 make -j $(nproc) | |
mkdir -p $PREFIX/bin $PREFIX/share | |
cp -a unix/* $PREFIX/bin | |
( # tidy up a bit, a 150 meg executable is way huge, or? | |
# also setup a more familar directory tree (albeit it's a bit of a fake) | |
cd $PREFIX/bin | |
strip librecad ttf2lff | |
mv appdata resources ../share | |
ln -s ../share/appdata | |
ln -s ../share/resources | |
) | |
exit | |