#!/bin/sh # Slackware build script for Lazarus IDE # Written by Andre Barboza # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''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 AUTHOR 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. PACKAGE="lazarus" PACKAGE_EXT="gz" VERSION=${VERSION:-2.0.12} BUILD=${BUILD:-1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="https://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${VERSION}/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE LCL=${LCL:-gtk2} #LCL=${LCL:-qt5} Doesn't build. make \ PREFIX=/usr \ FPC=/usr/bin/fpc \ LAZARUS_DIR=/usr/lib/lazarus/${VERSION} \ LCL_PLATFORM=${LCL} \ clean bigide mkdir -p $PKG/usr/lib/lazarus/$VERSION make install \ INSTALL_PREFIX=$PKG/usr \ LAZARUS_INSTALL_DIR=$PKG/usr/lib/lazarus/$VERSION mv $PKG/usr/share/man $PKG/usr # Remove duplicates rm -rf $PKG/usr/share/lazarus mkdir -p $DOCS cp -a COPYING.* README.txt $DOCS ( cd $DOCS ln -sf ../../lib/lazarus/$VERSION/docs docs ln -sf ../../lib/lazarus/$VERSION/examples examples ) # fix links at /usr/bin ( cd $PKG/usr/bin ln -sf ../lib/lazarus/${VERSION}/lazarus ln -sf ../lib/lazarus/${VERSION}/lazarus lazarus-ide ln -sf ../lib/lazarus/${VERSION}/lazbuild ln -sf ../lib/lazarus/${VERSION}/tools/lazres ln -sf ../lib/lazarus/${VERSION}/tools/lrstolfm ln -sf ../lib/lazarus/${VERSION}/startlazarus ln -sf ../lib/lazarus/${VERSION}/tools/updatepofiles ) ( cd $PKG/usr/lib/lazarus/$VERSION ) fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi