development/lazarus: Fix PRINT_PACKAGE_NAME, doinst, docs, symlink.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-04-14 13:31:01 -04:00 committed by Willy Sudiarto Raharjo
parent 74e7876a64
commit dc440402f7
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 31 additions and 12 deletions

View file

@ -6,3 +6,8 @@ if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View file

@ -22,6 +22,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220414 bkw: BUILD=2
# - fix PRINT_PACKAGE_NAME when ARCH not set in environment.
# - add gtk-update-icon-cache to doinst.sh.
# - remove empty files from doc dir.
# - fix broken symlink.
# 20210905 bkw:
# - take over maintenance
# - update for v2.0.12
@ -31,13 +37,20 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lazarus
VERSION=${VERSION:-2.0.12}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
FPCVER=${FPCVER:-3.2.2}
LCL=${LCL:-gtk2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -47,13 +60,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "i586" ] && [ "$ARCH" != "i686" ]; then
printf "\nThis won't build on $ARCH.\n\n"
exit 1
@ -75,7 +81,6 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
fixperms
sed -i -e 's:share/man:man:' install/man/Makefile
# Compilation doesn't need ./configure
@ -117,9 +122,18 @@ cat install/lazarus.desktop > $PKG/usr/share/applications/lazarus.desktop
cat images/ide_icon48x48.png > $PKG/usr/share/pixmaps/lazarus.png
cat install/lazarus-mime.xml > $PKG/usr/share/mime/packages/lazarus-mime.xml
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -ra COPYING* README.txt docs/* examples/ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -ra COPYING* README.txt docs/* examples/ $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
rm -f $PKGDOC/INSTALL.txt
find $PKGDOC -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
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc