#!/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} FPCVER=${FPCVER:-3.2.2} BUILD=${BUILD:-2} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required FPCSRC="fpc-$FPCVER.source.tar.gz" FPCURL="https://downloads.sourceforge.net/freepascal/$FPCSRC" get_source $FPCSRC $FPCURL 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 fixperms() { chown -R root:root . find -L . -type l -o \ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ } fixperms sed -i -e 's:share/man:man:' install/man/Makefile LCL=${LCL:-gtk2} #LCL=${LCL:-qt5} Doesn't build. # Compilation doesn't need ./configure make clean make -j1 all \ PREFIX=/usr \ LCL_PLATFORM=${LCL} make install \ INSTALL_PREFIX=$PKG/usr \ INSTALL_MAN_DIR=$PKG/usr/man # fix links at /usr/bin ( cd $PKG/usr/bin ln -sf ../share/lazarus/lazarus ln -sf ../share/lazarus/lazbuild ln -sf ../share/lazarus/startlazarus ) # 20210905 bkw: Nothing used fpc-source but lazarus, so just include # the source here. mkdir -p $PKG/usr/src ( cd $PKG/usr/src tar xvf $CWD/$FPCSRC fixperms ln -s fpc-$FPCVER fpc ) mkdir -p $DOCS cp -a COPYING.* README.txt docs/* examples/ $DOCS rm -f $DOCS/INSTALL.txt find $DOCS -depth -type d -empty -delete # 20220414 bkw: this symlink is mistargeted... fixed, and don't freak out # if sbopkglint complains about a filesystem loop (there really is one). rm -f $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp ln -s ../../../../lhelp $PKG/usr/share/lazarus/components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi